{"openapi":"3.0.1","servers":[{"url":"https://[tenant_id].logto.app/","description":"Logto endpoint address."}],"info":{"title":"Logto API references","description":"API references for Logto services.\n\nNote: The documentation is for Logto Cloud. If you are using Logto OSS, please refer to the response of `/api/swagger.json` endpoint on your Logto instance.","version":"Cloud"},"paths":{"/api/applications":{"get":{"operationId":"ListApplications","tags":["Applications"],"parameters":[{"name":"types","in":"query","required":false,"schema":{"oneOf":[{"type":"array","items":{"type":"string","enum":["Native","SPA","Traditional","MachineToMachine","Protected"]}},{"type":"string","enum":["Native","SPA","Traditional","MachineToMachine","Protected"]}]},"description":"An array of application types to filter applications."},{"name":"excludeRoleId","in":"query","required":false,"schema":{"type":"string"}},{"name":"excludeOrganizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"isThirdParty","in":"query","required":false,"schema":{"oneOf":[{"type":"string","format":"\"true\""},{"type":"string","format":"\"false\""}]}},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}},{"name":"search_params","in":"query","description":"Search query parameters.","required":false,"schema":{"type":"object","additionalProperties":{"type":"string"}},"explode":true}],"responses":{"200":{"description":"A list of applications.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","secret","description","type","oidcClientMetadata","customClientMetadata","protectedAppMetadata","customData","isThirdParty","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"secret":{"$ref":"#/components/schemas/ApplicationLegacySecret"},"description":{"nullable":true,"type":"string"},"type":{"type":"string","enum":["Native","SPA","Traditional","MachineToMachine","Protected"]},"oidcClientMetadata":{"type":"object","required":["redirectUris","postLogoutRedirectUris"],"properties":{"redirectUris":{"type":"array","items":{"oneOf":[{"type":"object","description":"Validator function"},{"type":"object","description":"Validator function"}]}},"postLogoutRedirectUris":{"type":"array","items":{"type":"string","format":"url"}},"backchannelLogoutUri":{"type":"string","format":"url"},"backchannelLogoutSessionRequired":{"type":"boolean"},"logoUri":{"type":"string"}}},"customClientMetadata":{"type":"object","properties":{"corsAllowedOrigins":{"type":"array","items":{"type":"string","minLength":1}},"idTokenTtl":{"type":"number"},"refreshTokenTtl":{"type":"number"},"refreshTokenTtlInDays":{"type":"number"},"tenantId":{"type":"string"},"alwaysIssueRefreshToken":{"type":"boolean"},"rotateRefreshToken":{"type":"boolean"}}},"protectedAppMetadata":{"nullable":true,"type":"object","required":["host","origin","sessionDuration","pageRules"],"properties":{"host":{"type":"string"},"origin":{"type":"string"},"sessionDuration":{"type":"number"},"pageRules":{"type":"array","items":{"type":"object","required":["path"],"properties":{"path":{"type":"string"}}}},"customDomains":{"type":"array","items":{"type":"object","required":["domain","status","errorMessage","dnsRecords","cloudflareData"],"properties":{"domain":{"type":"string"},"status":{"type":"string","enum":["PendingVerification","PendingSsl","Active","Error"]},"errorMessage":{"nullable":true,"type":"string"},"dnsRecords":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}}}},"cloudflareData":{"nullable":true,"type":"object","required":["id","status","ssl"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"ssl":{"type":"object","required":["status"],"properties":{"status":{"type":"string"},"validation_errors":{"type":"array","items":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"verification_errors":{"type":"array","items":{"type":"string"}}}}}}}}},"customData":{"type":"object","description":"arbitrary"},"isThirdParty":{"type":"boolean"},"createdAt":{"type":"number"}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get applications","description":"Get applications that match the given query with pagination."},"post":{"operationId":"CreateApplication","tags":["Applications"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"type":{"type":"string","enum":["Native","SPA","Traditional","MachineToMachine","Protected"]},"oidcClientMetadata":{"type":"object","required":["redirectUris","postLogoutRedirectUris"],"properties":{"redirectUris":{"type":"array","items":{"oneOf":[{"type":"object","description":"Validator function"},{"type":"object","description":"Validator function"}]}},"postLogoutRedirectUris":{"type":"array","items":{"type":"string","format":"url"}},"backchannelLogoutUri":{"type":"string","format":"url"},"backchannelLogoutSessionRequired":{"type":"boolean"},"logoUri":{"type":"string"}}},"customClientMetadata":{"type":"object","properties":{"corsAllowedOrigins":{"type":"array","items":{"type":"string","minLength":1}},"idTokenTtl":{"type":"number"},"refreshTokenTtl":{"type":"number"},"refreshTokenTtlInDays":{"type":"number"},"tenantId":{"type":"string"},"alwaysIssueRefreshToken":{"type":"boolean"},"rotateRefreshToken":{"type":"boolean"}}},"customData":{"type":"object","description":"arbitrary"},"isThirdParty":{"type":"boolean"},"protectedAppMetadata":{"type":"object","required":["subDomain","origin"],"properties":{"subDomain":{"type":"string","description":"The subdomain prefix, e.g., my-site."},"origin":{"type":"string","description":"The origin of target website, e.g., https://example.com."}},"description":"The data for protected app, this feature is not available for open source version."}}}}}},"responses":{"200":{"description":"The application was created successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","secret","description","type","oidcClientMetadata","customClientMetadata","protectedAppMetadata","customData","isThirdParty","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"secret":{"$ref":"#/components/schemas/ApplicationLegacySecret"},"description":{"nullable":true,"type":"string"},"type":{"type":"string","enum":["Native","SPA","Traditional","MachineToMachine","Protected"]},"oidcClientMetadata":{"type":"object","required":["redirectUris","postLogoutRedirectUris"],"properties":{"redirectUris":{"type":"array","items":{"oneOf":[{"type":"object","description":"Validator function"},{"type":"object","description":"Validator function"}]}},"postLogoutRedirectUris":{"type":"array","items":{"type":"string","format":"url"}},"backchannelLogoutUri":{"type":"string","format":"url"},"backchannelLogoutSessionRequired":{"type":"boolean"},"logoUri":{"type":"string"}}},"customClientMetadata":{"type":"object","properties":{"corsAllowedOrigins":{"type":"array","items":{"type":"string","minLength":1}},"idTokenTtl":{"type":"number"},"refreshTokenTtl":{"type":"number"},"refreshTokenTtlInDays":{"type":"number"},"tenantId":{"type":"string"},"alwaysIssueRefreshToken":{"type":"boolean"},"rotateRefreshToken":{"type":"boolean"}}},"protectedAppMetadata":{"nullable":true,"type":"object","required":["host","origin","sessionDuration","pageRules"],"properties":{"host":{"type":"string"},"origin":{"type":"string"},"sessionDuration":{"type":"number"},"pageRules":{"type":"array","items":{"type":"object","required":["path"],"properties":{"path":{"type":"string"}}}},"customDomains":{"type":"array","items":{"type":"object","required":["domain","status","errorMessage","dnsRecords","cloudflareData"],"properties":{"domain":{"type":"string"},"status":{"type":"string","enum":["PendingVerification","PendingSsl","Active","Error"]},"errorMessage":{"nullable":true,"type":"string"},"dnsRecords":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}}}},"cloudflareData":{"nullable":true,"type":"object","required":["id","status","ssl"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"ssl":{"type":"object","required":["status"],"properties":{"status":{"type":"string"},"validation_errors":{"type":"array","items":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"verification_errors":{"type":"array","items":{"type":"string"}}}}}}}}},"customData":{"type":"object","description":"arbitrary"},"isThirdParty":{"type":"boolean"},"createdAt":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Validation error. Please check the request body."},"500":{"description":"Internal Server Error"}},"summary":"Create an application","description":"Create a new application with the given data."}},"/api/applications/{id}":{"get":{"operationId":"GetApplication","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"}],"responses":{"200":{"description":"Details of the application.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","secret","description","type","oidcClientMetadata","customClientMetadata","protectedAppMetadata","customData","isThirdParty","createdAt","isAdmin"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"secret":{"$ref":"#/components/schemas/ApplicationLegacySecret"},"description":{"nullable":true,"type":"string"},"type":{"type":"string","enum":["Native","SPA","Traditional","MachineToMachine","Protected"]},"oidcClientMetadata":{"type":"object","required":["redirectUris","postLogoutRedirectUris"],"properties":{"redirectUris":{"type":"array","items":{"oneOf":[{"type":"object","description":"Validator function"},{"type":"object","description":"Validator function"}]}},"postLogoutRedirectUris":{"type":"array","items":{"type":"string","format":"url"}},"backchannelLogoutUri":{"type":"string","format":"url"},"backchannelLogoutSessionRequired":{"type":"boolean"},"logoUri":{"type":"string"}}},"customClientMetadata":{"type":"object","properties":{"corsAllowedOrigins":{"type":"array","items":{"type":"string","minLength":1}},"idTokenTtl":{"type":"number"},"refreshTokenTtl":{"type":"number"},"refreshTokenTtlInDays":{"type":"number"},"tenantId":{"type":"string"},"alwaysIssueRefreshToken":{"type":"boolean"},"rotateRefreshToken":{"type":"boolean"}}},"protectedAppMetadata":{"nullable":true,"type":"object","required":["host","origin","sessionDuration","pageRules"],"properties":{"host":{"type":"string"},"origin":{"type":"string"},"sessionDuration":{"type":"number"},"pageRules":{"type":"array","items":{"type":"object","required":["path"],"properties":{"path":{"type":"string"}}}},"customDomains":{"type":"array","items":{"type":"object","required":["domain","status","errorMessage","dnsRecords","cloudflareData"],"properties":{"domain":{"type":"string"},"status":{"type":"string","enum":["PendingVerification","PendingSsl","Active","Error"]},"errorMessage":{"nullable":true,"type":"string"},"dnsRecords":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}}}},"cloudflareData":{"nullable":true,"type":"object","required":["id","status","ssl"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"ssl":{"type":"object","required":["status"],"properties":{"status":{"type":"string"},"validation_errors":{"type":"array","items":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"verification_errors":{"type":"array","items":{"type":"string"}}}}}}}}},"customData":{"type":"object","description":"arbitrary"},"isThirdParty":{"type":"boolean"},"createdAt":{"type":"number"},"isAdmin":{"type":"boolean"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The application with the specified ID was not found."}},"summary":"Get application","description":"Get application details by ID."},"patch":{"operationId":"UpdateApplication","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"oidcClientMetadata":{"type":"object","required":["redirectUris","postLogoutRedirectUris"],"properties":{"redirectUris":{"type":"array","items":{"oneOf":[{"type":"object","description":"Validator function"},{"type":"object","description":"Validator function"}]}},"postLogoutRedirectUris":{"type":"array","items":{"type":"string","format":"url"}},"backchannelLogoutUri":{"type":"string","format":"url"},"backchannelLogoutSessionRequired":{"type":"boolean"},"logoUri":{"type":"string"}}},"customClientMetadata":{"type":"object","properties":{"corsAllowedOrigins":{"type":"array","items":{"type":"string","minLength":1}},"idTokenTtl":{"type":"number"},"refreshTokenTtl":{"type":"number"},"refreshTokenTtlInDays":{"type":"number"},"tenantId":{"type":"string"},"alwaysIssueRefreshToken":{"type":"boolean"},"rotateRefreshToken":{"type":"boolean"}}},"customData":{"type":"object","description":"arbitrary"},"protectedAppMetadata":{"type":"object","properties":{"origin":{"type":"string"},"sessionDuration":{"type":"number"},"pageRules":{"type":"array","items":{"type":"object","required":["path"],"properties":{"path":{"type":"string"}}}}}},"isAdmin":{"type":"boolean","description":"Whether the application has admin access. User can enable the admin access for Machine-to-Machine apps."}}}}}},"responses":{"200":{"description":"The application was updated successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","secret","description","type","oidcClientMetadata","customClientMetadata","protectedAppMetadata","customData","isThirdParty","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"secret":{"$ref":"#/components/schemas/ApplicationLegacySecret"},"description":{"nullable":true,"type":"string"},"type":{"type":"string","enum":["Native","SPA","Traditional","MachineToMachine","Protected"]},"oidcClientMetadata":{"type":"object","required":["redirectUris","postLogoutRedirectUris"],"properties":{"redirectUris":{"type":"array","items":{"oneOf":[{"type":"object","description":"Validator function"},{"type":"object","description":"Validator function"}]}},"postLogoutRedirectUris":{"type":"array","items":{"type":"string","format":"url"}},"backchannelLogoutUri":{"type":"string","format":"url"},"backchannelLogoutSessionRequired":{"type":"boolean"},"logoUri":{"type":"string"}}},"customClientMetadata":{"type":"object","properties":{"corsAllowedOrigins":{"type":"array","items":{"type":"string","minLength":1}},"idTokenTtl":{"type":"number"},"refreshTokenTtl":{"type":"number"},"refreshTokenTtlInDays":{"type":"number"},"tenantId":{"type":"string"},"alwaysIssueRefreshToken":{"type":"boolean"},"rotateRefreshToken":{"type":"boolean"}}},"protectedAppMetadata":{"nullable":true,"type":"object","required":["host","origin","sessionDuration","pageRules"],"properties":{"host":{"type":"string"},"origin":{"type":"string"},"sessionDuration":{"type":"number"},"pageRules":{"type":"array","items":{"type":"object","required":["path"],"properties":{"path":{"type":"string"}}}},"customDomains":{"type":"array","items":{"type":"object","required":["domain","status","errorMessage","dnsRecords","cloudflareData"],"properties":{"domain":{"type":"string"},"status":{"type":"string","enum":["PendingVerification","PendingSsl","Active","Error"]},"errorMessage":{"nullable":true,"type":"string"},"dnsRecords":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}}}},"cloudflareData":{"nullable":true,"type":"object","required":["id","status","ssl"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"ssl":{"type":"object","required":["status"],"properties":{"status":{"type":"string"},"validation_errors":{"type":"array","items":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"verification_errors":{"type":"array","items":{"type":"string"}}}}}}}}},"customData":{"type":"object","description":"arbitrary"},"isThirdParty":{"type":"boolean"},"createdAt":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The application with the specified ID was not found."},"422":{"description":"Validation error. Please check the request body."},"500":{"description":"Internal server error."}},"summary":"Update application","description":"Update application details by ID with the given data."},"delete":{"operationId":"DeleteApplication","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"}],"responses":{"204":{"description":"The application was deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The application with the specified ID was not found."},"422":{"description":"Unprocessable Content"}},"summary":"Delete application","description":"Delete application by ID."}},"/api/applications/{applicationId}/custom-data":{"patch":{"operationId":"UpdateApplicationCustomData","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"An arbitrary JSON object."}}}},"responses":{"200":{"description":"The updated custom data in JSON.","content":{"application/json":{"schema":{"type":"object","description":"arbitrary"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Update application custom data","description":"Update the custom data of an application."}},"/api/applications/{applicationId}/roles":{"get":{"operationId":"ListApplicationRoles","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}},{"name":"search_params","in":"query","description":"Search query parameters.","required":false,"schema":{"type":"object","additionalProperties":{"type":"string"}},"explode":true}],"responses":{"200":{"description":"An array of API resource roles assigned to the application.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description","type","isDefault"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":128},"type":{"type":"string","enum":["User","MachineToMachine"]},"isDefault":{"type":"boolean"}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Get application API resource roles","description":"Get API resource roles assigned to the specified application with pagination."},"post":{"operationId":"AssignApplicationRoles","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["roleIds"],"properties":{"roleIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of API resource role IDs to assign."}}}}}},"responses":{"201":{"description":"The API resource roles have been assigned to the application successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Assign API resource roles to application","description":"Assign API resource roles to the specified application. The API resource roles will be added to the existing API resource roles."},"put":{"operationId":"ReplaceApplicationRoles","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["roleIds"],"properties":{"roleIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of API resource role IDs to update for the application."}}}}}},"responses":{"200":{"description":"The API resource roles have been updated for the application successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Update API resource roles for application","description":"Update API resource roles assigned to the specified application. This will replace the existing API resource roles."}},"/api/applications/{applicationId}/roles/{roleId}":{"delete":{"operationId":"DeleteApplicationRole","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId"},{"$ref":"#/components/parameters/roleId"}],"responses":{"204":{"description":"The API resource role has been removed from the application successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Remove a API resource role from application","description":"Remove a API resource role from the specified application."}},"/api/applications/{id}/protected-app-metadata/custom-domains":{"get":{"operationId":"ListApplicationProtectedAppMetadataCustomDomains","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"}],"responses":{"200":{"description":"An array of the application custom domains.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["domain","status","errorMessage","dnsRecords","cloudflareData"],"properties":{"domain":{"type":"string"},"status":{"type":"string","enum":["PendingVerification","PendingSsl","Active","Error"]},"errorMessage":{"nullable":true,"type":"string"},"dnsRecords":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}}}},"cloudflareData":{"nullable":true,"type":"object","required":["id","status","ssl"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"ssl":{"type":"object","required":["status"],"properties":{"status":{"type":"string"},"validation_errors":{"type":"array","items":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"verification_errors":{"type":"array","items":{"type":"string"}}}}}}}}}},"400":{"description":"Faild to sync the domain info from remote provider."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"501":{"description":"Not Implemented"}},"summary":"Get application custom domains.","description":"Get custom domains of the specified application, the application type should be protected app."},"post":{"operationId":"CreateApplicationProtectedAppMetadataCustomDomain","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","description":"The domain to be added to the application."}}}}}},"responses":{"201":{"description":"The domain has been added to the application.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"409":{"description":"The domain already exists."},"422":{"description":"Exeeded the maximum number of domains allowed or the domain is invalid."},"501":{"description":"Not Implemented"}},"summary":"Add a custom domain to the application.","description":"Add a custom domain to the application. You'll need to setup DNS record later."}},"/api/applications/{id}/protected-app-metadata/custom-domains/{domain}":{"delete":{"operationId":"DeleteApplicationProtectedAppMetadataCustomDomain","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"},{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The domain has been removed."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Can not find the domain."},"501":{"description":"Not Implemented"}},"summary":"Remove custom domain.","description":"Remove custom domain from the specified application."}},"/api/applications/{id}/organizations":{"get":{"operationId":"ListApplicationOrganizations","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"An array of organizations that the application is associated with.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description","customData","isMfaRequired","branding","createdAt","organizationRoles"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"customData":{"type":"object","description":"arbitrary"},"isMfaRequired":{"type":"boolean"},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"createdAt":{"type":"number"},"organizationRoles":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get application organizations","description":"Get the list of organizations that an application is associated with."}},"/api/applications/{id}/legacy-secret":{"delete":{"operationId":"DeleteApplicationLegacySecret","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","secret","description","type","oidcClientMetadata","customClientMetadata","protectedAppMetadata","customData","isThirdParty","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"secret":{"type":"string","minLength":1,"maxLength":64},"description":{"nullable":true,"type":"string"},"type":{"type":"string","enum":["Native","SPA","Traditional","MachineToMachine","Protected"]},"oidcClientMetadata":{"type":"object","required":["redirectUris","postLogoutRedirectUris"],"properties":{"redirectUris":{"type":"array","items":{"oneOf":[{"type":"object","description":"Validator function"},{"type":"object","description":"Validator function"}]}},"postLogoutRedirectUris":{"type":"array","items":{"type":"string","format":"url"}},"backchannelLogoutUri":{"type":"string","format":"url"},"backchannelLogoutSessionRequired":{"type":"boolean"},"logoUri":{"type":"string"}}},"customClientMetadata":{"type":"object","properties":{"corsAllowedOrigins":{"type":"array","items":{"type":"string","minLength":1}},"idTokenTtl":{"type":"number"},"refreshTokenTtl":{"type":"number"},"refreshTokenTtlInDays":{"type":"number"},"tenantId":{"type":"string"},"alwaysIssueRefreshToken":{"type":"boolean"},"rotateRefreshToken":{"type":"boolean"}}},"protectedAppMetadata":{"nullable":true,"type":"object","required":["host","origin","sessionDuration","pageRules"],"properties":{"host":{"type":"string"},"origin":{"type":"string"},"sessionDuration":{"type":"number"},"pageRules":{"type":"array","items":{"type":"object","required":["path"],"properties":{"path":{"type":"string"}}}},"customDomains":{"type":"array","items":{"type":"object","required":["domain","status","errorMessage","dnsRecords","cloudflareData"],"properties":{"domain":{"type":"string"},"status":{"type":"string","enum":["PendingVerification","PendingSsl","Active","Error"]},"errorMessage":{"nullable":true,"type":"string"},"dnsRecords":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}}}},"cloudflareData":{"nullable":true,"type":"object","required":["id","status","ssl"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"ssl":{"type":"object","required":["status"],"properties":{"status":{"type":"string"},"validation_errors":{"type":"array","items":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"verification_errors":{"type":"array","items":{"type":"string"}}}}}}}}},"customData":{"type":"object","description":"arbitrary"},"isThirdParty":{"type":"boolean"},"createdAt":{"type":"number"}}}}}},"204":{"description":"The legacy secret was deleted successfully."},"400":{"description":"The application does not have a legacy secret."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Delete application legacy secret","description":"Delete the legacy secret for the application and replace it with a new internal secret.\n\nNote: This operation does not \"really\" delete the legacy secret because it is still needed for internal validation. We may remove the display of the legacy secret (the `secret` field in the application response) in the future."}},"/api/applications/{id}/secrets":{"get":{"operationId":"ListApplicationSecrets","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"}],"responses":{"200":{"description":"A list of secrets.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","applicationId","name","value","createdAt","expiresAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"applicationId":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"value":{"type":"string","minLength":1,"maxLength":64},"createdAt":{"type":"number"},"expiresAt":{"nullable":true,"type":"number"}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get application secrets","description":"Get all the secrets for the application."},"post":{"operationId":"CreateApplicationSecret","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":256,"description":"The secret name. Must be unique within the application."},"expiresAt":{"nullable":true,"type":"number","description":"The epoch time in milliseconds when the secret will expire. If not provided, the secret will never expire."}}}}}},"responses":{"201":{"description":"The secret was added successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","applicationId","name","value","createdAt","expiresAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"applicationId":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"value":{"type":"string","minLength":1,"maxLength":64},"createdAt":{"type":"number"},"expiresAt":{"nullable":true,"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The secret name is already in use."}},"summary":"Add application secret","description":"Add a new secret for the application."}},"/api/applications/{id}/secrets/{name}":{"delete":{"operationId":"DeleteApplicationSecret","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"},{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"The name of the secret."}],"responses":{"204":{"description":"The secret was deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Delete application secret","description":"Delete a secret for the application by name."},"patch":{"operationId":"UpdateApplicationSecret","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"},{"name":"name","in":"path","required":true,"schema":{"type":"string"},"description":"The name of the secret."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":256,"description":"The secret name to update. Must be unique within the application."}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["tenantId","applicationId","name","value","createdAt","expiresAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"applicationId":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"value":{"type":"string","minLength":1,"maxLength":64},"createdAt":{"type":"number"},"expiresAt":{"nullable":true,"type":"number"}}}}}},"204":{"description":"The secret was updated successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Update application secret","description":"Update a secret for the application by name."}},"/api/applications/{applicationId}/user-consent-scopes":{"post":{"operationId":"CreateApplicationUserConsentScope","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationScopes":{"type":"array","items":{"type":"string"},"description":"A list of organization scope id to assign to the application. Throws error if any given organization scope is not found."},"resourceScopes":{"type":"array","items":{"type":"string"},"description":"A list of resource scope id to assign to the application. Throws error if any given resource scope is not found."},"organizationResourceScopes":{"type":"array","items":{"type":"string"},"description":"A list of organization resource scope id to assign to the application. Throws error if any given resource scope is not found."},"userScopes":{"type":"array","items":{"type":"string","enum":["profile","email","phone","address","custom_data","identities","roles","urn:logto:scope:organizations","urn:logto:scope:organization_roles"]},"description":"A list of user scope enum value to assign to the application."}}}}}},"responses":{"201":{"description":"All the user consent scopes are assigned to the application successfully","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The application is not found"},"422":{"description":"Any of the given organization scope, resource scope or user scope is not found"}},"summary":"Assign user consent scopes to application.","description":"Assign the user consent scopes to an application by application id"},"get":{"operationId":"ListApplicationUserConsentScopes","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId"}],"responses":{"200":{"description":"All the user consent scopes of the application are listed successfully","content":{"application/json":{"schema":{"type":"object","required":["organizationScopes","resourceScopes","organizationResourceScopes","userScopes"],"properties":{"organizationScopes":{"type":"array","items":{"type":"object","required":["id","name","description"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256}}},"description":"A list of organization scope details assigned to the application."},"resourceScopes":{"type":"array","items":{"type":"object","required":["resource","scopes"],"properties":{"resource":{"type":"object","required":["id","name","indicator"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1}}},"scopes":{"type":"array","items":{"type":"object","required":["id","name","description"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"}}}}}},"description":"A list of resource scope details grouped by resource id assigned to the application."},"organizationResourceScopes":{"type":"array","items":{"type":"object","required":["resource","scopes"],"properties":{"resource":{"type":"object","required":["id","name","indicator"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1}}},"scopes":{"type":"array","items":{"type":"object","required":["id","name","description"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"}}}}}},"description":"A list of organization resource scope details grouped by resource id assigned to the application."},"userScopes":{"type":"array","items":{"type":"string","enum":["profile","email","phone","address","custom_data","identities","roles","urn:logto:scope:organizations","urn:logto:scope:organization_roles"]},"description":"A list of user scope enum value assigned to the application."}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The application is not found"}},"summary":"List all the user consent scopes of an application.","description":"List all the user consent scopes of an application by application id"}},"/api/applications/{applicationId}/user-consent-scopes/{scopeType}/{scopeId}":{"delete":{"operationId":"DeleteApplicationUserConsentScope","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId"},{"name":"scopeType","in":"path","required":true,"schema":{"type":"string","enum":["organization-scopes","resource-scopes","organization-resource-scopes","user-scopes"]}},{"$ref":"#/components/parameters/scopeId"}],"responses":{"204":{"description":"The user consent scope is removed from the application successfully"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The application or scope is not found"}},"summary":"Remove user consent scope from application.","description":"Remove the user consent scope from an application by application id, scope type and scope id"}},"/api/applications/{applicationId}/sign-in-experience":{"put":{"operationId":"ReplaceApplicationSignInExperience","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["termsOfUseUrl","privacyPolicyUrl"],"properties":{"color":{"type":"object","properties":{"primaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"},"isDarkModeEnabled":{"type":"boolean"},"darkPrimaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"}}},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"displayName":{"nullable":true,"type":"string","maxLength":256},"termsOfUseUrl":{"oneOf":[{"nullable":true,"type":"string","format":"url","maxLength":2048},{"type":"string","format":"empty"}]},"privacyPolicyUrl":{"oneOf":[{"nullable":true,"type":"string","format":"url","maxLength":2048},{"type":"string","format":"empty"}]}}}}}},"responses":{"200":{"description":"The application's sign-in experience was successfully updated.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","applicationId","color","branding","termsOfUseUrl","privacyPolicyUrl","displayName"],"properties":{"tenantId":{"type":"string","maxLength":21},"applicationId":{"type":"string","minLength":1,"maxLength":21},"color":{"type":"object","properties":{"primaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"},"isDarkModeEnabled":{"type":"boolean"},"darkPrimaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"}}},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"termsOfUseUrl":{"nullable":true,"type":"string","maxLength":2048},"privacyPolicyUrl":{"nullable":true,"type":"string","maxLength":2048},"displayName":{"nullable":true,"type":"string","maxLength":256}}}}}},"201":{"description":"A new application level sign-in experience settings was successfully created.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","applicationId","color","branding","termsOfUseUrl","privacyPolicyUrl","displayName"],"properties":{"tenantId":{"type":"string","maxLength":21},"applicationId":{"type":"string","minLength":1,"maxLength":21},"color":{"type":"object","properties":{"primaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"},"isDarkModeEnabled":{"type":"boolean"},"darkPrimaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"}}},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"termsOfUseUrl":{"nullable":true,"type":"string","maxLength":2048},"privacyPolicyUrl":{"nullable":true,"type":"string","maxLength":2048},"displayName":{"nullable":true,"type":"string","maxLength":256}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The application does not exist."},"422":{"description":"Unprocessable Content"}},"summary":"Update application level sign-in experience","description":"Update application level sign-in experience for the specified application. Create a new sign-in experience if it does not exist. \n - Only branding properties and terms links customization is supported for now. \n\n - Only third-party applications can be customized for now. \n\n - Application level sign-in experience customization is optional, if provided, it will override the default branding and terms links."},"get":{"operationId":"GetApplicationSignInExperience","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId"}],"responses":{"200":{"description":"Returns the application's application level sign-in experience.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","applicationId","color","branding","termsOfUseUrl","privacyPolicyUrl","displayName"],"properties":{"tenantId":{"type":"string","maxLength":21},"applicationId":{"type":"string","minLength":1,"maxLength":21},"color":{"type":"object","properties":{"primaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"},"isDarkModeEnabled":{"type":"boolean"},"darkPrimaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"}}},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"termsOfUseUrl":{"nullable":true,"type":"string","maxLength":2048},"privacyPolicyUrl":{"nullable":true,"type":"string","maxLength":2048},"displayName":{"nullable":true,"type":"string","maxLength":256}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The application does not exist or the application level sign-in experience does not exist."}},"summary":"Get the application level sign-in experience","description":"Get application level sign-in experience for a given application. \n - Only branding properties and terms links customization is supported for now. \n\n - Only third-party applications can have the sign-in experience customization for now."}},"/api/applications/{id}/users/{userId}/consent-organizations":{"get":{"operationId":"ListApplicationUserConsentOrganizations","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"},{"$ref":"#/components/parameters/userId"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"List of organization entities granted by the user for the application.","content":{"application/json":{"schema":{"type":"object","required":["organizations"],"properties":{"organizations":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description","customData","isMfaRequired","branding","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"customData":{"type":"object","description":"arbitrary"},"isMfaRequired":{"type":"boolean"},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"createdAt":{"type":"number"}}},"description":"A list of organization entities granted by the user for the application."}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"List all the user consented organizations of a application.","description":"List all the user consented organizations for a application by application id and user id."},"put":{"operationId":"ReplaceApplicationUserConsentOrganizations","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"},{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationIds"],"properties":{"organizationIds":{"type":"array","items":{"type":"string","minLength":1},"description":"A list of organization ids to be granted. <br/> All the existing organizations' access will be revoked if not in the list. <br/> If the list is empty, all the organizations' access will be revoked."}}}}}},"responses":{"204":{"description":"All the request organizations's access are granted to the user for the application. "},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The application or user is not found."},"422":{"description":"The user is not a member of one of the organizations, or the application is not a third-party application."}},"summary":"Grant a list of organization access of a user for a application.","description":"Grant a list of organization access of a user for a application by application id and user id. <br/> The user must be a member of all the organizations. <br/> Only third-party application needs to be granted access to organizations, all the other applications can request for all the organizations' access by default."},"post":{"operationId":"CreateApplicationUserConsentOrganization","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"},{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationIds"],"properties":{"organizationIds":{"type":"array","items":{"type":"string","minLength":1},"description":"A list of organization ids to be granted."}}}}}},"responses":{"201":{"description":"All the request organizations's access are granted to the user for the application.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The application or user is not found."},"422":{"description":"The user is not a member of one of the organizations, or the application is not a third-party application."}},"summary":"Grant a list of organization access of a user for a application.","description":"Grant a list of organization access of a user for a application by application id and user id. <br/> The user must be a member of all the organizations. <br/> Only third-party application needs to be granted access to organizations, all the other applications can request for all the organizations' access by default."}},"/api/applications/{id}/users/{userId}/consent-organizations/{organizationId}":{"delete":{"operationId":"DeleteApplicationUserConsentOrganization","tags":["Applications"],"parameters":[{"$ref":"#/components/parameters/applicationId-root"},{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organizationId"}],"responses":{"204":{"description":"The user's access to the organization is revoked for the application."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The application, user or organization is not found."},"422":{"description":"Unprocessable Content"}},"summary":"Revoke a user's access to an organization for a application.","description":"Revoke a user's access to an organization for a application by application id, user id and organization id."}},"/api/configs/admin-console":{"get":{"operationId":"GetAdminConsoleConfig","tags":["Configs"],"parameters":[],"responses":{"200":{"description":"The configuration object.","content":{"application/json":{"schema":{"type":"object","required":["signInExperienceCustomized","organizationCreated"],"properties":{"signInExperienceCustomized":{"type":"boolean"},"organizationCreated":{"type":"boolean"},"developmentTenantMigrationNotification":{"type":"object","required":["isPaidTenant","tag"],"properties":{"isPaidTenant":{"type":"boolean"},"tag":{"type":"string"},"readAt":{"type":"number"}}},"checkedChargeNotification":{"type":"object","properties":{"token":{"type":"boolean"},"apiResource":{"type":"boolean"},"machineToMachineApp":{"type":"boolean"},"tenantMember":{"type":"boolean"}}}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Configuration not found."}},"summary":"Get admin console config","description":"Get the global configuration object for Logto Console."},"patch":{"operationId":"UpdateAdminConsoleConfig","tags":["Configs"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signInExperienceCustomized":{"type":"boolean"},"organizationCreated":{"type":"boolean"},"developmentTenantMigrationNotification":{"type":"object","required":["isPaidTenant","tag"],"properties":{"isPaidTenant":{"type":"boolean"},"tag":{"type":"string"},"readAt":{"type":"number"}}},"checkedChargeNotification":{"type":"object","properties":{"token":{"type":"boolean"},"apiResource":{"type":"boolean"},"machineToMachineApp":{"type":"boolean"},"tenantMember":{"type":"boolean"}}}}}}}},"responses":{"200":{"description":"The updated configuration object.","content":{"application/json":{"schema":{"type":"object","required":["signInExperienceCustomized","organizationCreated"],"properties":{"signInExperienceCustomized":{"type":"boolean"},"organizationCreated":{"type":"boolean"},"developmentTenantMigrationNotification":{"type":"object","required":["isPaidTenant","tag"],"properties":{"isPaidTenant":{"type":"boolean"},"tag":{"type":"string"},"readAt":{"type":"number"}}},"checkedChargeNotification":{"type":"object","properties":{"token":{"type":"boolean"},"apiResource":{"type":"boolean"},"machineToMachineApp":{"type":"boolean"},"tenantMember":{"type":"boolean"}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Configuration not found."}},"summary":"Update admin console config","description":"Update the global configuration object for Logto Console. This method performs a partial update."}},"/api/configs/oidc/{keyType}":{"get":{"operationId":"GetOidcKeys","tags":["Configs"],"parameters":[{"name":"keyType","in":"path","required":true,"schema":{"type":"string","enum":["private-keys","cookie-keys"]},"description":"Private keys are used to sign OIDC JWTs. Cookie keys are used to sign OIDC cookies. For clients, they do not need to know private keys to verify OIDC JWTs; they can use public keys from the JWKS endpoint instead."}],"responses":{"200":{"description":"An array of OIDC signing keys for the given key type.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["id","createdAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"signingKeyAlgorithm":{"type":"string","enum":["RSA","EC"]}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get OIDC keys","description":"Get OIDC signing keys by key type. The actual key will be redacted from the result."}},"/api/configs/oidc/{keyType}/{keyId}":{"delete":{"operationId":"DeleteOidcKey","tags":["Configs"],"parameters":[{"name":"keyType","in":"path","required":true,"schema":{"type":"string","enum":["private-keys","cookie-keys"]},"description":"Private keys are used to sign OIDC JWTs. Cookie keys are used to sign OIDC cookies. For clients, they do not need to know private keys to verify OIDC JWTs; they can use public keys from the JWKS endpoint instead."},{"$ref":"#/components/parameters/keyId"}],"responses":{"204":{"description":"The key was deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The key was not found."},"422":{"description":"At least one key must be kept."}},"summary":"Delete OIDC key","description":"Delete an OIDC signing key by key type and key ID."}},"/api/configs/oidc/{keyType}/rotate":{"post":{"operationId":"RotateOidcKeys","tags":["Configs"],"parameters":[{"name":"keyType","in":"path","required":true,"schema":{"type":"string","enum":["private-keys","cookie-keys"]},"description":"Private keys are used to sign OIDC JWTs. Cookie keys are used to sign OIDC cookies. For clients, they do not need to know private keys to verify OIDC JWTs; they can use public keys from the JWKS endpoint instead."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signingKeyAlgorithm":{"type":"string","enum":["RSA","EC"],"description":"The signing key algorithm the new generated private key is using.\n\nOnly applicable when `keyType` is `private-keys`."}}}}}},"responses":{"200":{"description":"An array of OIDC signing keys after rotation.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["id","createdAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"signingKeyAlgorithm":{"type":"string","enum":["RSA","EC"]}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Unprocessable Content"}},"summary":"Rotate OIDC keys","description":"A new key will be generated and prepend to the list of keys.\n\nOnly two recent keys will be kept. The oldest key will be automatically removed if there are more than two keys."}},"/api/configs/jwt-customizer/{tokenTypePath}":{"put":{"operationId":"UpsertJwtCustomizer","tags":["Configs"],"parameters":[{"name":"tokenTypePath","in":"path","required":true,"schema":{"type":"string","enum":["access-token","client-credentials"]},"description":"The token type to create a JWT customizer for."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"example":{},"properties":{"script":{"description":"The script of the JWT customizer."},"environmentVariables":{"description":"The environment variables for the JWT customizer."},"contextSample":{"description":"The sample context for the JWT customizer script testing purpose."},"tokenSample":{"description":"The sample raw token payload for the JWT customizer script testing purpose."}}}}}},"responses":{"200":{"description":"The updated JWT customizer.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["script"],"properties":{"script":{"type":"string"},"environmentVariables":{"type":"object","additionalProperties":{"type":"string"}},"contextSample":{"type":"object","required":["user"],"properties":{"user":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["issuer","identityId","detail"],"properties":{"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"}}}},"mfaVerificationFactors":{"type":"array","items":{"type":"string","enum":["Totp","WebAuthn","BackupCode"]}},"roles":{"type":"array","items":{"type":"object","required":["id","name","description","scopes"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":128},"scopes":{"type":"array","items":{"type":"object","required":["id","name","description","resourceId","resource"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"resourceId":{"type":"string","minLength":1,"maxLength":21},"resource":{"type":"object","required":["tenantId","id","name","indicator","isDefault","accessTokenTtl"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"accessTokenTtl":{"type":"number"}}}}}}}}},"organizations":{"type":"array","items":{"type":"object","required":["id","name","description"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256}}}},"organizationRoles":{"type":"array","items":{"type":"object","required":["organizationId","roleId","roleName"],"properties":{"organizationId":{"type":"string"},"roleId":{"type":"string"},"roleName":{"type":"string"}}}}}},"grant":{"type":"object","properties":{"type":{"type":"string","format":"\"urn:ietf:params:oauth:grant-type:token-exchange\""},"subjectTokenContext":{"type":"object","description":"arbitrary"}}}}},"tokenSample":{"type":"object","properties":{"jti":{"type":"string"},"aud":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"scope":{"type":"string"},"clientId":{"type":"string"},"accountId":{"type":"string"},"expiresWithSession":{"type":"boolean"},"grantId":{"type":"string"},"gty":{"type":"string"},"sessionUid":{"type":"string"},"sid":{"type":"string"},"kind":{"type":"string","format":"\"AccessToken\""}}}}},{"type":"object","required":["script"],"properties":{"script":{"type":"string"},"environmentVariables":{"type":"object","additionalProperties":{"type":"string"}},"contextSample":{"type":"object","description":"arbitrary"},"tokenSample":{"type":"object","properties":{"jti":{"type":"string"},"aud":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"scope":{"type":"string"},"clientId":{"type":"string"},"kind":{"type":"string","format":"\"ClientCredentials\""}}}}}]}}}},"201":{"description":"The created JWT customizer.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["script"],"properties":{"script":{"type":"string"},"environmentVariables":{"type":"object","additionalProperties":{"type":"string"}},"contextSample":{"type":"object","required":["user"],"properties":{"user":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["issuer","identityId","detail"],"properties":{"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"}}}},"mfaVerificationFactors":{"type":"array","items":{"type":"string","enum":["Totp","WebAuthn","BackupCode"]}},"roles":{"type":"array","items":{"type":"object","required":["id","name","description","scopes"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":128},"scopes":{"type":"array","items":{"type":"object","required":["id","name","description","resourceId","resource"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"resourceId":{"type":"string","minLength":1,"maxLength":21},"resource":{"type":"object","required":["tenantId","id","name","indicator","isDefault","accessTokenTtl"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"accessTokenTtl":{"type":"number"}}}}}}}}},"organizations":{"type":"array","items":{"type":"object","required":["id","name","description"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256}}}},"organizationRoles":{"type":"array","items":{"type":"object","required":["organizationId","roleId","roleName"],"properties":{"organizationId":{"type":"string"},"roleId":{"type":"string"},"roleName":{"type":"string"}}}}}},"grant":{"type":"object","properties":{"type":{"type":"string","format":"\"urn:ietf:params:oauth:grant-type:token-exchange\""},"subjectTokenContext":{"type":"object","description":"arbitrary"}}}}},"tokenSample":{"type":"object","properties":{"jti":{"type":"string"},"aud":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"scope":{"type":"string"},"clientId":{"type":"string"},"accountId":{"type":"string"},"expiresWithSession":{"type":"boolean"},"grantId":{"type":"string"},"gty":{"type":"string"},"sessionUid":{"type":"string"},"sid":{"type":"string"},"kind":{"type":"string","format":"\"AccessToken\""}}}}},{"type":"object","required":["script"],"properties":{"script":{"type":"string"},"environmentVariables":{"type":"object","additionalProperties":{"type":"string"}},"contextSample":{"type":"object","description":"arbitrary"},"tokenSample":{"type":"object","properties":{"jti":{"type":"string"},"aud":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"scope":{"type":"string"},"clientId":{"type":"string"},"kind":{"type":"string","format":"\"ClientCredentials\""}}}}}]}}}},"400":{"description":"The request body is invalid."},"401":{"description":"Unauthorized"},"403":{"description":"Permission denied."}},"summary":"Create or update JWT customizer","description":"Create or update a JWT customizer for the given token type."},"patch":{"operationId":"UpdateJwtCustomizer","tags":["Configs"],"parameters":[{"name":"tokenTypePath","in":"path","required":true,"schema":{"type":"string","enum":["access-token","client-credentials"]},"description":"The token type to update a JWT customizer for."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"example":{},"properties":{"script":{"description":"The script of the JWT customizer."},"environmentVariables":{"description":"The environment variables for the JWT customizer."},"contextSample":{"description":"The sample context for the JWT customizer script testing purpose."},"tokenSample":{"description":"The sample raw token payload for the JWT customizer script testing purpose."}}}}}},"responses":{"200":{"description":"The updated JWT customizer.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["script"],"properties":{"script":{"type":"string"},"environmentVariables":{"type":"object","additionalProperties":{"type":"string"}},"contextSample":{"type":"object","required":["user"],"properties":{"user":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["issuer","identityId","detail"],"properties":{"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"}}}},"mfaVerificationFactors":{"type":"array","items":{"type":"string","enum":["Totp","WebAuthn","BackupCode"]}},"roles":{"type":"array","items":{"type":"object","required":["id","name","description","scopes"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":128},"scopes":{"type":"array","items":{"type":"object","required":["id","name","description","resourceId","resource"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"resourceId":{"type":"string","minLength":1,"maxLength":21},"resource":{"type":"object","required":["tenantId","id","name","indicator","isDefault","accessTokenTtl"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"accessTokenTtl":{"type":"number"}}}}}}}}},"organizations":{"type":"array","items":{"type":"object","required":["id","name","description"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256}}}},"organizationRoles":{"type":"array","items":{"type":"object","required":["organizationId","roleId","roleName"],"properties":{"organizationId":{"type":"string"},"roleId":{"type":"string"},"roleName":{"type":"string"}}}}}},"grant":{"type":"object","properties":{"type":{"type":"string","format":"\"urn:ietf:params:oauth:grant-type:token-exchange\""},"subjectTokenContext":{"type":"object","description":"arbitrary"}}}}},"tokenSample":{"type":"object","properties":{"jti":{"type":"string"},"aud":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"scope":{"type":"string"},"clientId":{"type":"string"},"accountId":{"type":"string"},"expiresWithSession":{"type":"boolean"},"grantId":{"type":"string"},"gty":{"type":"string"},"sessionUid":{"type":"string"},"sid":{"type":"string"},"kind":{"type":"string","format":"\"AccessToken\""}}}}},{"type":"object","required":["script"],"properties":{"script":{"type":"string"},"environmentVariables":{"type":"object","additionalProperties":{"type":"string"}},"contextSample":{"type":"object","description":"arbitrary"},"tokenSample":{"type":"object","properties":{"jti":{"type":"string"},"aud":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"scope":{"type":"string"},"clientId":{"type":"string"},"kind":{"type":"string","format":"\"ClientCredentials\""}}}}}]}}}},"400":{"description":"The request body is invalid."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Update JWT customizer","description":"Update the JWT customizer for the given token type."},"get":{"operationId":"GetJwtCustomizer","tags":["Configs"],"parameters":[{"name":"tokenTypePath","in":"path","required":true,"schema":{"type":"string","enum":["access-token","client-credentials"]},"description":"The token type to get the JWT customizer for."}],"responses":{"200":{"description":"The JWT customizer.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["script"],"properties":{"script":{"type":"string"},"environmentVariables":{"type":"object","additionalProperties":{"type":"string"}},"contextSample":{"type":"object","required":["user"],"properties":{"user":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["issuer","identityId","detail"],"properties":{"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"}}}},"mfaVerificationFactors":{"type":"array","items":{"type":"string","enum":["Totp","WebAuthn","BackupCode"]}},"roles":{"type":"array","items":{"type":"object","required":["id","name","description","scopes"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":128},"scopes":{"type":"array","items":{"type":"object","required":["id","name","description","resourceId","resource"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"resourceId":{"type":"string","minLength":1,"maxLength":21},"resource":{"type":"object","required":["tenantId","id","name","indicator","isDefault","accessTokenTtl"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"accessTokenTtl":{"type":"number"}}}}}}}}},"organizations":{"type":"array","items":{"type":"object","required":["id","name","description"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256}}}},"organizationRoles":{"type":"array","items":{"type":"object","required":["organizationId","roleId","roleName"],"properties":{"organizationId":{"type":"string"},"roleId":{"type":"string"},"roleName":{"type":"string"}}}}}},"grant":{"type":"object","properties":{"type":{"type":"string","format":"\"urn:ietf:params:oauth:grant-type:token-exchange\""},"subjectTokenContext":{"type":"object","description":"arbitrary"}}}}},"tokenSample":{"type":"object","properties":{"jti":{"type":"string"},"aud":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"scope":{"type":"string"},"clientId":{"type":"string"},"accountId":{"type":"string"},"expiresWithSession":{"type":"boolean"},"grantId":{"type":"string"},"gty":{"type":"string"},"sessionUid":{"type":"string"},"sid":{"type":"string"},"kind":{"type":"string","format":"\"AccessToken\""}}}}},{"type":"object","required":["script"],"properties":{"script":{"type":"string"},"environmentVariables":{"type":"object","additionalProperties":{"type":"string"}},"contextSample":{"type":"object","description":"arbitrary"},"tokenSample":{"type":"object","properties":{"jti":{"type":"string"},"aud":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"scope":{"type":"string"},"clientId":{"type":"string"},"kind":{"type":"string","format":"\"ClientCredentials\""}}}}}]}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The JWT customizer does not exist."}},"summary":"Get JWT customizer","description":"Get the JWT customizer for the given token type."},"delete":{"operationId":"DeleteJwtCustomizer","tags":["Configs"],"parameters":[{"name":"tokenTypePath","in":"path","required":true,"schema":{"type":"string","enum":["access-token","client-credentials"]},"description":"The token type path to delete the JWT customizer for."}],"responses":{"204":{"description":"The JWT customizer was deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The JWT customizer does not exist."}},"summary":"Delete JWT customizer","description":"Delete the JWT customizer for the given token type."}},"/api/configs/jwt-customizer":{"get":{"operationId":"ListJwtCustomizers","tags":["Configs"],"parameters":[],"responses":{"200":{"description":"The JWT customizers.","content":{"application/json":{"schema":{"type":"array","items":{"oneOf":[{"type":"object","required":["key","value"],"properties":{"key":{"type":"string","format":"\"jwt.accessToken\""},"value":{"type":"object","required":["script"],"properties":{"script":{"type":"string"},"environmentVariables":{"type":"object","additionalProperties":{"type":"string"}},"contextSample":{"type":"object","required":["user"],"properties":{"user":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["issuer","identityId","detail"],"properties":{"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"}}}},"mfaVerificationFactors":{"type":"array","items":{"type":"string","enum":["Totp","WebAuthn","BackupCode"]}},"roles":{"type":"array","items":{"type":"object","required":["id","name","description","scopes"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":128},"scopes":{"type":"array","items":{"type":"object","required":["id","name","description","resourceId","resource"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"resourceId":{"type":"string","minLength":1,"maxLength":21},"resource":{"type":"object","required":["tenantId","id","name","indicator","isDefault","accessTokenTtl"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"accessTokenTtl":{"type":"number"}}}}}}}}},"organizations":{"type":"array","items":{"type":"object","required":["id","name","description"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256}}}},"organizationRoles":{"type":"array","items":{"type":"object","required":["organizationId","roleId","roleName"],"properties":{"organizationId":{"type":"string"},"roleId":{"type":"string"},"roleName":{"type":"string"}}}}}},"grant":{"type":"object","properties":{"type":{"type":"string","format":"\"urn:ietf:params:oauth:grant-type:token-exchange\""},"subjectTokenContext":{"type":"object","description":"arbitrary"}}}}},"tokenSample":{"type":"object","properties":{"jti":{"type":"string"},"aud":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"scope":{"type":"string"},"clientId":{"type":"string"},"accountId":{"type":"string"},"expiresWithSession":{"type":"boolean"},"grantId":{"type":"string"},"gty":{"type":"string"},"sessionUid":{"type":"string"},"sid":{"type":"string"},"kind":{"type":"string","format":"\"AccessToken\""}}}}}}},{"type":"object","required":["key","value"],"properties":{"key":{"type":"string","format":"\"jwt.clientCredentials\""},"value":{"type":"object","required":["script"],"properties":{"script":{"type":"string"},"environmentVariables":{"type":"object","additionalProperties":{"type":"string"}},"contextSample":{"type":"object","description":"arbitrary"},"tokenSample":{"type":"object","properties":{"jti":{"type":"string"},"aud":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"scope":{"type":"string"},"clientId":{"type":"string"},"kind":{"type":"string","format":"\"ClientCredentials\""}}}}}}}]}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get all JWT customizers","description":"Get all JWT customizers for the tenant."}},"/api/configs/jwt-customizer/test":{"post":{"operationId":"TestJwtCustomizer","tags":["Configs"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["tokenType","script","token","context"],"properties":{"tokenType":{"type":"string","format":"\"access-token\""},"environmentVariables":{"type":"object","additionalProperties":{"type":"string"}},"script":{"type":"string"},"token":{"type":"object","properties":{"jti":{"type":"string"},"aud":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"scope":{"type":"string"},"clientId":{"type":"string"},"accountId":{"type":"string"},"expiresWithSession":{"type":"boolean"},"grantId":{"type":"string"},"gty":{"type":"string"},"sessionUid":{"type":"string"},"sid":{"type":"string"},"kind":{"type":"string","format":"\"AccessToken\""}}},"context":{"type":"object","required":["user"],"properties":{"user":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["issuer","identityId","detail"],"properties":{"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"}}}},"mfaVerificationFactors":{"type":"array","items":{"type":"string","enum":["Totp","WebAuthn","BackupCode"]}},"roles":{"type":"array","items":{"type":"object","required":["id","name","description","scopes"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":128},"scopes":{"type":"array","items":{"type":"object","required":["id","name","description","resourceId","resource"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"resourceId":{"type":"string","minLength":1,"maxLength":21},"resource":{"type":"object","required":["tenantId","id","name","indicator","isDefault","accessTokenTtl"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"accessTokenTtl":{"type":"number"}}}}}}}}},"organizations":{"type":"array","items":{"type":"object","required":["id","name","description"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256}}}},"organizationRoles":{"type":"array","items":{"type":"object","required":["organizationId","roleId","roleName"],"properties":{"organizationId":{"type":"string"},"roleId":{"type":"string"},"roleName":{"type":"string"}}}}}},"grant":{"type":"object","properties":{"type":{"type":"string","format":"\"urn:ietf:params:oauth:grant-type:token-exchange\""},"subjectTokenContext":{"type":"object","description":"arbitrary"}}}}}}},{"type":"object","required":["tokenType","script","token"],"properties":{"tokenType":{"type":"string","format":"\"client-credentials\""},"environmentVariables":{"type":"object","additionalProperties":{"type":"string"}},"script":{"type":"string"},"token":{"type":"object","properties":{"jti":{"type":"string"},"aud":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"scope":{"type":"string"},"clientId":{"type":"string"},"kind":{"type":"string","format":"\"ClientCredentials\""}}}}}],"properties":{"tokenType":{"description":"The token type to test the JWT customizer for."},"payload":{"properties":{"script":{"description":"The code snippet of the JWT customizer."},"environmentVariables":{"description":"The environment variables for the JWT customizer."},"contextSample":{"description":"The sample context for the JWT customizer script testing purpose."},"tokenSample":{"description":"The sample token payload for the JWT customizer script testing purpose."}}}}}}}},"responses":{"200":{"description":"The result of the JWT customizer script testing.","content":{"application/json":{"schema":{"type":"object","description":"arbitrary"}}}},"400":{"description":"Zod errors in cloud service (data type does not match expectation, can be either request body or response body)."},"401":{"description":"Unauthorized"},"403":{"description":"Cloud connection does not have enough permission to perform the action."},"422":{"description":"Syntax errors in cloud service."}},"summary":"Test JWT customizer","description":"Test the JWT customizer script with the given sample context and sample token payload."}},"/api/connectors":{"post":{"operationId":"CreateConnector","tags":["Connectors"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["connectorId"],"properties":{"config":{"type":"object","description":"The connector config object that will be passed to the connector. The config object should be compatible with the connector factory."},"connectorId":{"type":"string","minLength":1,"maxLength":128,"description":"The connector factory ID for creating the connector."},"metadata":{"type":"object","properties":{"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"}},"description":"Custom connector metadata, will be used to overwrite the default connector factory metadata."},"syncProfile":{"type":"boolean","description":"Whether to sync user profile from the identity provider to Logto at each sign-in. If `false`, the user profile will only be synced when the user is created."},"id":{"type":"string","minLength":1,"maxLength":128,"description":"The unique ID for the connector. If not provided, a random ID will be generated."}}}}}},"responses":{"200":{"description":"The created connector.","content":{"application/json":{"schema":{"type":"object","required":["id","syncProfile","config","metadata","connectorId","target","name","description","logo","logoDark","readme","platform","type"],"properties":{"id":{"type":"string"},"syncProfile":{"type":"boolean"},"config":{"type":"object","description":"arbitrary"},"metadata":{"type":"object","properties":{"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"}}},"connectorId":{"type":"string","minLength":1,"maxLength":128},"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"description":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"},"readme":{"type":"string"},"configTemplate":{"type":"string"},"formItems":{"type":"array","items":{"oneOf":[{"type":"object","required":["type","selectItems","key","label"],"properties":{"type":{"type":"string","format":"\"Select\""},"selectItems":{"type":"array","items":{"type":"object","required":["value","title"],"properties":{"value":{"type":"string"},"title":{"type":"string"}}}},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}},{"type":"object","required":["type","selectItems","key","label"],"properties":{"type":{"type":"string","format":"\"MultiSelect\""},"selectItems":{"type":"array","items":{"type":"object","required":["value"],"properties":{"value":{"type":"string"}}}},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}},{"type":"object","required":["type","key","label"],"properties":{"type":{"type":"string","enum":["Text","Number","MultilineText","Switch","Json"]},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}}]}},"customData":{"type":"object","additionalProperties":{"example":{}}},"fromEmail":{"type":"string"},"platform":{"nullable":true,"type":"string","enum":["Native","Universal","Web"]},"isStandard":{"type":"boolean"},"type":{"type":"string","enum":["Email","Sms","Social"]},"isDemo":{"type":"boolean"},"extraInfo":{"type":"object","additionalProperties":{"example":{}}},"usage":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"The tenant has reached the maximum number of connectors."},"422":{"description":"Invalid request body."}},"summary":"Create connector","description":"Create a connector with the given data."},"get":{"operationId":"ListConnectors","tags":["Connectors"],"parameters":[{"name":"target","in":"query","required":false,"schema":{"type":"string"},"description":"Filter connectors by target."}],"responses":{"200":{"description":"An array of connectors.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["id","syncProfile","config","metadata","connectorId","target","name","description","logo","logoDark","readme","platform","type"],"properties":{"id":{"type":"string"},"syncProfile":{"type":"boolean"},"config":{"type":"object","description":"arbitrary"},"metadata":{"type":"object","properties":{"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"}}},"connectorId":{"type":"string","minLength":1,"maxLength":128},"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"description":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"},"readme":{"type":"string"},"configTemplate":{"type":"string"},"formItems":{"type":"array","items":{"oneOf":[{"type":"object","required":["type","selectItems","key","label"],"properties":{"type":{"type":"string","format":"\"Select\""},"selectItems":{"type":"array","items":{"type":"object","required":["value","title"],"properties":{"value":{"type":"string"},"title":{"type":"string"}}}},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}},{"type":"object","required":["type","selectItems","key","label"],"properties":{"type":{"type":"string","format":"\"MultiSelect\""},"selectItems":{"type":"array","items":{"type":"object","required":["value"],"properties":{"value":{"type":"string"}}}},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}},{"type":"object","required":["type","key","label"],"properties":{"type":{"type":"string","enum":["Text","Number","MultilineText","Switch","Json"]},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}}]}},"customData":{"type":"object","additionalProperties":{"example":{}}},"fromEmail":{"type":"string"},"platform":{"nullable":true,"type":"string","enum":["Native","Universal","Web"]},"isStandard":{"type":"boolean"},"type":{"type":"string","enum":["Email","Sms","Social"]},"isDemo":{"type":"boolean"},"extraInfo":{"type":"object","additionalProperties":{"example":{}}},"usage":{"type":"number"}}}}}}},"400":{"description":"The target only allows one connector to exist, but there are multiple connectors with this target."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get connectors","description":"Get all connectors in the current tenant."}},"/api/connectors/{id}":{"get":{"operationId":"GetConnector","tags":["Connectors"],"parameters":[{"$ref":"#/components/parameters/connectorId-root"}],"responses":{"200":{"description":"The connector data.","content":{"application/json":{"schema":{"type":"object","required":["id","syncProfile","config","metadata","connectorId","target","name","description","logo","logoDark","readme","platform","type"],"properties":{"id":{"type":"string"},"syncProfile":{"type":"boolean"},"config":{"type":"object","description":"arbitrary"},"metadata":{"type":"object","properties":{"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"}}},"connectorId":{"type":"string","minLength":1,"maxLength":128},"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"description":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"},"readme":{"type":"string"},"configTemplate":{"type":"string"},"formItems":{"type":"array","items":{"oneOf":[{"type":"object","required":["type","selectItems","key","label"],"properties":{"type":{"type":"string","format":"\"Select\""},"selectItems":{"type":"array","items":{"type":"object","required":["value","title"],"properties":{"value":{"type":"string"},"title":{"type":"string"}}}},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}},{"type":"object","required":["type","selectItems","key","label"],"properties":{"type":{"type":"string","format":"\"MultiSelect\""},"selectItems":{"type":"array","items":{"type":"object","required":["value"],"properties":{"value":{"type":"string"}}}},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}},{"type":"object","required":["type","key","label"],"properties":{"type":{"type":"string","enum":["Text","Number","MultilineText","Switch","Json"]},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}}]}},"customData":{"type":"object","additionalProperties":{"example":{}}},"fromEmail":{"type":"string"},"platform":{"nullable":true,"type":"string","enum":["Native","Universal","Web"]},"isStandard":{"type":"boolean"},"type":{"type":"string","enum":["Email","Sms","Social"]},"isDemo":{"type":"boolean"},"extraInfo":{"type":"object","additionalProperties":{"example":{}}},"usage":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Connector not found."}},"summary":"Get connector","description":"Get connector data by ID"},"patch":{"operationId":"UpdateConnector","tags":["Connectors"],"parameters":[{"$ref":"#/components/parameters/connectorId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","description":"The connector config object that will be passed to the connector. The config object should be compatible with the connector factory."},"metadata":{"type":"object","properties":{"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"}},"description":"Custom connector metadata, will be used to overwrite the default connector metadata."},"syncProfile":{"type":"boolean","description":"Whether to sync user profile from the identity provider to Logto at each sign-in. If `false`, the user profile will only be synced when the user is created."}}}}}},"responses":{"200":{"description":"The updated connector.","content":{"application/json":{"schema":{"type":"object","required":["id","syncProfile","config","metadata","connectorId","target","name","description","logo","logoDark","readme","platform","type"],"properties":{"id":{"type":"string"},"syncProfile":{"type":"boolean"},"config":{"type":"object","description":"arbitrary"},"metadata":{"type":"object","properties":{"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"}}},"connectorId":{"type":"string","minLength":1,"maxLength":128},"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"description":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"},"readme":{"type":"string"},"configTemplate":{"type":"string"},"formItems":{"type":"array","items":{"oneOf":[{"type":"object","required":["type","selectItems","key","label"],"properties":{"type":{"type":"string","format":"\"Select\""},"selectItems":{"type":"array","items":{"type":"object","required":["value","title"],"properties":{"value":{"type":"string"},"title":{"type":"string"}}}},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}},{"type":"object","required":["type","selectItems","key","label"],"properties":{"type":{"type":"string","format":"\"MultiSelect\""},"selectItems":{"type":"array","items":{"type":"object","required":["value"],"properties":{"value":{"type":"string"}}}},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}},{"type":"object","required":["type","key","label"],"properties":{"type":{"type":"string","enum":["Text","Number","MultilineText","Switch","Json"]},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}}]}},"customData":{"type":"object","additionalProperties":{"example":{}}},"fromEmail":{"type":"string"},"platform":{"nullable":true,"type":"string","enum":["Native","Universal","Web"]},"isStandard":{"type":"boolean"},"type":{"type":"string","enum":["Email","Sms","Social"]},"isDemo":{"type":"boolean"},"extraInfo":{"type":"object","additionalProperties":{"example":{}}},"usage":{"type":"number"}}}}}},"400":{"description":"Invalid request body."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Connector not found."},"422":{"description":"Patch operation triggered a connector conflict."}},"summary":"Update connector","description":"Update connector by ID with the given data. This methods performs a partial update."},"delete":{"operationId":"DeleteConnector","tags":["Connectors"],"parameters":[{"$ref":"#/components/parameters/connectorId-root"}],"responses":{"204":{"description":"The connector has been successfully deleted."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Connector not found."}},"summary":"Delete connector","description":"Delete connector by ID."}},"/api/connectors/{factoryId}/test":{"post":{"operationId":"CreateConnectorTest","tags":["Connectors"],"parameters":[{"$ref":"#/components/parameters/factoryId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["config"],"properties":{"phone":{"type":"string","format":"regex","pattern":"/^\\d+$/","description":"Phone number to send test message to. If this is set, email will be ignored."},"email":{"type":"string","format":"regex","pattern":"/^\\S+@\\S+\\.\\S+$/","description":"Email address to send test message to. If phone is set, this will be ignored."},"config":{"type":"object","description":"Connector configuration object for testing."}}}}}},"responses":{"204":{"description":"Test message was sent successfully."},"400":{"description":"Invalid request body (e.g. wrong phone number, email or config)."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Connector not found."}},"summary":"Test passwordless connector","description":"Test a passwordless (email or SMS) connector by sending a test message to the given phone number or email address."}},"/api/connectors/{connectorId}/authorization-uri":{"post":{"operationId":"CreateConnectorAuthorizationUri","tags":["Connectors"],"parameters":[{"$ref":"#/components/parameters/connectorId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["state","redirectUri"],"properties":{"state":{"type":"string","description":"A random string generated on the client side to prevent CSRF (Cross-Site Request Forgery) attacks."},"redirectUri":{"type":"string","description":"The URI to navigate back to after the user is authenticated by the connected social identity provider and has granted access to the connector."}}}}}},"responses":{"200":{"description":"Successfully built authorization URI.","content":{"application/json":{"schema":{"type":"object","required":["redirectTo"],"properties":{"redirectTo":{"type":"string","format":"url"},"redirectUri":{"description":"The URI to navigate for authentication and authorization in the connected social identity provider."}}}}}},"400":{"description":"Unable to build authorization URI."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The connector with the specified ID does not exist."}},"summary":"Get connector's authorization URI","description":"Get authorization URI for specified connector by providing redirect URI and randomly generated state."}},"/api/connector-factories":{"get":{"operationId":"ListConnectorFactories","tags":["Connector factories"],"parameters":[],"responses":{"200":{"description":"An array of connector factories.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["type","id","target","name","description","logo","logoDark","readme","platform"],"properties":{"type":{"type":"string","enum":["Email","Sms","Social"]},"isDemo":{"type":"boolean"},"id":{"type":"string"},"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"description":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"},"readme":{"type":"string"},"configTemplate":{"type":"string"},"formItems":{"type":"array","items":{"oneOf":[{"type":"object","required":["type","selectItems","key","label"],"properties":{"type":{"type":"string","format":"\"Select\""},"selectItems":{"type":"array","items":{"type":"object","required":["value","title"],"properties":{"value":{"type":"string"},"title":{"type":"string"}}}},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}},{"type":"object","required":["type","selectItems","key","label"],"properties":{"type":{"type":"string","format":"\"MultiSelect\""},"selectItems":{"type":"array","items":{"type":"object","required":["value"],"properties":{"value":{"type":"string"}}}},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}},{"type":"object","required":["type","key","label"],"properties":{"type":{"type":"string","enum":["Text","Number","MultilineText","Switch","Json"]},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}}]}},"customData":{"type":"object","additionalProperties":{"example":{}}},"fromEmail":{"type":"string"},"platform":{"nullable":true,"type":"string","enum":["Native","Universal","Web"]},"isStandard":{"type":"boolean"}}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get connector factories","description":"Get all connector factories data available in Logto."}},"/api/connector-factories/{id}":{"get":{"operationId":"GetConnectorFactory","tags":["Connector factories"],"parameters":[{"$ref":"#/components/parameters/connectorFactoryId-root"}],"responses":{"200":{"description":"Connector factory data.","content":{"application/json":{"schema":{"type":"object","required":["type","id","target","name","description","logo","logoDark","readme","platform"],"properties":{"type":{"type":"string","enum":["Email","Sms","Social"]},"isDemo":{"type":"boolean"},"id":{"type":"string"},"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"description":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"},"readme":{"type":"string"},"configTemplate":{"type":"string"},"formItems":{"type":"array","items":{"oneOf":[{"type":"object","required":["type","selectItems","key","label"],"properties":{"type":{"type":"string","format":"\"Select\""},"selectItems":{"type":"array","items":{"type":"object","required":["value","title"],"properties":{"value":{"type":"string"},"title":{"type":"string"}}}},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}},{"type":"object","required":["type","selectItems","key","label"],"properties":{"type":{"type":"string","format":"\"MultiSelect\""},"selectItems":{"type":"array","items":{"type":"object","required":["value"],"properties":{"value":{"type":"string"}}}},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}},{"type":"object","required":["type","key","label"],"properties":{"type":{"type":"string","enum":["Text","Number","MultilineText","Switch","Json"]},"key":{"type":"string"},"label":{"type":"string"},"placeholder":{"type":"string"},"required":{"type":"boolean"},"defaultValue":{"example":{}},"showConditions":{"type":"array","items":{"type":"object","required":["targetKey"],"properties":{"targetKey":{"type":"string"},"expectValue":{"example":{}}}}},"description":{"type":"string"},"tooltip":{"type":"string"},"isConfidential":{"type":"boolean"}}}]}},"customData":{"type":"object","additionalProperties":{"example":{}}},"fromEmail":{"type":"string"},"platform":{"nullable":true,"type":"string","enum":["Native","Universal","Web"]},"isStandard":{"type":"boolean"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Connector factory not found."}},"summary":"Get connector factory","description":"Get connector factory by the given ID."}},"/api/resources":{"get":{"operationId":"ListResources","tags":["Resources"],"parameters":[{"name":"includeScopes","in":"query","required":false,"schema":{"type":"string"},"description":"If it's provided with a truthy value (`true`, `1`, `yes`), the scopes of each resource will be included in the response."},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"An array of resources.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","indicator","isDefault","accessTokenTtl"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"accessTokenTtl":{"type":"number"},"scopes":{"type":"array","items":{"type":"object","required":["tenantId","id","resourceId","name","description","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"resourceId":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"createdAt":{"type":"number"}}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get API resources","description":"Get API resources in the current tenant with pagination."},"post":{"operationId":"CreateResource","tags":["Resources"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","indicator"],"properties":{"tenantId":{"type":"string","maxLength":21},"name":{"type":"string","minLength":1,"description":"The name of the resource."},"indicator":{"type":"string","minLength":1,"description":"The unique resource indicator. Should be a valid URI."},"accessTokenTtl":{"type":"number","description":"The access token TTL in seconds. It affects the `exp` claim of the access token granted for this resource.","default":3600}}}}}},"responses":{"201":{"description":"The created resource.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","indicator","isDefault","accessTokenTtl"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"accessTokenTtl":{"type":"number"},"scopes":{"type":"array","items":{"type":"object","required":["tenantId","id","resourceId","name","description","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"resourceId":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"createdAt":{"type":"number"}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Unprocessable Content"}},"summary":"Create an API resource","description":"Create an API resource in the current tenant."}},"/api/resources/{id}":{"get":{"operationId":"GetResource","tags":["Resources"],"parameters":[{"$ref":"#/components/parameters/resourceId-root"}],"responses":{"200":{"description":"The requested resource.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","indicator","isDefault","accessTokenTtl"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"accessTokenTtl":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get API resource","description":"Get an API resource details by ID."},"patch":{"operationId":"UpdateResource","tags":["Resources"],"parameters":[{"$ref":"#/components/parameters/resourceId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","maxLength":21},"name":{"type":"string","minLength":1,"description":"The updated name of the resource."},"accessTokenTtl":{"type":"number","description":"The updated access token TTL in seconds."}}}}}},"responses":{"200":{"description":"The updated resource.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","indicator","isDefault","accessTokenTtl"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"accessTokenTtl":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Update API resource","description":"Update an API resource details by ID with the given data. This method performs a partial update."},"delete":{"operationId":"DeleteResource","tags":["Resources"],"parameters":[{"$ref":"#/components/parameters/resourceId-root"}],"responses":{"204":{"description":"The resource was deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Delete API resource","description":"Delete an API resource by ID."}},"/api/resources/{id}/is-default":{"patch":{"operationId":"UpdateResourceIsDefault","tags":["Resources"],"parameters":[{"$ref":"#/components/parameters/resourceId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["isDefault"],"properties":{"isDefault":{"type":"boolean","description":"The updated value of the `isDefault` property."}}}}}},"responses":{"200":{"description":"The updated resource.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","indicator","isDefault","accessTokenTtl"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"accessTokenTtl":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Set API resource as default","description":"Set an API resource as the default resource for the current tenant.\n\nEach tenant can have only one default API resource. If an API resource is set as default, the previously set default API resource will be set as non-default. See [this section](https://docs.logto.io/docs/references/resources/#default-api) for more information."}},"/api/resources/{resourceId}/scopes":{"get":{"operationId":"ListResourceScopes","tags":["Resources"],"parameters":[{"$ref":"#/components/parameters/resourceId"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}},{"name":"search_params","in":"query","description":"Search query parameters.","required":false,"schema":{"type":"object","additionalProperties":{"type":"string"}},"explode":true}],"responses":{"200":{"description":"An array of scopes for the requested resource.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","resourceId","name","description","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"resourceId":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"createdAt":{"type":"number"}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get API resource scopes","description":"Get scopes (permissions) defined for an API resource."},"post":{"operationId":"CreateResourceScope","tags":["Resources"],"parameters":[{"$ref":"#/components/parameters/resourceId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":256,"description":"The name of the scope. It should be unique for the resource."},"description":{"nullable":true,"type":"string"}}}}}},"responses":{"201":{"description":"The created scope.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","resourceId","name","description","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"resourceId":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"createdAt":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Create API resource scope","description":"Create a new scope (permission) for an API resource."}},"/api/resources/{resourceId}/scopes/{scopeId}":{"patch":{"operationId":"UpdateResourceScope","tags":["Resources"],"parameters":[{"$ref":"#/components/parameters/resourceId"},{"$ref":"#/components/parameters/scopeId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":256,"description":"The updated name of the scope. It should be unique for the resource."},"description":{"nullable":true,"type":"string"}}}}}},"responses":{"200":{"description":"The updated scope.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","resourceId","name","description","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"resourceId":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"createdAt":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Update API resource scope","description":"Update an API resource scope (permission) for the given resource. This method performs a partial update."},"delete":{"operationId":"DeleteResourceScope","tags":["Resources"],"parameters":[{"$ref":"#/components/parameters/resourceId"},{"$ref":"#/components/parameters/scopeId"}],"responses":{"204":{"description":"The scope was deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Delete API resource scope","description":"Delete an API resource scope (permission) from the given resource."}},"/api/sign-in-exp":{"get":{"operationId":"GetSignInExp","tags":["Sign-in experience"],"parameters":[],"responses":{"200":{"description":"Default sign-in experience settings.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","color","branding","languageInfo","termsOfUseUrl","privacyPolicyUrl","agreeToTermsPolicy","signIn","signUp","socialSignIn","socialSignInConnectorTargets","signInMode","customCss","customContent","customUiAssets","passwordPolicy","mfa","singleSignOnEnabled"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"color":{"type":"object","required":["primaryColor","isDarkModeEnabled","darkPrimaryColor"],"properties":{"primaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"},"isDarkModeEnabled":{"type":"boolean"},"darkPrimaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"}},"description":"The primary branding color for the sign-in page (both light/dark mode)."},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"languageInfo":{"type":"object","required":["autoDetect","fallbackLanguage"],"properties":{"autoDetect":{"type":"boolean"},"fallbackLanguage":{"type":"string","enum":["af-ZA","am-ET","ar-AR","as-IN","az-AZ","be-BY","bg-BG","bn-IN","br-FR","bs-BA","ca-ES","cb-IQ","co-FR","cs-CZ","cx-PH","cy-GB","da-DK","de","de-DE","el-GR","en","en-GB","en-US","eo-EO","es","es-ES","es-419","et-EE","eu-ES","fa-IR","ff-NG","fi-FI","fo-FO","fr","fr-CA","fr-FR","fy-NL","ga-IE","gl-ES","gn-PY","gu-IN","ha-NG","he-IL","hi-IN","hr-HR","ht-HT","hu-HU","hy-AM","id-ID","ik-US","is-IS","it","it-IT","iu-CA","ja","ja-JP","ja-KS","jv-ID","ka-GE","kk-KZ","km-KH","kn-IN","ko","ko-KR","ku-TR","ky-KG","lo-LA","lt-LT","lv-LV","mg-MG","mk-MK","ml-IN","mn-MN","mr-IN","ms-MY","mt-MT","my-MM","nb-NO","ne-NP","nl-BE","nl-NL","nn-NO","or-IN","pa-IN","pl-PL","ps-AF","pt","pt-BR","pt-PT","ro-RO","ru","ru-RU","rw-RW","sc-IT","si-LK","sk-SK","sl-SI","sn-ZW","sq-AL","sr-RS","sv-SE","sw-KE","sy-SY","sz-PL","ta-IN","te-IN","tg-TJ","th-TH","tl-PH","tr","tr-TR","tt-RU","tz-MA","uk-UA","ur-PK","uz-UZ","vi-VN","zh","zh-CN","zh-HK","zh-MO","zh-TW","zz-TR"]}},"description":"The language detection policy for the sign-in page."},"termsOfUseUrl":{"nullable":true,"type":"string","maxLength":2048},"privacyPolicyUrl":{"nullable":true,"type":"string","maxLength":2048},"agreeToTermsPolicy":{"type":"string","enum":["Automatic","ManualRegistrationOnly","Manual"]},"signIn":{"type":"object","required":["methods"],"properties":{"methods":{"type":"array","items":{"type":"object","required":["identifier","password","verificationCode","isPasswordPrimary"],"properties":{"identifier":{"type":"string","enum":["username","email","phone"]},"password":{"type":"boolean"},"verificationCode":{"type":"boolean"},"isPasswordPrimary":{"type":"boolean"}}}}},"description":"Sign-in method settings."},"signUp":{"type":"object","required":["identifiers","password","verify"],"properties":{"identifiers":{"type":"array","items":{"type":"string","enum":["username","email","phone"]},"description":"Allowed identifiers when signing-up."},"password":{"type":"boolean","description":"Whether the user is required to set a password when signing-up."},"verify":{"type":"boolean","description":"Whether the user is required to verify their email/phone when signing-up."}},"description":"Sign-up method settings."},"socialSignIn":{"type":"object","properties":{"automaticAccountLinking":{"type":"boolean"}}},"socialSignInConnectorTargets":{"type":"array","items":{"type":"string"},"description":"Enabled social sign-in connectors, will displayed on the sign-in page."},"signInMode":{"type":"string","enum":["SignIn","Register","SignInAndRegister"]},"customCss":{"nullable":true,"type":"string"},"customContent":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom content to display on experience flow pages. the page pathname will be the config key, the content will be the config value."},"customUiAssets":{"nullable":true,"type":"object","required":["id","createdAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"number"}}},"passwordPolicy":{"type":"object","properties":{"length":{"default":{},"type":"object","required":["min","max"],"properties":{"min":{"default":8,"type":"number"},"max":{"default":256,"type":"number"}}},"characterTypes":{"default":{},"type":"object","required":["min"],"properties":{"min":{"default":1,"type":"number"}}},"rejects":{"default":{},"type":"object","required":["pwned","repetitionAndSequence","userInfo","words"],"properties":{"pwned":{"default":true,"type":"boolean"},"repetitionAndSequence":{"default":true,"type":"boolean"},"userInfo":{"default":true,"type":"boolean"},"words":{"default":[],"type":"array","items":{"type":"string"}}}}},"description":"Password policies to adjust the password strength requirements."},"mfa":{"type":"object","required":["factors","policy"],"properties":{"factors":{"type":"array","items":{"type":"string","enum":["Totp","WebAuthn","BackupCode"]}},"policy":{"type":"string","enum":["UserControlled","Mandatory"]}},"description":"MFA settings"},"singleSignOnEnabled":{"type":"boolean"}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Default sign-in experience settings not found."}},"summary":"Get default sign-in experience settings","description":"Get the default sign-in experience settings."},"patch":{"operationId":"UpdateSignInExp","tags":["Sign-in experience"],"parameters":[{"name":"removeUnusedDemoSocialConnector","in":"query","required":false,"schema":{"type":"string"},"description":"Whether to remove unused demo social connectors. (These demo social connectors are only used during cloud user onboarding)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","maxLength":21},"color":{"type":"object","required":["primaryColor","isDarkModeEnabled","darkPrimaryColor"],"properties":{"primaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"},"isDarkModeEnabled":{"type":"boolean"},"darkPrimaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"}},"description":"Specify the primary branding color for the sign-in page (both light/dark mode)."},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"languageInfo":{"type":"object","required":["autoDetect","fallbackLanguage"],"properties":{"autoDetect":{"type":"boolean"},"fallbackLanguage":{"type":"string","enum":["af-ZA","am-ET","ar-AR","as-IN","az-AZ","be-BY","bg-BG","bn-IN","br-FR","bs-BA","ca-ES","cb-IQ","co-FR","cs-CZ","cx-PH","cy-GB","da-DK","de","de-DE","el-GR","en","en-GB","en-US","eo-EO","es","es-ES","es-419","et-EE","eu-ES","fa-IR","ff-NG","fi-FI","fo-FO","fr","fr-CA","fr-FR","fy-NL","ga-IE","gl-ES","gn-PY","gu-IN","ha-NG","he-IL","hi-IN","hr-HR","ht-HT","hu-HU","hy-AM","id-ID","ik-US","is-IS","it","it-IT","iu-CA","ja","ja-JP","ja-KS","jv-ID","ka-GE","kk-KZ","km-KH","kn-IN","ko","ko-KR","ku-TR","ky-KG","lo-LA","lt-LT","lv-LV","mg-MG","mk-MK","ml-IN","mn-MN","mr-IN","ms-MY","mt-MT","my-MM","nb-NO","ne-NP","nl-BE","nl-NL","nn-NO","or-IN","pa-IN","pl-PL","ps-AF","pt","pt-BR","pt-PT","ro-RO","ru","ru-RU","rw-RW","sc-IT","si-LK","sk-SK","sl-SI","sn-ZW","sq-AL","sr-RS","sv-SE","sw-KE","sy-SY","sz-PL","ta-IN","te-IN","tg-TJ","th-TH","tl-PH","tr","tr-TR","tt-RU","tz-MA","uk-UA","ur-PK","uz-UZ","vi-VN","zh","zh-CN","zh-HK","zh-MO","zh-TW","zz-TR"]}},"description":"Control the language detection policy for the sign-in page."},"agreeToTermsPolicy":{"type":"string","enum":["Automatic","ManualRegistrationOnly","Manual"]},"signIn":{"type":"object","required":["methods"],"properties":{"methods":{"type":"array","items":{"type":"object","required":["identifier","password","verificationCode","isPasswordPrimary"],"properties":{"identifier":{"type":"string","enum":["username","email","phone"]},"password":{"type":"boolean"},"verificationCode":{"type":"boolean"},"isPasswordPrimary":{"type":"boolean"}}}}},"description":"Sign-in method settings"},"signUp":{"type":"object","required":["identifiers","password","verify"],"properties":{"identifiers":{"type":"array","items":{"type":"string","enum":["username","email","phone"]},"description":"Specify allowed identifiers when signing-up."},"password":{"type":"boolean","description":"Whether the user is required to set a password when signing-up."},"verify":{"type":"boolean","description":"Whether the user is required to verify their email/phone when signing-up."}},"description":"Sign-up method settings"},"socialSignIn":{"type":"object","properties":{"automaticAccountLinking":{"type":"boolean"}}},"socialSignInConnectorTargets":{"type":"array","items":{"type":"string"},"description":"Specify the social sign-in connectors to display on the sign-in page."},"signInMode":{"type":"string","enum":["SignIn","Register","SignInAndRegister"]},"customCss":{"nullable":true,"type":"string"},"customContent":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom content to display on experience flow pages. the page pathname will be the config key, the content will be the config value."},"customUiAssets":{"nullable":true,"type":"object","required":["id","createdAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"number"}}},"passwordPolicy":{"type":"object","properties":{"length":{"default":{},"type":"object","required":["min","max"],"properties":{"min":{"default":8,"type":"number"},"max":{"default":256,"type":"number"}}},"characterTypes":{"default":{},"type":"object","required":["min"],"properties":{"min":{"default":1,"type":"number"}}},"rejects":{"default":{},"type":"object","required":["pwned","repetitionAndSequence","userInfo","words"],"properties":{"pwned":{"default":true,"type":"boolean"},"repetitionAndSequence":{"default":true,"type":"boolean"},"userInfo":{"default":true,"type":"boolean"},"words":{"default":[],"type":"array","items":{"type":"string"}}}}},"description":"Password policies to adjust the password strength requirements."},"mfa":{"type":"object","required":["factors","policy"],"properties":{"factors":{"type":"array","items":{"type":"string","enum":["Totp","WebAuthn","BackupCode"]}},"policy":{"type":"string","enum":["UserControlled","Mandatory"]}},"description":"MFA settings"},"singleSignOnEnabled":{"type":"boolean"},"termsOfUseUrl":{"oneOf":[{"nullable":true,"type":"string","format":"url"},{"type":"string","format":"empty"}]},"privacyPolicyUrl":{"oneOf":[{"nullable":true,"type":"string","format":"url"},{"type":"string","format":"empty"}]}}}}}},"responses":{"200":{"description":"Updated default sign-in experience settings.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","color","branding","languageInfo","termsOfUseUrl","privacyPolicyUrl","agreeToTermsPolicy","signIn","signUp","socialSignIn","socialSignInConnectorTargets","signInMode","customCss","customContent","customUiAssets","passwordPolicy","mfa","singleSignOnEnabled"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"color":{"type":"object","required":["primaryColor","isDarkModeEnabled","darkPrimaryColor"],"properties":{"primaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"},"isDarkModeEnabled":{"type":"boolean"},"darkPrimaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"}}},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"languageInfo":{"type":"object","required":["autoDetect","fallbackLanguage"],"properties":{"autoDetect":{"type":"boolean"},"fallbackLanguage":{"type":"string","enum":["af-ZA","am-ET","ar-AR","as-IN","az-AZ","be-BY","bg-BG","bn-IN","br-FR","bs-BA","ca-ES","cb-IQ","co-FR","cs-CZ","cx-PH","cy-GB","da-DK","de","de-DE","el-GR","en","en-GB","en-US","eo-EO","es","es-ES","es-419","et-EE","eu-ES","fa-IR","ff-NG","fi-FI","fo-FO","fr","fr-CA","fr-FR","fy-NL","ga-IE","gl-ES","gn-PY","gu-IN","ha-NG","he-IL","hi-IN","hr-HR","ht-HT","hu-HU","hy-AM","id-ID","ik-US","is-IS","it","it-IT","iu-CA","ja","ja-JP","ja-KS","jv-ID","ka-GE","kk-KZ","km-KH","kn-IN","ko","ko-KR","ku-TR","ky-KG","lo-LA","lt-LT","lv-LV","mg-MG","mk-MK","ml-IN","mn-MN","mr-IN","ms-MY","mt-MT","my-MM","nb-NO","ne-NP","nl-BE","nl-NL","nn-NO","or-IN","pa-IN","pl-PL","ps-AF","pt","pt-BR","pt-PT","ro-RO","ru","ru-RU","rw-RW","sc-IT","si-LK","sk-SK","sl-SI","sn-ZW","sq-AL","sr-RS","sv-SE","sw-KE","sy-SY","sz-PL","ta-IN","te-IN","tg-TJ","th-TH","tl-PH","tr","tr-TR","tt-RU","tz-MA","uk-UA","ur-PK","uz-UZ","vi-VN","zh","zh-CN","zh-HK","zh-MO","zh-TW","zz-TR"]}}},"termsOfUseUrl":{"nullable":true,"type":"string","maxLength":2048},"privacyPolicyUrl":{"nullable":true,"type":"string","maxLength":2048},"agreeToTermsPolicy":{"type":"string","enum":["Automatic","ManualRegistrationOnly","Manual"]},"signIn":{"type":"object","required":["methods"],"properties":{"methods":{"type":"array","items":{"type":"object","required":["identifier","password","verificationCode","isPasswordPrimary"],"properties":{"identifier":{"type":"string","enum":["username","email","phone"]},"password":{"type":"boolean"},"verificationCode":{"type":"boolean"},"isPasswordPrimary":{"type":"boolean"}}}}}},"signUp":{"type":"object","required":["identifiers","password","verify"],"properties":{"identifiers":{"type":"array","items":{"type":"string","enum":["username","email","phone"]}},"password":{"type":"boolean"},"verify":{"type":"boolean"}}},"socialSignIn":{"type":"object","properties":{"automaticAccountLinking":{"type":"boolean"}}},"socialSignInConnectorTargets":{"type":"array","items":{"type":"string"}},"signInMode":{"type":"string","enum":["SignIn","Register","SignInAndRegister"]},"customCss":{"nullable":true,"type":"string"},"customContent":{"type":"object","additionalProperties":{"type":"string"}},"customUiAssets":{"nullable":true,"type":"object","required":["id","createdAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"number"}}},"passwordPolicy":{"type":"object","properties":{"length":{"default":{},"type":"object","required":["min","max"],"properties":{"min":{"default":8,"type":"number"},"max":{"default":256,"type":"number"}}},"characterTypes":{"default":{},"type":"object","required":["min"],"properties":{"min":{"default":1,"type":"number"}}},"rejects":{"default":{},"type":"object","required":["pwned","repetitionAndSequence","userInfo","words"],"properties":{"pwned":{"default":true,"type":"boolean"},"repetitionAndSequence":{"default":true,"type":"boolean"},"userInfo":{"default":true,"type":"boolean"},"words":{"default":[],"type":"array","items":{"type":"string"}}}}}},"mfa":{"type":"object","required":["factors","policy"],"properties":{"factors":{"type":"array","items":{"type":"string","enum":["Totp","WebAuthn","BackupCode"]}},"policy":{"type":"string","enum":["UserControlled","Mandatory"]}}},"singleSignOnEnabled":{"type":"boolean"}}}}}},"400":{"description":"Bad request. Invalid data provided."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Default sign-in experience settings not found."},"422":{"description":"Unprocessable Entity. Invalid data provided."}},"summary":"Update default sign-in experience settings","description":"Update the default sign-in experience settings with the provided data."}},"/api/sign-in-exp/default/custom-ui-assets":{"post":{"operationId":"UploadCustomUiAssets","tags":["Sign-in experience"],"parameters":[],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"description":"The zip file containing custom web assets such as HTML, CSS, and JavaScript files."}}}}}},"responses":{"200":{"description":"An JSON object containing the custom UI assets ID.","content":{"application/json":{"schema":{"type":"object","required":["customUiAssetId"],"properties":{"customUiAssetId":{"type":"string"}}}}}},"400":{"description":"Bad request. The request body is invalid."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"500":{"description":"Failed to unzip or upload the custom UI assets to storage provider."}},"summary":"Upload custom UI assets","description":"Upload a zip file containing custom web assets such as HTML, CSS, and JavaScript files, then replace the default sign-in experience with the custom UI assets."}},"/api/users/{userId}":{"get":{"operationId":"GetUser","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"},{"name":"includeSsoIdentities","in":"query","required":false,"schema":{"type":"string"},"description":"If it's provided with a truthy value (`true`, `1`, `yes`), each user in the response will include a `ssoIdentities` property containing a list of SSO identities associated with the user."}],"responses":{"200":{"description":"User data for the given ID.","content":{"application/json":{"schema":{"type":"object","required":["id","username","primaryEmail","primaryPhone","name","avatar","customData","identities","lastSignInAt","createdAt","updatedAt","profile","applicationId","isSuspended"],"properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["tenantId","id","userId","issuer","identityId","detail","createdAt","ssoConnectorId"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"userId":{"type":"string","minLength":1,"maxLength":12},"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"},"createdAt":{"type":"number"},"ssoConnectorId":{"type":"string","minLength":1,"maxLength":128}}},"description":"List of SSO identities associated with the user. Only available when the `includeSsoIdentities` query parameter is provided with a truthy value."}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get user","description":"Get user data for the given ID."},"patch":{"operationId":"UpdateUser","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"nullable":true,"oneOf":[{"type":"string","format":"regex","pattern":"/^[A-Z_a-z]\\w*$/"},{"type":"string","format":"empty"}],"description":"Updated username for the user. It should be unique across all users."},"primaryEmail":{"nullable":true,"oneOf":[{"type":"string","format":"regex","pattern":"/^\\S+@\\S+\\.\\S+$/"},{"type":"string","format":"empty"}],"description":"Updated primary email address for the user. It should be unique across all users."},"primaryPhone":{"nullable":true,"oneOf":[{"type":"string","format":"regex","pattern":"/^\\d+$/"},{"type":"string","format":"empty"}],"description":"Updated primary phone number for the user. It should be unique across all users."},"name":{"nullable":true,"oneOf":[{"type":"string"},{"type":"string","format":"empty"}]},"avatar":{"nullable":true,"oneOf":[{"type":"string","format":"url"},{"type":"string","format":"empty"}]},"customData":{"type":"object","description":"Custom data object to update for the given user ID. Note this will replace the entire custom data object.\n\nIf you want to perform a partial update, use the `PATCH /api/users/{userId}/custom-data` endpoint instead."},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}}}}}}},"responses":{"200":{"description":"Updated user data for the given ID.","content":{"application/json":{"schema":{"type":"object","required":["id","username","primaryEmail","primaryPhone","name","avatar","customData","identities","lastSignInAt","createdAt","updatedAt","profile","applicationId","isSuspended"],"properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["tenantId","id","userId","issuer","identityId","detail","createdAt","ssoConnectorId"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"userId":{"type":"string","minLength":1,"maxLength":12},"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"},"createdAt":{"type":"number"},"ssoConnectorId":{"type":"string","minLength":1,"maxLength":128}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Update user","description":"Update user data for the given ID. This method performs a partial update."},"delete":{"operationId":"DeleteUser","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"responses":{"204":{"description":"User deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Delete user","description":"Delete user with the given ID. Note all associated data will be deleted cascadingly."}},"/api/users/{userId}/custom-data":{"get":{"operationId":"ListUserCustomData","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"Custom data in JSON for the given user ID.","content":{"application/json":{"schema":{"type":"object","description":"arbitrary"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get user custom data","description":"Get custom data for the given user ID."},"patch":{"operationId":"UpdateUserCustomData","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["customData"],"properties":{"customData":{"type":"object","description":"Partial custom data object to update for the given user ID."}}}}}},"responses":{"200":{"description":"Updated custom data in JSON for the given user ID.","content":{"application/json":{"schema":{"type":"object","description":"arbitrary"}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Update user custom data","description":"Update custom data for the given user ID. This method performs a partial update of the custom data object."}},"/api/users/{userId}/profile":{"patch":{"operationId":"UpdateUserProfile","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["profile"],"properties":{"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}},"description":"Partial profile object to update for the given user ID."}}}}}},"responses":{"200":{"description":"Updated profile in JSON for the given user ID.","content":{"application/json":{"schema":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Update user profile","description":"Update profile for the given user ID. This method performs a partial update of the profile object."}},"/api/users":{"post":{"operationId":"CreateUser","tags":["Users"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"primaryPhone":{"type":"string","format":"regex","pattern":"/^\\d+$/","description":"Primary phone number for the user. It should be unique across all users."},"primaryEmail":{"type":"string","format":"regex","pattern":"/^\\S+@\\S+\\.\\S+$/","description":"Primary email address for the user. It should be unique across all users."},"username":{"type":"string","format":"regex","pattern":"/^[A-Z_a-z]\\w*$/","description":"Username for the user. It should be unique across all users."},"password":{"type":"string","minLength":1,"description":"Plain text password for the user."},"passwordDigest":{"type":"string","description":"In case you already have the password digests and not the passwords, you can use them for the newly created user via this property. The value should be generated with one of the supported algorithms. The algorithm can be specified using the `passwordAlgorithm` property."},"passwordAlgorithm":{"type":"string","enum":["Argon2i","Argon2id","Argon2d","SHA1","SHA256","MD5","Bcrypt"],"description":"The hash algorithm used for the password. It should be one of the supported algorithms: argon2, md5, sha1, sha256. Should the encryption algorithm differ from argon2, it will automatically be upgraded to argon2 upon the user's next sign-in."},"name":{"type":"string"},"avatar":{"nullable":true,"oneOf":[{"type":"string","format":"url"},{"type":"string","format":"empty"}]},"customData":{"type":"object","description":"arbitrary"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}}},"description":"User data to create a new user. All properties are optional."}}}},"responses":{"200":{"description":"User data for the newly created user.","content":{"application/json":{"schema":{"type":"object","required":["id","username","primaryEmail","primaryPhone","name","avatar","customData","identities","lastSignInAt","createdAt","updatedAt","profile","applicationId","isSuspended"],"properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["tenantId","id","userId","issuer","identityId","detail","createdAt","ssoConnectorId"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"userId":{"type":"string","minLength":1,"maxLength":12},"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"},"createdAt":{"type":"number"},"ssoConnectorId":{"type":"string","minLength":1,"maxLength":128}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Create user","description":"Create a new user with the given data."},"get":{"operationId":"ListUsers","tags":["Users"],"parameters":[{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}},{"name":"search_params","in":"query","description":"Search query parameters.","required":false,"schema":{"type":"object","additionalProperties":{"type":"string"}},"explode":true}],"responses":{"200":{"description":"An array of users that match the given criteria.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["id","username","primaryEmail","primaryPhone","name","avatar","customData","identities","lastSignInAt","createdAt","updatedAt","profile","applicationId","isSuspended"],"properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["tenantId","id","userId","issuer","identityId","detail","createdAt","ssoConnectorId"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"userId":{"type":"string","minLength":1,"maxLength":12},"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"},"createdAt":{"type":"number"},"ssoConnectorId":{"type":"string","minLength":1,"maxLength":128}}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get users","description":"Get users with filters and pagination.\n\nLogto provides a very flexible way to query users. You can filter users by almost any fields with multiple modes. To learn more about the query syntax, please refer to [Advanced user search](https://docs.logto.io/docs/recipes/manage-users/advanced-user-search/)."}},"/api/users/{userId}/password":{"patch":{"operationId":"UpdateUserPassword","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["password"],"properties":{"password":{"type":"string","minLength":1,"description":"New password for the user."}}}}}},"responses":{"200":{"description":"User password updated successfully.","content":{"application/json":{"schema":{"type":"object","required":["id","username","primaryEmail","primaryPhone","name","avatar","customData","identities","lastSignInAt","createdAt","updatedAt","profile","applicationId","isSuspended"],"properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["tenantId","id","userId","issuer","identityId","detail","createdAt","ssoConnectorId"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"userId":{"type":"string","minLength":1,"maxLength":12},"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"},"createdAt":{"type":"number"},"ssoConnectorId":{"type":"string","minLength":1,"maxLength":128}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Unprocessable Content"}},"summary":"Update user password","description":"Update user password for the given ID."}},"/api/users/{userId}/password/verify":{"post":{"operationId":"VerifyUserPassword","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["password"],"properties":{"password":{"type":"string","minLength":1,"description":"Password to verify."}}}}}},"responses":{"204":{"description":"User password matches."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"User password does not match."}},"summary":"Verify user password","description":"Test if the given password matches the user's password."}},"/api/users/{userId}/has-password":{"get":{"operationId":"GetUserHasPassword","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"The result of the check.","content":{"application/json":{"schema":{"type":"object","required":["hasPassword"],"properties":{"hasPassword":{"type":"boolean"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Check if user has password","description":"Check if the user with the given ID has a password set."}},"/api/users/{userId}/is-suspended":{"patch":{"operationId":"UpdateUserIsSuspended","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["isSuspended"],"properties":{"isSuspended":{"type":"boolean","description":"New suspension status for the user."}}}}}},"responses":{"200":{"description":"User suspension status updated successfully.","content":{"application/json":{"schema":{"type":"object","required":["id","username","primaryEmail","primaryPhone","name","avatar","customData","identities","lastSignInAt","createdAt","updatedAt","profile","applicationId","isSuspended"],"properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["tenantId","id","userId","issuer","identityId","detail","createdAt","ssoConnectorId"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"userId":{"type":"string","minLength":1,"maxLength":12},"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"},"createdAt":{"type":"number"},"ssoConnectorId":{"type":"string","minLength":1,"maxLength":128}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Update user suspension status","description":"Update user suspension status for the given ID."}},"/api/users/{userId}/roles":{"get":{"operationId":"ListUserRoles","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}},{"name":"search_params","in":"query","description":"Search query parameters.","required":false,"schema":{"type":"object","additionalProperties":{"type":"string"}},"explode":true}],"responses":{"200":{"description":"An array of API resource roles assigned to the user.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description","type","isDefault"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":128},"type":{"type":"string","enum":["User","MachineToMachine"]},"isDefault":{"type":"boolean"}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get roles for user","description":"Get API resource roles assigned to the user with pagination."},"post":{"operationId":"AssignUserRoles","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["roleIds"],"properties":{"roleIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of API resource role IDs to assign."}}}}}},"responses":{"201":{"description":"The API resource roles has been assigned to the user.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Assign roles to user","description":"Assign API resource roles to the user. The roles will be added to the existing roles."},"put":{"operationId":"ReplaceUserRoles","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["roleIds"],"properties":{"roleIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of API resource role IDs to assign."}}}}}},"responses":{"200":{"description":"The API resource roles has been updated for the user successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Update roles for user","description":"Update API resource roles assigned to the user. This will replace the existing roles."}},"/api/users/{userId}/roles/{roleId}":{"delete":{"operationId":"DeleteUserRole","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/roleId"}],"responses":{"204":{"description":"The API resource role has been removed from the user."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Remove role from user","description":"Remove an API resource role from the user."}},"/api/users/{userId}/identities/{target}":{"put":{"operationId":"ReplaceUserIdentity","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"},{"name":"target","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string","description":"The user's social identity ID."},"details":{"type":"object","description":"The user's social identity details."}}}}}},"responses":{"200":{"description":"The identity is updated.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}}}}},"201":{"description":"The identity is created.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Update social identity of user","description":"Directly update a social identity of the user."},"delete":{"operationId":"DeleteUserIdentity","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"},{"name":"target","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The identity is deleted from the user.","content":{"application/json":{"schema":{"type":"object","required":["id","username","primaryEmail","primaryPhone","name","avatar","customData","identities","lastSignInAt","createdAt","updatedAt","profile","applicationId","isSuspended"],"properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["tenantId","id","userId","issuer","identityId","detail","createdAt","ssoConnectorId"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"userId":{"type":"string","minLength":1,"maxLength":12},"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"},"createdAt":{"type":"number"},"ssoConnectorId":{"type":"string","minLength":1,"maxLength":128}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Delete social identity from user","description":"Delete a social identity from the user."}},"/api/users/{userId}/identities":{"post":{"operationId":"CreateUserIdentity","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["connectorId","connectorData"],"properties":{"connectorId":{"type":"string","description":"The Logto connector ID."},"connectorData":{"type":"object","additionalProperties":{"example":{}},"description":"A json object constructed from the url query params returned by the social platform. Typically it contains `code`, `state` and `redirectUri` fields."}}}}}},"responses":{"200":{"description":"A new identity is linked to the user.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Link social identity to user","description":"Link authenticated user identity from a social platform to a Logto user.\n\nThe usage of this API is usually coupled with `POST /connectors/:connectorId/authorization-uri`. With the help of these pair of APIs, you can implement a user profile page with the link social account feature in your application.\n\nNote: Currently due to technical limitations, this API does not support the following connectors that rely on Logto interaction session: `@logto/connector-apple`, `@logto/connector-saml`, `@logto/connector-oidc` and `@logto/connector-oauth`."}},"/api/users/{userId}/organizations":{"get":{"operationId":"ListUserOrganizations","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"An array of organizations that the user is a member of.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description","customData","isMfaRequired","branding","createdAt","organizationRoles"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"customData":{"type":"object","description":"arbitrary"},"isMfaRequired":{"type":"boolean"},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"createdAt":{"type":"number"},"organizationRoles":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get organizations for a user","description":"Get all organizations that the user is a member of. In each organization object, the user's roles in that organization are included in the `organizationRoles` array."}},"/api/users/{userId}/mfa-verifications":{"get":{"operationId":"ListUserMfaVerifications","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"An array of MFA verifications for the user.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["id","createdAt","type"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string"},"type":{"type":"string","enum":["Totp","WebAuthn","BackupCode"]},"agent":{"type":"string"},"remainCodes":{"type":"number"}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get user's MFA verifications","description":"Get a user's existing MFA verifications for a given user ID."},"post":{"operationId":"CreateUserMfaVerification","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"oneOf":[{"type":"string","format":"\"Totp\""},{"type":"string","format":"\"BackupCode\""}],"description":"The type of MFA verification to create."}}}}}},"responses":{"200":{"description":"The MFA verification that was created.","content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["type","secret","secretQrCode"],"properties":{"type":{"type":"string","format":"\"Totp\""},"secret":{"type":"string"},"secretQrCode":{"type":"string"}}},{"type":"object","required":["type","codes"],"properties":{"type":{"type":"string","format":"\"BackupCode\""},"codes":{"type":"array","items":{"type":"string"}}}}]}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Create an MFA verification for a user","description":"Create a new MFA verification for a given user ID."}},"/api/users/{userId}/mfa-verifications/{verificationId}":{"delete":{"operationId":"DeleteUserMfaVerification","tags":["Users"],"parameters":[{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/verificationId"}],"responses":{"204":{"description":"The MFA verification was deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Delete an MFA verification for a user","description":"Delete an MFA verification for the user with the given verification ID. The verification ID must be associated with the given user ID."}},"/api/logs":{"get":{"operationId":"ListLogs","tags":["Audit logs"],"parameters":[{"name":"userId","in":"query","required":false,"schema":{"type":"string"},"description":"Filter logs by user ID."},{"name":"applicationId","in":"query","required":false,"schema":{"type":"string"},"description":"Filter logs by application ID."},{"name":"logKey","in":"query","required":false,"schema":{"type":"string"},"description":"Filter logs by log key."},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"An array of logs that match the given query.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","key","payload","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"key":{"type":"string","minLength":1,"maxLength":128},"payload":{"type":"object","required":["key","result"],"properties":{"key":{"type":"string"},"result":{"type":"string","enum":["Success","Error"]},"error":{"oneOf":[{"type":"object","additionalProperties":{"example":{}}},{"type":"string"}]},"ip":{"type":"string"},"userAgent":{"type":"string"},"userId":{"type":"string"},"applicationId":{"type":"string"},"sessionId":{"type":"string"},"params":{"type":"object","additionalProperties":{"example":{}}}}},"createdAt":{"type":"number"}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get logs","description":"Get logs that match the given query with pagination."}},"/api/logs/{id}":{"get":{"operationId":"GetLog","tags":["Audit logs"],"parameters":[{"$ref":"#/components/parameters/logId-root"}],"responses":{"200":{"description":"Log details.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","key","payload","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"key":{"type":"string","minLength":1,"maxLength":128},"payload":{"type":"object","required":["key","result"],"properties":{"key":{"type":"string"},"result":{"type":"string","enum":["Success","Error"]},"error":{"oneOf":[{"type":"object","additionalProperties":{"example":{}}},{"type":"string"}]},"ip":{"type":"string"},"userAgent":{"type":"string"},"userId":{"type":"string"},"applicationId":{"type":"string"},"sessionId":{"type":"string"},"params":{"type":"object","additionalProperties":{"example":{}}}}},"createdAt":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Log not found."}},"summary":"Get log","description":"Get log details by ID."}},"/api/roles":{"get":{"operationId":"ListRoles","tags":["Roles"],"parameters":[{"name":"excludeUserId","in":"query","required":false,"schema":{"type":"string"},"description":"Exclude roles assigned to a user."},{"name":"excludeApplicationId","in":"query","required":false,"schema":{"type":"string"},"description":"Exclude roles assigned to an application."},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["User","MachineToMachine"]},"description":"Filter by role type."},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}},{"name":"search_params","in":"query","description":"Search query parameters.","required":false,"schema":{"type":"object","additionalProperties":{"type":"string"}},"explode":true}],"responses":{"200":{"description":"An array of roles matching the filters.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description","type","isDefault","usersCount","featuredUsers","applicationsCount","featuredApplications"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":128},"type":{"type":"string","enum":["User","MachineToMachine"]},"isDefault":{"type":"boolean"},"usersCount":{"type":"number"},"featuredUsers":{"type":"array","items":{"type":"object","required":["id","avatar","name"],"properties":{"id":{"type":"string","minLength":1,"maxLength":12},"avatar":{"nullable":true,"type":"string","maxLength":2048},"name":{"nullable":true,"type":"string","maxLength":128}}}},"applicationsCount":{"type":"number"},"featuredApplications":{"type":"array","items":{"type":"object","required":["id","name","type"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"type":{"type":"string","enum":["Native","SPA","Traditional","MachineToMachine","Protected"]}}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get roles","description":"Get roles with filters and pagination."},"post":{"operationId":"CreateRole","tags":["Roles"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","description"],"properties":{"tenantId":{"type":"string","maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128,"description":"The name of the role. It should be unique within the tenant."},"description":{"type":"string","minLength":1,"maxLength":128},"type":{"type":"string","enum":["User","MachineToMachine"],"description":"The type of the role. It cannot be changed after creation."},"isDefault":{"type":"boolean"},"scopeIds":{"type":"array","items":{"type":"string","minLength":1},"description":"The initial API resource scopes assigned to the role."}}}}}},"responses":{"200":{"description":"The created role.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","description","type","isDefault"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":128},"type":{"type":"string","enum":["User","MachineToMachine"]},"isDefault":{"type":"boolean"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Create a role","description":"Create a new role with the given data."}},"/api/roles/{id}":{"get":{"operationId":"GetRole","tags":["Roles"],"parameters":[{"$ref":"#/components/parameters/roleId-root"}],"responses":{"200":{"description":"Details of the role.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","description","type","isDefault"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":128},"type":{"type":"string","enum":["User","MachineToMachine"]},"isDefault":{"type":"boolean"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get role","description":"Get role details by ID."},"patch":{"operationId":"UpdateRole","tags":["Roles"],"parameters":[{"$ref":"#/components/parameters/roleId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128,"description":"The name of the role. It should be unique within the tenant."},"description":{"type":"string","minLength":1,"maxLength":128},"isDefault":{"type":"boolean"}}}}}},"responses":{"200":{"description":"The updated role.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","description","type","isDefault"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":128},"type":{"type":"string","enum":["User","MachineToMachine"]},"isDefault":{"type":"boolean"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Update role","description":"Update role details. This method performs a partial update."},"delete":{"operationId":"DeleteRole","tags":["Roles"],"parameters":[{"$ref":"#/components/parameters/roleId-root"}],"responses":{"204":{"description":"The role was deleted."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Delete role","description":"Delete a role with the given ID."}},"/api/roles/{id}/users":{"get":{"operationId":"ListRoleUsers","tags":["Roles"],"parameters":[{"$ref":"#/components/parameters/roleId-root"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}},{"name":"search_params","in":"query","description":"Search query parameters.","required":false,"schema":{"type":"object","additionalProperties":{"type":"string"}},"explode":true}],"responses":{"200":{"description":"An array of users who have the role assigned.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["id","username","primaryEmail","primaryPhone","name","avatar","customData","identities","lastSignInAt","createdAt","updatedAt","profile","applicationId","isSuspended"],"properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"hasPassword":{"type":"boolean"},"ssoIdentities":{"type":"array","items":{"type":"object","required":["tenantId","id","userId","issuer","identityId","detail","createdAt","ssoConnectorId"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"userId":{"type":"string","minLength":1,"maxLength":12},"issuer":{"type":"string","minLength":1,"maxLength":256},"identityId":{"type":"string","minLength":1,"maxLength":128},"detail":{"type":"object","description":"arbitrary"},"createdAt":{"type":"number"},"ssoConnectorId":{"type":"string","minLength":1,"maxLength":128}}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get role users","description":"Get users who have the role assigned with pagination."},"post":{"operationId":"CreateRoleUser","tags":["Roles"],"parameters":[{"$ref":"#/components/parameters/roleId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userIds"],"properties":{"userIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of user IDs to be assigned."}}}}}},"responses":{"201":{"description":"The role was assigned to the users successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Assign role to users","description":"Assign a role to a list of users. The role must have the type `User`."}},"/api/roles/{id}/users/{userId}":{"delete":{"operationId":"DeleteRoleUser","tags":["Roles"],"parameters":[{"$ref":"#/components/parameters/roleId-root"},{"$ref":"#/components/parameters/userId"}],"responses":{"204":{"description":"The role was removed from the user."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Remove role from user","description":"Remove a role from a user with the given ID."}},"/api/roles/{id}/applications":{"get":{"operationId":"ListRoleApplications","tags":["Roles"],"parameters":[{"$ref":"#/components/parameters/roleId-root"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}},{"name":"search_params","in":"query","description":"Search query parameters.","required":false,"schema":{"type":"object","additionalProperties":{"type":"string"}},"explode":true}],"responses":{"200":{"description":"An array of applications that have the role assigned.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","secret","description","type","oidcClientMetadata","customClientMetadata","protectedAppMetadata","customData","isThirdParty","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"secret":{"type":"string","minLength":1,"maxLength":64},"description":{"nullable":true,"type":"string"},"type":{"type":"string","enum":["Native","SPA","Traditional","MachineToMachine","Protected"]},"oidcClientMetadata":{"type":"object","required":["redirectUris","postLogoutRedirectUris"],"properties":{"redirectUris":{"type":"array","items":{"oneOf":[{"type":"object","description":"Validator function"},{"type":"object","description":"Validator function"}]}},"postLogoutRedirectUris":{"type":"array","items":{"type":"string","format":"url"}},"backchannelLogoutUri":{"type":"string","format":"url"},"backchannelLogoutSessionRequired":{"type":"boolean"},"logoUri":{"type":"string"}}},"customClientMetadata":{"type":"object","properties":{"corsAllowedOrigins":{"type":"array","items":{"type":"string","minLength":1}},"idTokenTtl":{"type":"number"},"refreshTokenTtl":{"type":"number"},"refreshTokenTtlInDays":{"type":"number"},"tenantId":{"type":"string"},"alwaysIssueRefreshToken":{"type":"boolean"},"rotateRefreshToken":{"type":"boolean"}}},"protectedAppMetadata":{"nullable":true,"type":"object","required":["host","origin","sessionDuration","pageRules"],"properties":{"host":{"type":"string"},"origin":{"type":"string"},"sessionDuration":{"type":"number"},"pageRules":{"type":"array","items":{"type":"object","required":["path"],"properties":{"path":{"type":"string"}}}},"customDomains":{"type":"array","items":{"type":"object","required":["domain","status","errorMessage","dnsRecords","cloudflareData"],"properties":{"domain":{"type":"string"},"status":{"type":"string","enum":["PendingVerification","PendingSsl","Active","Error"]},"errorMessage":{"nullable":true,"type":"string"},"dnsRecords":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}}}},"cloudflareData":{"nullable":true,"type":"object","required":["id","status","ssl"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"ssl":{"type":"object","required":["status"],"properties":{"status":{"type":"string"},"validation_errors":{"type":"array","items":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"verification_errors":{"type":"array","items":{"type":"string"}}}}}}}}},"customData":{"type":"object","description":"arbitrary"},"isThirdParty":{"type":"boolean"},"createdAt":{"type":"number"}}}}}}},"204":{"description":"No Content"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get role applications","description":"Get applications that have the role assigned with pagination."},"post":{"operationId":"CreateRoleApplication","tags":["Roles"],"parameters":[{"$ref":"#/components/parameters/roleId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["applicationIds"],"properties":{"applicationIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of application IDs to be assigned."}}}}}},"responses":{"201":{"description":"The role was assigned to the applications successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Assign role to applications","description":"Assign a role to a list of applications. The role must have the type `Application`."}},"/api/roles/{id}/applications/{applicationId}":{"delete":{"operationId":"DeleteRoleApplication","tags":["Roles"],"parameters":[{"$ref":"#/components/parameters/roleId-root"},{"$ref":"#/components/parameters/applicationId"}],"responses":{"204":{"description":"The role was removed from the application."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Remove role from application","description":"Remove the role from an application with the given ID."}},"/api/roles/{id}/scopes":{"get":{"operationId":"ListRoleScopes","tags":["Roles"],"parameters":[{"$ref":"#/components/parameters/roleId-root"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}},{"name":"search_params","in":"query","description":"Search query parameters.","required":false,"schema":{"type":"object","additionalProperties":{"type":"string"}},"explode":true}],"responses":{"200":{"description":"An array of API resource scopes linked with the role.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","resourceId","name","description","createdAt","resource"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"resourceId":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"createdAt":{"type":"number"},"resource":{"type":"object","required":["tenantId","id","name","indicator","isDefault","accessTokenTtl"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1},"indicator":{"type":"string","minLength":1},"isDefault":{"type":"boolean"},"accessTokenTtl":{"type":"number"}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get role scopes","description":"Get API resource scopes (permissions) linked with a role."},"post":{"operationId":"CreateRoleScope","tags":["Roles"],"parameters":[{"$ref":"#/components/parameters/roleId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["scopeIds"],"properties":{"scopeIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of API resource scope IDs to be linked."}}}}}},"responses":{"200":{"description":"The role was linked to the scopes successfully."},"201":{"description":"Created","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","resourceId","name","description","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"resourceId":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"createdAt":{"type":"number"}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Link scopes to role","description":"Link a list of API resource scopes (permissions) to a role. The original linked scopes will be kept."}},"/api/roles/{id}/scopes/{scopeId}":{"delete":{"operationId":"DeleteRoleScope","tags":["Roles"],"parameters":[{"$ref":"#/components/parameters/roleId-root"},{"$ref":"#/components/parameters/scopeId"}],"responses":{"204":{"description":"The API resource scope was unlinked from the role."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Unlink scope from role","description":"Unlink an API resource scope (permission) from a role with the given ID."}},"/api/dashboard/users/total":{"get":{"operationId":"GetTotalUserCount","tags":["Dashboard"],"parameters":[],"responses":{"200":{"description":"Total user count.","content":{"application/json":{"schema":{"type":"object","required":["totalUserCount"],"properties":{"totalUserCount":{"type":"number"}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get total user count","description":"Get total user count in the current tenant."}},"/api/dashboard/users/new":{"get":{"operationId":"GetNewUserCounts","tags":["Dashboard"],"parameters":[],"responses":{"200":{"description":"New user count.","content":{"application/json":{"schema":{"type":"object","required":["today","last7Days"],"properties":{"today":{"type":"object","required":["count","delta"],"properties":{"count":{"type":"number"},"delta":{"type":"number"}}},"last7Days":{"type":"object","required":["count","delta"],"properties":{"count":{"type":"number"},"delta":{"type":"number"}}}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get new user count","description":"Get new user count in the past 7 days."}},"/api/dashboard/users/active":{"get":{"operationId":"GetActiveUserCounts","tags":["Dashboard"],"parameters":[{"name":"date","in":"query","required":false,"schema":{"type":"string","format":"regex","pattern":"/^\\d{4}(-\\d{2}){2}/"},"description":"The date to get active user data."}],"responses":{"200":{"description":"Active user data object.","content":{"application/json":{"schema":{"type":"object","required":["dauCurve","dau","wau","mau"],"properties":{"dauCurve":{"type":"array","items":{"type":"object","required":["date","count"],"properties":{"date":{"type":"string"},"count":{"type":"number"}}}},"dau":{"type":"object","required":["count","delta"],"properties":{"count":{"type":"number"},"delta":{"type":"number"}}},"wau":{"type":"object","required":["count","delta"],"properties":{"count":{"type":"number"},"delta":{"type":"number"}}},"mau":{"type":"object","required":["count","delta"],"properties":{"count":{"type":"number"},"delta":{"type":"number"}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get active user data","description":"Get active user data, including daily active user (DAU), weekly active user (WAU) and monthly active user (MAU). It also includes an array of DAU in the past 30 days."}},"/api/custom-phrases":{"get":{"operationId":"ListCustomPhrases","tags":["Custom phrases"],"parameters":[],"responses":{"200":{"description":"An array of custom phrases.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","languageTag","translation"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"languageTag":{"type":"string","minLength":1,"maxLength":16},"translation":{"$ref":"#/components/schemas/TranslationObject"}}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get all custom phrases","description":"Get all custom phrases for all languages."}},"/api/custom-phrases/{languageTag}":{"get":{"operationId":"GetCustomPhrase","tags":["Custom phrases"],"parameters":[{"name":"languageTag","in":"path","required":true,"schema":{"type":"string","enum":["af-ZA","am-ET","ar-AR","as-IN","az-AZ","be-BY","bg-BG","bn-IN","br-FR","bs-BA","ca-ES","cb-IQ","co-FR","cs-CZ","cx-PH","cy-GB","da-DK","de","de-DE","el-GR","en","en-GB","en-US","eo-EO","es","es-ES","es-419","et-EE","eu-ES","fa-IR","ff-NG","fi-FI","fo-FO","fr","fr-CA","fr-FR","fy-NL","ga-IE","gl-ES","gn-PY","gu-IN","ha-NG","he-IL","hi-IN","hr-HR","ht-HT","hu-HU","hy-AM","id-ID","ik-US","is-IS","it","it-IT","iu-CA","ja","ja-JP","ja-KS","jv-ID","ka-GE","kk-KZ","km-KH","kn-IN","ko","ko-KR","ku-TR","ky-KG","lo-LA","lt-LT","lv-LV","mg-MG","mk-MK","ml-IN","mn-MN","mr-IN","ms-MY","mt-MT","my-MM","nb-NO","ne-NP","nl-BE","nl-NL","nn-NO","or-IN","pa-IN","pl-PL","ps-AF","pt","pt-BR","pt-PT","ro-RO","ru","ru-RU","rw-RW","sc-IT","si-LK","sk-SK","sl-SI","sn-ZW","sq-AL","sr-RS","sv-SE","sw-KE","sy-SY","sz-PL","ta-IN","te-IN","tg-TJ","th-TH","tl-PH","tr","tr-TR","tt-RU","tz-MA","uk-UA","ur-PK","uz-UZ","vi-VN","zh","zh-CN","zh-HK","zh-MO","zh-TW","zz-TR"]}}],"responses":{"200":{"description":"Custom phrases for the specified language tag.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","languageTag","translation"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"languageTag":{"type":"string","minLength":1,"maxLength":16},"translation":{"$ref":"#/components/schemas/TranslationObject"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Custom phrases not found."}},"summary":"Get custom phrases","description":"Get custom phrases for the specified language tag."},"put":{"operationId":"ReplaceCustomPhrase","tags":["Custom phrases"],"parameters":[{"name":"languageTag","in":"path","required":true,"schema":{"type":"string","enum":["af-ZA","am-ET","ar-AR","as-IN","az-AZ","be-BY","bg-BG","bn-IN","br-FR","bs-BA","ca-ES","cb-IQ","co-FR","cs-CZ","cx-PH","cy-GB","da-DK","de","de-DE","el-GR","en","en-GB","en-US","eo-EO","es","es-ES","es-419","et-EE","eu-ES","fa-IR","ff-NG","fi-FI","fo-FO","fr","fr-CA","fr-FR","fy-NL","ga-IE","gl-ES","gn-PY","gu-IN","ha-NG","he-IL","hi-IN","hr-HR","ht-HT","hu-HU","hy-AM","id-ID","ik-US","is-IS","it","it-IT","iu-CA","ja","ja-JP","ja-KS","jv-ID","ka-GE","kk-KZ","km-KH","kn-IN","ko","ko-KR","ku-TR","ky-KG","lo-LA","lt-LT","lv-LV","mg-MG","mk-MK","ml-IN","mn-MN","mr-IN","ms-MY","mt-MT","my-MM","nb-NO","ne-NP","nl-BE","nl-NL","nn-NO","or-IN","pa-IN","pl-PL","ps-AF","pt","pt-BR","pt-PT","ro-RO","ru","ru-RU","rw-RW","sc-IT","si-LK","sk-SK","sl-SI","sn-ZW","sq-AL","sr-RS","sv-SE","sw-KE","sy-SY","sz-PL","ta-IN","te-IN","tg-TJ","th-TH","tl-PH","tr","tr-TR","tt-RU","tz-MA","uk-UA","ur-PK","uz-UZ","vi-VN","zh","zh-CN","zh-HK","zh-MO","zh-TW","zz-TR"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TranslationObject"},"example":{"phraseKey1":"new value1","phraseKey2":"new value2"}}}},"responses":{"201":{"description":"Custom phrases created or updated successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","languageTag","translation"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"languageTag":{"type":"string","minLength":1,"maxLength":16},"translation":{"$ref":"#/components/schemas/TranslationObject"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Invalid translation structure."}},"summary":"Upsert custom phrases","description":"Upsert custom phrases for the specified language tag. Upsert means that if the custom phrases already exist, they will be updated. Otherwise, they will be created."},"delete":{"operationId":"DeleteCustomPhrase","tags":["Custom phrases"],"parameters":[{"name":"languageTag","in":"path","required":true,"schema":{"type":"string","enum":["af-ZA","am-ET","ar-AR","as-IN","az-AZ","be-BY","bg-BG","bn-IN","br-FR","bs-BA","ca-ES","cb-IQ","co-FR","cs-CZ","cx-PH","cy-GB","da-DK","de","de-DE","el-GR","en","en-GB","en-US","eo-EO","es","es-ES","es-419","et-EE","eu-ES","fa-IR","ff-NG","fi-FI","fo-FO","fr","fr-CA","fr-FR","fy-NL","ga-IE","gl-ES","gn-PY","gu-IN","ha-NG","he-IL","hi-IN","hr-HR","ht-HT","hu-HU","hy-AM","id-ID","ik-US","is-IS","it","it-IT","iu-CA","ja","ja-JP","ja-KS","jv-ID","ka-GE","kk-KZ","km-KH","kn-IN","ko","ko-KR","ku-TR","ky-KG","lo-LA","lt-LT","lv-LV","mg-MG","mk-MK","ml-IN","mn-MN","mr-IN","ms-MY","mt-MT","my-MM","nb-NO","ne-NP","nl-BE","nl-NL","nn-NO","or-IN","pa-IN","pl-PL","ps-AF","pt","pt-BR","pt-PT","ro-RO","ru","ru-RU","rw-RW","sc-IT","si-LK","sk-SK","sl-SI","sn-ZW","sq-AL","sr-RS","sv-SE","sw-KE","sy-SY","sz-PL","ta-IN","te-IN","tg-TJ","th-TH","tl-PH","tr","tr-TR","tt-RU","tz-MA","uk-UA","ur-PK","uz-UZ","vi-VN","zh","zh-CN","zh-HK","zh-MO","zh-TW","zz-TR"]}}],"responses":{"204":{"description":"Custom phrases deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Custom phrases not found."},"409":{"description":"Cannot delete the default language."}},"summary":"Delete custom phrase","description":"Delete custom phrases for the specified language tag."}},"/api/hooks":{"get":{"operationId":"ListHooks","tags":["Hooks"],"parameters":[{"name":"includeExecutionStats","in":"query","required":false,"schema":{"type":"string"},"description":"Whether to include execution stats in the response."},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of hooks.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","event","events","config","signingKey","enabled","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","maxLength":256},"event":{"nullable":true,"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"]},"events":{"type":"array","items":{"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"]}},"config":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"retries":{"type":"number"}}},"signingKey":{"type":"string","maxLength":64},"enabled":{"type":"boolean"},"createdAt":{"type":"number"},"executionStats":{"type":"object","required":["successCount","requestCount"],"properties":{"successCount":{"type":"number"},"requestCount":{"type":"number"}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get hooks","description":"Get a list of hooks with optional pagination."},"post":{"operationId":"CreateHook","tags":["Hooks"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["config"],"properties":{"tenantId":{"type":"string","maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256,"description":"The name of the hook."},"event":{"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"],"deprecated":true,"description":"Use `events` instead."},"events":{"type":"array","items":{"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"]},"description":"An array of hook events."},"config":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"retries":{"type":"number","deprecated":true,"description":"Now the retry times is fixed to 3. Keep for backward compatibility."}}},"enabled":{"type":"boolean"},"createdAt":{"type":"number"}}}}}},"responses":{"201":{"description":"The hook was created successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","event","events","config","signingKey","enabled","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","maxLength":256},"event":{"nullable":true,"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"]},"events":{"type":"array","items":{"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"]}},"config":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"retries":{"type":"number"}}},"signingKey":{"type":"string","maxLength":64},"enabled":{"type":"boolean"},"createdAt":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Create a hook","description":"Create a new hook with the given data."}},"/api/hooks/{id}":{"get":{"operationId":"GetHook","tags":["Hooks"],"parameters":[{"$ref":"#/components/parameters/hookId-root"},{"name":"includeExecutionStats","in":"query","required":false,"schema":{"type":"string"},"description":"Whether to include execution stats in the response."}],"responses":{"200":{"description":"Details of the hook.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","event","events","config","signingKey","enabled","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","maxLength":256},"event":{"nullable":true,"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"]},"events":{"type":"array","items":{"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"]}},"config":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"retries":{"type":"number"}}},"signingKey":{"type":"string","maxLength":64},"enabled":{"type":"boolean"},"createdAt":{"type":"number"},"executionStats":{"type":"object","required":["successCount","requestCount"],"properties":{"successCount":{"type":"number"},"requestCount":{"type":"number"}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get hook","description":"Get hook details by ID."},"patch":{"operationId":"UpdateHook","tags":["Hooks"],"parameters":[{"$ref":"#/components/parameters/hookId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256,"description":"The updated name of the hook."},"event":{"nullable":true,"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"],"deprecated":true,"description":"Use `events` instead."},"events":{"type":"array","items":{"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"]},"description":"An array of updated hook events."},"config":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"retries":{"type":"number","deprecated":true,"description":"Now the retry times is fixed to 3. Keep for backward compatibility."}}},"enabled":{"type":"boolean"},"createdAt":{"type":"number"}}}}}},"responses":{"200":{"description":"The hook was updated successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","event","events","config","signingKey","enabled","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","maxLength":256},"event":{"nullable":true,"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"]},"events":{"type":"array","items":{"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"]}},"config":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"retries":{"type":"number"}}},"signingKey":{"type":"string","maxLength":64},"enabled":{"type":"boolean"},"createdAt":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Update hook","description":"Update hook details by ID with the given data."},"delete":{"operationId":"DeleteHook","tags":["Hooks"],"parameters":[{"$ref":"#/components/parameters/hookId-root"}],"responses":{"204":{"description":"The hook was deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Delete hook","description":"Delete hook by ID."}},"/api/hooks/{id}/recent-logs":{"get":{"operationId":"ListHookRecentLogs","tags":["Hooks"],"parameters":[{"$ref":"#/components/parameters/hookId-root"},{"name":"logKey","in":"query","required":false,"schema":{"type":"string"},"description":"The log key to filter logs."},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of recent logs for the hook.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["id","key","payload","createdAt"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"key":{"type":"string","minLength":1,"maxLength":128},"payload":{"type":"object","required":["key","result"],"properties":{"key":{"type":"string"},"result":{"type":"string","enum":["Success","Error"]},"error":{"oneOf":[{"type":"object","additionalProperties":{"example":{}}},{"type":"string"}]},"ip":{"type":"string"},"userAgent":{"type":"string"},"userId":{"type":"string"},"applicationId":{"type":"string"},"sessionId":{"type":"string"},"params":{"type":"object","additionalProperties":{"example":{}}}}},"createdAt":{"type":"number"}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get recent logs for a hook","description":"Get recent logs that match the given query for the specified hook with pagination."}},"/api/hooks/{id}/test":{"post":{"operationId":"CreateHookTest","tags":["Hooks"],"parameters":[{"$ref":"#/components/parameters/hookId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["events","config"],"properties":{"events":{"type":"array","items":{"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"]},"description":"An array of hook events for testing."},"config":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"retries":{"type":"number","deprecated":true,"description":"Now the retry times is fixed to 3. Keep for backward compatibility."}},"description":"The hook configuration for testing."},"event":{"deprecated":true,"description":"Use `events` instead."}}}}}},"responses":{"204":{"description":"The hook test was successful."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"Unprocessable Content"}},"summary":"Test hook","description":"Test the specified hook with the given events and config."}},"/api/hooks/{id}/signing-key":{"patch":{"operationId":"UpdateHookSigningKey","tags":["Hooks"],"parameters":[{"$ref":"#/components/parameters/hookId-root"}],"responses":{"200":{"description":"The signing key for the hook was updated successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","event","events","config","signingKey","enabled","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","maxLength":256},"event":{"nullable":true,"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"]},"events":{"type":"array","items":{"type":"string","enum":["PostRegister","PostSignIn","PostResetPassword","User.Created","User.Deleted","User.Data.Updated","User.SuspensionStatus.Updated","Role.Created","Role.Deleted","Role.Data.Updated","Role.Scopes.Updated","Scope.Created","Scope.Deleted","Scope.Data.Updated","Organization.Created","Organization.Deleted","Organization.Data.Updated","Organization.Membership.Updated","OrganizationRole.Created","OrganizationRole.Deleted","OrganizationRole.Data.Updated","OrganizationRole.Scopes.Updated","OrganizationScope.Created","OrganizationScope.Deleted","OrganizationScope.Data.Updated"]}},"config":{"type":"object","required":["url"],"properties":{"url":{"type":"string"},"headers":{"type":"object","additionalProperties":{"type":"string"}},"retries":{"type":"number"}}},"signingKey":{"type":"string","maxLength":64},"enabled":{"type":"boolean"},"createdAt":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Update signing key for a hook","description":"Update the signing key for the specified hook."}},"/api/verification-codes":{"post":{"operationId":"CreateVerificationCode","tags":["Verification codes"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"regex","pattern":"/^\\S+@\\S+\\.\\S+$/"}}},{"type":"object","required":["phone"],"properties":{"phone":{"type":"string","format":"regex","pattern":"/^\\d+$/"}}}]}}}},"responses":{"204":{"description":"Verification code requested and sent successfully."},"400":{"description":"Bad request. The payload may be invalid."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"501":{"description":"Not Implemented"}},"summary":"Request and send a verification code","description":"Request a verification code for the provided identifier (email/phone).\nif you're using email as the identifier, you need to setup your email connector first.\nif you're using phone as the identifier, you need to setup your SMS connector first."}},"/api/verification-codes/verify":{"post":{"operationId":"VerifyVerificationCode","tags":["Verification codes"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["email","verificationCode"],"properties":{"email":{"type":"string","format":"regex","pattern":"/^\\S+@\\S+\\.\\S+$/"},"verificationCode":{"type":"string","minLength":1}}},{"type":"object","required":["phone","verificationCode"],"properties":{"phone":{"type":"string","format":"regex","pattern":"/^\\d+$/"},"verificationCode":{"type":"string","minLength":1}}}]}}}},"responses":{"204":{"description":"Verification code verified successfully."},"400":{"description":"Bad request. The payload may be invalid."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Verify a verification code","description":"Verify a verification code for a specified identifier.\nif you're using email as the identifier, you need to setup your email connector first.\nif you're using phone as the identifier, you need to setup your SMS connector first."}},"/api/user-assets/service-status":{"get":{"operationId":"GetUserAssetServiceStatus","tags":["User assets"],"parameters":[],"responses":{"200":{"description":"An object containing the service status and metadata.","content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"oneOf":[{"type":"string","format":"\"ready\""},{"type":"string","format":"\"not_configured\""}]},"allowUploadMimeTypes":{"type":"array","items":{"type":"string","enum":["image/jpeg","image/png","image/gif","image/vnd.microsoft.icon","image/x-icon","image/svg+xml","image/tiff","image/webp","image/bmp","application/zip"]}},"maxUploadFileSize":{"type":"number"}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get service status","description":"Get user assets service status."}},"/api/user-assets":{"post":{"operationId":"CreateUserAsset","tags":["User assets"],"parameters":[],"responses":{"200":{"description":"An object containing the uploaded asset metadata.","content":{"application/json":{"schema":{"type":"object","required":["url"],"properties":{"url":{"type":"string"}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Upload asset","description":"Upload a user asset."}},"/api/domains":{"get":{"operationId":"ListDomains","tags":["Domains"],"parameters":[],"responses":{"200":{"description":"A list of domains.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["id","domain","status","errorMessage","dnsRecords"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"domain":{"type":"string","minLength":1,"maxLength":256},"status":{"type":"string","enum":["PendingVerification","PendingSsl","Active","Error"]},"errorMessage":{"nullable":true,"type":"string","maxLength":1024},"dnsRecords":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}}}}}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get domains","description":"Get all of your custom domains."},"post":{"operationId":"CreateDomain","tags":["Domains"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","minLength":1,"maxLength":256,"description":"The domain name, e.g. `example.com`."}}}}}},"responses":{"201":{"description":"The domain was created successfully.","content":{"application/json":{"schema":{"type":"object","required":["id","domain","status","errorMessage","dnsRecords"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"domain":{"type":"string","minLength":1,"maxLength":256},"status":{"type":"string","enum":["PendingVerification","PendingSsl","Active","Error"]},"errorMessage":{"nullable":true,"type":"string","maxLength":1024},"dnsRecords":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Validation error. Please check the request body."}},"summary":"Create domain","description":"Create a new domain with the given data. The maximum domain number is 1, once created, can not be modified, you'll have to delete and recreate one."}},"/api/domains/{id}":{"get":{"operationId":"GetDomain","tags":["Domains"],"parameters":[{"$ref":"#/components/parameters/domainId-root"}],"responses":{"200":{"description":"Details of the domain.","content":{"application/json":{"schema":{"type":"object","required":["id","domain","status","errorMessage","dnsRecords"],"properties":{"id":{"type":"string","minLength":1,"maxLength":21},"domain":{"type":"string","minLength":1,"maxLength":256},"status":{"type":"string","enum":["PendingVerification","PendingSsl","Active","Error"]},"errorMessage":{"nullable":true,"type":"string","maxLength":1024},"dnsRecords":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The domain with the specified ID was not found."}},"summary":"Get domain","description":"Get domain details by ID, by calling this API, the domain status will be synced from remote provider."},"delete":{"operationId":"DeleteDomain","tags":["Domains"],"parameters":[{"$ref":"#/components/parameters/domainId-root"}],"responses":{"204":{"description":"The domain was deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The domain with the specified ID was not found."}},"summary":"Delete domain","description":"Delete domain by ID."}},"/api/organization-roles/{id}":{"get":{"operationId":"GetOrganizationRole","tags":["Organization roles"],"parameters":[{"$ref":"#/components/parameters/organizationRoleId-root"}],"responses":{"200":{"description":"Details of the organization role.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","description","type"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"type":{"type":"string","enum":["User","MachineToMachine"]}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get organization role","description":"Get organization role details by ID."},"patch":{"operationId":"UpdateOrganizationRole","tags":["Organization roles"],"parameters":[{"$ref":"#/components/parameters/organizationRoleId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128,"description":"The updated name of the organization role. It must be unique within the organization template."},"description":{"nullable":true,"type":"string","maxLength":256,"description":"The updated description of the organization role."},"type":{"type":"string","enum":["User","MachineToMachine"]}}}}}},"responses":{"200":{"description":"The organization role was updated successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","description","type"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"type":{"type":"string","enum":["User","MachineToMachine"]}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"The organization role name is already in use."}},"summary":"Update organization role","description":"Update organization role details by ID with the given data."},"delete":{"operationId":"DeleteOrganizationRole","tags":["Organization roles"],"parameters":[{"$ref":"#/components/parameters/organizationRoleId-root"}],"responses":{"204":{"description":"The organization role was deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Delete organization role","description":"Delete organization role by ID."}},"/api/organization-roles":{"get":{"operationId":"ListOrganizationRoles","tags":["Organization roles"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of organization roles.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description","type","scopes","resourceScopes"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"type":{"type":"string","enum":["User","MachineToMachine"]},"scopes":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}},"resourceScopes":{"type":"array","items":{"type":"object","required":["id","name","resource"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"resource":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get organization roles","description":"Get organization roles with pagination."},"post":{"operationId":"CreateOrganizationRole","tags":["Organization roles"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","organizationScopeIds","resourceScopeIds"],"properties":{"tenantId":{"type":"string","maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128,"description":"The name of the organization role. It must be unique within the organization template."},"description":{"nullable":true,"type":"string","maxLength":256,"description":"The description of the organization role."},"type":{"type":"string","enum":["User","MachineToMachine"]},"organizationScopeIds":{"default":[],"type":"array","items":{"type":"string"},"description":"An array of organization scope IDs to be assigned to the organization role."},"resourceScopeIds":{"default":[],"type":"array","items":{"type":"string"},"description":"An array of resource scope IDs to be assigned to the organization role."}}}}}},"responses":{"201":{"description":"The organization role was created successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","description","type"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"type":{"type":"string","enum":["User","MachineToMachine"]}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The organization role name is already in use."}},"summary":"Create an organization role","description":"Create a new organization role with the given data."}},"/api/organization-roles/{id}/scopes":{"get":{"operationId":"ListOrganizationRoleScopes","tags":["Organization roles"],"parameters":[{"$ref":"#/components/parameters/organizationRoleId-root"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of organization scopes.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get organization role scopes","description":"Get all organization scopes that are assigned to the specified organization role."},"post":{"operationId":"CreateOrganizationRoleScope","tags":["Organization roles"],"parameters":[{"$ref":"#/components/parameters/organizationRoleId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationScopeIds"],"properties":{"organizationScopeIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of organization scope IDs to be assigned. Existed scope IDs assignments will be ignored."}}}}}},"responses":{"201":{"description":"Organization scopes were assigned successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"At least one of the IDs provided is invalid. For example, the organization scope ID does not exist;"}},"summary":"Assign organization scopes to organization role","description":"Assign organization scopes to the specified organization role"},"put":{"operationId":"ReplaceOrganizationRoleScopes","tags":["Organization roles"],"parameters":[{"$ref":"#/components/parameters/organizationRoleId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationScopeIds"],"properties":{"organizationScopeIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of organization scope IDs to replace existing scopes."}}}}}},"responses":{"204":{"description":"Organization scopes were replaced successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"At least one of the IDs provided is invalid. For example, the organization scope ID does not exist."}},"summary":"Replace organization scopes for organization role","description":"Replace all organization scopes that are assigned to the specified organization role with the given organization scopes. This effectively removes all existing organization scope assignments and replaces them with the new ones."}},"/api/organization-roles/{id}/scopes/{organizationScopeId}":{"delete":{"operationId":"DeleteOrganizationRoleScope","tags":["Organization roles"],"parameters":[{"$ref":"#/components/parameters/organizationRoleId-root"},{"$ref":"#/components/parameters/organizationScopeId"}],"responses":{"204":{"description":"Organization scope assignment was removed successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Unprocessable Content"}},"summary":"Remove organization scope","description":"Remove a organization scope assignment from the specified organization role."}},"/api/organization-roles/{id}/resource-scopes":{"get":{"operationId":"ListOrganizationRoleResourceScopes","tags":["Organization roles"],"parameters":[{"$ref":"#/components/parameters/organizationRoleId-root"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of resource scopes.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","resourceId","name","description","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"resourceId":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"nullable":true,"type":"string"},"createdAt":{"type":"number"}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get organization role resource scopes","description":"Get all resource scopes that are assigned to the specified organization role."},"post":{"operationId":"CreateOrganizationRoleResourceScope","tags":["Organization roles"],"parameters":[{"$ref":"#/components/parameters/organizationRoleId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["scopeIds"],"properties":{"scopeIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of resource scope IDs to be assigned. Existed scope IDs assignments will be ignored."}}}}}},"responses":{"201":{"description":"Resource scopes were assigned successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"At least one of the IDs provided is invalid. For example, the resource scope ID does not exist;"}},"summary":"Assign resource scopes to organization role","description":"Assign resource scopes to the specified organization role"},"put":{"operationId":"ReplaceOrganizationRoleResourceScopes","tags":["Organization roles"],"parameters":[{"$ref":"#/components/parameters/organizationRoleId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["scopeIds"],"properties":{"scopeIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of resource scope IDs to replace existing scopes."}}}}}},"responses":{"204":{"description":"Resource scopes were replaced successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"At least one of the IDs provided is invalid. For example, the resource scope ID does not exist."}},"summary":"Replace resource scopes for organization role","description":"Replace all resource scopes that are assigned to the specified organization role with the given resource scopes. This effectively removes all existing organization scope assignments and replaces them with the new ones."}},"/api/organization-roles/{id}/resource-scopes/{scopeId}":{"delete":{"operationId":"DeleteOrganizationRoleResourceScope","tags":["Organization roles"],"parameters":[{"$ref":"#/components/parameters/organizationRoleId-root"},{"$ref":"#/components/parameters/scopeId"}],"responses":{"204":{"description":"Resource scope assignment was removed successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Unprocessable Content"}},"summary":"Remove resource scope","description":"Remove a resource scope assignment from the specified organization role."}},"/api/organization-scopes":{"get":{"operationId":"ListOrganizationScopes","tags":["Organization scopes"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of organization scopes.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get organization scopes","description":"Get organization scopes that match with pagination."},"post":{"operationId":"CreateOrganizationScope","tags":["Organization scopes"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"tenantId":{"type":"string","maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128,"description":"The name of the organization scope. It must be unique within the organization template."},"description":{"nullable":true,"type":"string","maxLength":256,"description":"The description of the organization scope."}}}}}},"responses":{"201":{"description":"The organization scope was created successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","description"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The organization scope name is already in use."}},"summary":"Create an organization scope","description":"Create a new organization scope with the given data."}},"/api/organization-scopes/{id}":{"get":{"operationId":"GetOrganizationScope","tags":["Organization scopes"],"parameters":[{"$ref":"#/components/parameters/organizationScopeId-root"}],"responses":{"200":{"description":"The organization scope data for the given ID.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","description"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get organization scope","description":"Get organization scope details by ID."},"patch":{"operationId":"UpdateOrganizationScope","tags":["Organization scopes"],"parameters":[{"$ref":"#/components/parameters/organizationScopeId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128,"description":"The updated name of the organization scope. It must be unique within the organization template."},"description":{"nullable":true,"type":"string","maxLength":256,"description":"The updated description of the organization scope."}}}}}},"responses":{"200":{"description":"The organization scope was updated successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","description"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"},"422":{"description":"The organization scope name is already in use."}},"summary":"Update organization scope","description":"Update organization scope details by ID with the given data."},"delete":{"operationId":"DeleteOrganizationScope","tags":["Organization scopes"],"parameters":[{"$ref":"#/components/parameters/organizationScopeId-root"}],"responses":{"204":{"description":"The organization scope was deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Delete organization scope","description":"Delete organization scope by ID."}},"/api/organization-invitations/{id}":{"get":{"operationId":"GetOrganizationInvitation","tags":["Organization invitations"],"parameters":[{"$ref":"#/components/parameters/organizationInvitationId-root"}],"responses":{"200":{"description":"The organization invitation, also contains the organization roles to be assigned to the user when they accept the invitation.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","inviterId","invitee","acceptedUserId","organizationId","status","createdAt","updatedAt","expiresAt","organizationRoles"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"inviterId":{"nullable":true,"type":"string","maxLength":21},"invitee":{"type":"string","minLength":1,"maxLength":256},"acceptedUserId":{"nullable":true,"type":"string","maxLength":21},"organizationId":{"type":"string","minLength":1,"maxLength":21},"status":{"type":"string","enum":["Pending","Accepted","Expired","Revoked"]},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"expiresAt":{"type":"number"},"organizationRoles":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get organization invitation","description":"Get an organization invitation by ID."},"delete":{"operationId":"DeleteOrganizationInvitation","tags":["Organization invitations"],"parameters":[{"$ref":"#/components/parameters/organizationInvitationId-root"}],"responses":{"204":{"description":"The organization invitation was deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Delete organization invitation","description":"Delete an organization invitation by ID."}},"/api/organization-invitations":{"get":{"operationId":"ListOrganizationInvitations","tags":["Organization invitations"],"parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"inviterId","in":"query","required":false,"schema":{"type":"string"}},{"name":"invitee","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"A list of organization invitations, each item also contains the organization roles to be assigned to the user when they accept the invitation.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","inviterId","invitee","acceptedUserId","organizationId","status","createdAt","updatedAt","expiresAt","organizationRoles"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"inviterId":{"nullable":true,"type":"string","maxLength":21},"invitee":{"type":"string","minLength":1,"maxLength":256},"acceptedUserId":{"nullable":true,"type":"string","maxLength":21},"organizationId":{"type":"string","minLength":1,"maxLength":21},"status":{"type":"string","enum":["Pending","Accepted","Expired","Revoked"]},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"expiresAt":{"type":"number"},"organizationRoles":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get organization invitations","description":"Get organization invitations."},"post":{"operationId":"CreateOrganizationInvitation","tags":["Organization invitations"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["invitee","organizationId","expiresAt","messagePayload"],"properties":{"inviterId":{"nullable":true,"type":"string","maxLength":21,"description":"The ID of the user who is inviting the user to join the organization."},"invitee":{"type":"string","format":"email","description":"The email address of the user to invite to join the organization."},"organizationId":{"type":"string","minLength":1,"maxLength":21,"description":"The ID of the organization to invite the user to join."},"expiresAt":{"type":"number","description":"The epoch time in milliseconds when the invitation expires."},"organizationRoleIds":{"type":"array","items":{"type":"string"},"description":"The IDs of the organization roles to assign to the user when they accept the invitation."},"messagePayload":{"default":false,"oneOf":[{"allOf":[{"type":"object","properties":{"code":{"type":"string"},"link":{"type":"string"}}},{"type":"object","additionalProperties":{"type":"string"}}]},{"type":"boolean","format":"false"}],"description":"The message payload for the \"OrganizationInvitation\" template to use when sending the invitation via email. If it is `false`, the invitation will not be sent via email."}}}}},"description":"The organization invitation to create."},"responses":{"201":{"description":"The organization invitation was created successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","inviterId","invitee","acceptedUserId","organizationId","status","createdAt","updatedAt","expiresAt","organizationRoles"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"inviterId":{"nullable":true,"type":"string","maxLength":21},"invitee":{"type":"string","minLength":1,"maxLength":256},"acceptedUserId":{"nullable":true,"type":"string","maxLength":21},"organizationId":{"type":"string","minLength":1,"maxLength":21},"status":{"type":"string","enum":["Pending","Accepted","Expired","Revoked"]},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"expiresAt":{"type":"number"},"organizationRoles":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}},"400":{"description":"The organization invitation could not be created. This can happen if the input is invalid or if the expiration date is in the past."},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Unprocessable Content"},"501":{"description":"No email connector is configured for the tenant."}},"summary":"Create organization invitation","description":"Create an organization invitation and optionally send it via email. The tenant should have an email connector configured if you want to send the invitation via email at this point."}},"/api/organization-invitations/{id}/message":{"post":{"operationId":"CreateOrganizationInvitationMessage","tags":["Organization invitations"],"parameters":[{"$ref":"#/components/parameters/organizationInvitationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"code":{"type":"string"},"link":{"type":"string"}}},{"type":"object","additionalProperties":{"type":"string"}}]}}},"description":"The message payload for the \"OrganizationInvitation\" template to use when sending the invitation via email."},"responses":{"204":{"description":"The invitation message was resent successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Resend invitation message","description":"Resend the invitation message to the invitee."}},"/api/organization-invitations/{id}/status":{"put":{"operationId":"ReplaceOrganizationInvitationStatus","tags":["Organization invitations"],"parameters":[{"$ref":"#/components/parameters/organizationInvitationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"acceptedUserId":{"nullable":true,"type":"string","maxLength":21,"description":"The ID of the user who accepted the organization invitation. Required if the status is \"Accepted\"."},"status":{"type":"string","enum":["Accepted","Revoked"],"description":"The status of the organization invitation."}}}}},"description":"The organization invitation status to update."},"responses":{"200":{"description":"The organization invitation status was updated successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","inviterId","invitee","acceptedUserId","organizationId","status","createdAt","updatedAt","expiresAt","organizationRoles"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"inviterId":{"nullable":true,"type":"string","maxLength":21},"invitee":{"type":"string","minLength":1,"maxLength":256},"acceptedUserId":{"nullable":true,"type":"string","maxLength":21},"organizationId":{"type":"string","minLength":1,"maxLength":21},"status":{"type":"string","enum":["Pending","Accepted","Expired","Revoked"]},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"expiresAt":{"type":"number"},"organizationRoles":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The organization invitation status could not be updated. This can happen if the current status is not \"Pending\" or if the status is \"Accepted\" and the accepted user ID is not provided."}},"summary":"Update organization invitation status","description":"Update the status of an organization invitation by ID."}},"/api/organizations":{"post":{"operationId":"CreateOrganization","tags":["Organizations"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"tenantId":{"type":"string","maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128,"description":"The name of the organization."},"description":{"nullable":true,"type":"string","maxLength":256,"description":"The description of the organization."},"customData":{"type":"object","description":"arbitrary"},"isMfaRequired":{"type":"boolean"},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"createdAt":{"type":"number"}}}}}},"responses":{"201":{"description":"The organization was created successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","description","customData","isMfaRequired","branding","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"customData":{"type":"object","description":"arbitrary"},"isMfaRequired":{"type":"boolean"},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"createdAt":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Create an organization","description":"Create a new organization with the given data."},"get":{"operationId":"ListOrganizations","tags":["Organizations"],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"The query to filter organizations. It can be a partial ID or name.\n\nIf not provided, all organizations will be returned."},{"name":"showFeatured","in":"query","required":false,"schema":{"type":"string"},"description":"Whether to show featured users in the organization. Featured users are randomly selected from the organization members.\n\nIf not provided, `featuredUsers` will not be included in the response."},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of organizations.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description","customData","isMfaRequired","branding","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"customData":{"type":"object","description":"arbitrary"},"isMfaRequired":{"type":"boolean"},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"createdAt":{"type":"number"},"usersCount":{"type":"number"},"featuredUsers":{"type":"array","items":{"type":"object","required":["id","avatar","name"],"properties":{"id":{"type":"string","minLength":1,"maxLength":12},"avatar":{"nullable":true,"type":"string","maxLength":2048},"name":{"nullable":true,"type":"string","maxLength":128}}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get organizations","description":"Get organizations that match the given query with pagination."}},"/api/organizations/{id}":{"get":{"operationId":"GetOrganization","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"responses":{"200":{"description":"Details of the organization.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","description","customData","isMfaRequired","branding","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"customData":{"type":"object","description":"arbitrary"},"isMfaRequired":{"type":"boolean"},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"createdAt":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get organization","description":"Get organization details by ID."},"patch":{"operationId":"UpdateOrganization","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128,"description":"The updated name of the organization."},"description":{"nullable":true,"type":"string","maxLength":256,"description":"The updated description of the organization."},"customData":{"type":"object","description":"arbitrary"},"isMfaRequired":{"type":"boolean"},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"createdAt":{"type":"number"}}}}}},"responses":{"200":{"description":"The organization was updated successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","name","description","customData","isMfaRequired","branding","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"customData":{"type":"object","description":"arbitrary"},"isMfaRequired":{"type":"boolean"},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"createdAt":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Update organization","description":"Update organization details by ID with the given data."},"delete":{"operationId":"DeleteOrganization","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"responses":{"204":{"description":"The organization was deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Delete organization","description":"Delete organization by ID."}},"/api/organizations/{id}/users":{"post":{"operationId":"AddOrganizationUsers","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userIds"],"properties":{"userIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of user IDs to be added to the organization. Organization existed users assignment will be ignored."}}}}}},"responses":{"201":{"description":"Users were added to the organization successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"At least one of the IDs provided is not valid. For example, the organization ID or user ID does not exist."}},"summary":"Add user members to organization","description":"Add users as members to the specified organization with the given user IDs."},"put":{"operationId":"ReplaceOrganizationUsers","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userIds"],"properties":{"userIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of user IDs to replace existing users."}}}}}},"responses":{"204":{"description":"Successfully replaced all users for the organization."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"At least one of the IDs provided is not valid. For example, the organization ID or user ID does not exist."}},"summary":"Replace organization user members","description":"Replace all user members for the specified organization with the given users. This effectively removing all existing user memberships in the organization and adding the new users as members."},"get":{"operationId":"ListOrganizationUsers","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"name":"q","in":"query","required":false,"schema":{"type":"string"},"description":"The query to filter users. It will match multiple fields of users, including ID, name, username, email, and phone number.\n\nIf not provided, all users will be returned."},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of users that are members of the organization.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["id","username","primaryEmail","primaryPhone","name","avatar","customData","identities","lastSignInAt","createdAt","updatedAt","profile","applicationId","isSuspended","organizationRoles"],"properties":{"id":{"type":"string","minLength":1,"maxLength":12},"username":{"nullable":true,"type":"string","maxLength":128},"primaryEmail":{"nullable":true,"type":"string","maxLength":128},"primaryPhone":{"nullable":true,"type":"string","maxLength":128},"name":{"nullable":true,"type":"string","maxLength":128},"avatar":{"nullable":true,"type":"string","maxLength":2048},"customData":{"type":"object","description":"arbitrary"},"identities":{"type":"object","additionalProperties":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string"},"details":{"type":"object","description":"arbitrary"}}}},"lastSignInAt":{"nullable":true,"type":"number"},"createdAt":{"type":"number"},"updatedAt":{"type":"number"},"profile":{"type":"object","properties":{"familyName":{"type":"string"},"givenName":{"type":"string"},"middleName":{"type":"string"},"nickname":{"type":"string"},"preferredUsername":{"type":"string"},"profile":{"type":"string"},"website":{"type":"string"},"gender":{"type":"string"},"birthdate":{"type":"string"},"zoneinfo":{"type":"string"},"locale":{"type":"string"},"address":{"type":"object","properties":{"formatted":{"type":"string"},"streetAddress":{"type":"string"},"locality":{"type":"string"},"region":{"type":"string"},"postalCode":{"type":"string"},"country":{"type":"string"}}}}},"applicationId":{"nullable":true,"type":"string","maxLength":21},"isSuspended":{"type":"boolean"},"organizationRoles":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get organization user members","description":"Get users that are members of the specified organization for the given query with pagination."}},"/api/organizations/{id}/users/{userId}":{"delete":{"operationId":"DeleteOrganizationUser","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"$ref":"#/components/parameters/userId"}],"responses":{"204":{"description":"The user was removed from the organization members successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The user is not a member of the organization."},"422":{"description":"Unprocessable Content"}},"summary":"Remove user member from organization","description":"Remove a user's membership from the specified organization."}},"/api/organizations/{id}/users/roles":{"post":{"operationId":"AssignOrganizationRolesToUsers","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userIds","organizationRoleIds"],"properties":{"userIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of user IDs to assign roles."},"organizationRoleIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of organization role IDs to assign. User existed roles assignment will be ignored."}}}}}},"responses":{"201":{"description":"Roles were assigned to organization users successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"At least one of the IDs provided is not valid. For example, the organization ID, user ID, or organization role ID does not exist; the user is not a member of the organization; or the role type is not assignable to the user."}},"summary":"Assign roles to organization user members","description":"Assign roles to user members of the specified organization."}},"/api/organizations/{id}/users/{userId}/roles":{"get":{"operationId":"ListOrganizationUserRoles","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"$ref":"#/components/parameters/userId"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of roles assigned to the user.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description","type"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"type":{"type":"string","enum":["User","MachineToMachine"]}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The user is not a member of the organization."}},"summary":"Get roles for a user in an organization","description":"Get roles assigned to a user in the specified organization with pagination."},"post":{"operationId":"AssignOrganizationRolesToUser","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationRoleIds"],"properties":{"organizationRoleIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of organization role IDs to assign to the user. User existed roles assignment will be ignored."}}}}}},"responses":{"201":{"description":"Roles were assigned to the user successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The user is not a member of the organization; or at least one of the IDs provided is not valid. For example, the organization ID or organization role ID does not exist."}},"summary":"Assign roles to a user in an organization","description":"Assign roles to a user in the specified organization with the provided data."},"put":{"operationId":"ReplaceOrganizationUserRoles","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"$ref":"#/components/parameters/userId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationRoleIds"],"properties":{"organizationRoleIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of organization role IDs to update for the user."}}}}}},"responses":{"204":{"description":"Roles were updated for the user successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The user is not a member of the organization; or at least one of the IDs provided is not valid. For example, the organization ID or organization role ID does not exist."}},"summary":"Update roles for a user in an organization","description":"Update roles assigned to a user in the specified organization with the provided data."}},"/api/organizations/{id}/users/{userId}/roles/{organizationRoleId}":{"delete":{"operationId":"DeleteOrganizationUserRole","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"$ref":"#/components/parameters/userId"},{"$ref":"#/components/parameters/organizationRoleId"}],"responses":{"204":{"description":"The role was removed from the user successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Cannot find the record to delete."},"422":{"description":"The user is not a member of the organization."}},"summary":"Remove a role from a user in an organization","description":"Remove a role assignment from a user in the specified organization."}},"/api/organizations/{id}/users/{userId}/scopes":{"get":{"operationId":"ListOrganizationUserScopes","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"$ref":"#/components/parameters/userId"}],"responses":{"200":{"description":"A list of scopes assigned to the user.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The user is not a member of the organization."}},"summary":"Get scopes for a user in an organization tailored by the organization roles","description":"Get scopes assigned to a user in the specified organization tailored by the organization roles. The scopes are derived from the organization roles assigned to the user."}},"/api/organizations/{id}/applications":{"post":{"operationId":"AddOrganizationApplications","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["applicationIds"],"properties":{"applicationIds":{"type":"array","items":{"type":"string","minLength":1},"description":"The application IDs to add."}}}}}},"responses":{"201":{"description":"The application was added successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The application could not be added. Some of the applications may not exist."}},"summary":"Add organization application","description":"Add an application to the organization."},"put":{"operationId":"ReplaceOrganizationApplications","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["applicationIds"],"properties":{"applicationIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of application IDs to replace existing applications."}}}}}},"responses":{"204":{"description":"The applications were replaced successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The applications could not be replaced. Some of the applications may not exist."}},"summary":"Replace organization applications","description":"Replace all applications associated with the organization with the given data."},"get":{"operationId":"ListOrganizationApplications","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"name":"q","in":"query","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of applications.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","secret","description","type","oidcClientMetadata","customClientMetadata","protectedAppMetadata","customData","isThirdParty","createdAt","organizationRoles"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":256},"secret":{"$ref":"#/components/schemas/ApplicationLegacySecret"},"description":{"nullable":true,"type":"string"},"type":{"type":"string","enum":["Native","SPA","Traditional","MachineToMachine","Protected"]},"oidcClientMetadata":{"type":"object","required":["redirectUris","postLogoutRedirectUris"],"properties":{"redirectUris":{"type":"array","items":{"oneOf":[{"type":"object","description":"Validator function"},{"type":"object","description":"Validator function"}]}},"postLogoutRedirectUris":{"type":"array","items":{"type":"string","format":"url"}},"backchannelLogoutUri":{"type":"string","format":"url"},"backchannelLogoutSessionRequired":{"type":"boolean"},"logoUri":{"type":"string"}}},"customClientMetadata":{"type":"object","properties":{"corsAllowedOrigins":{"type":"array","items":{"type":"string","minLength":1}},"idTokenTtl":{"type":"number"},"refreshTokenTtl":{"type":"number"},"refreshTokenTtlInDays":{"type":"number"},"tenantId":{"type":"string"},"alwaysIssueRefreshToken":{"type":"boolean"},"rotateRefreshToken":{"type":"boolean"}}},"protectedAppMetadata":{"nullable":true,"type":"object","required":["host","origin","sessionDuration","pageRules"],"properties":{"host":{"type":"string"},"origin":{"type":"string"},"sessionDuration":{"type":"number"},"pageRules":{"type":"array","items":{"type":"object","required":["path"],"properties":{"path":{"type":"string"}}}},"customDomains":{"type":"array","items":{"type":"object","required":["domain","status","errorMessage","dnsRecords","cloudflareData"],"properties":{"domain":{"type":"string"},"status":{"type":"string","enum":["PendingVerification","PendingSsl","Active","Error"]},"errorMessage":{"nullable":true,"type":"string"},"dnsRecords":{"type":"array","items":{"type":"object","required":["name","type","value"],"properties":{"name":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"}}}},"cloudflareData":{"nullable":true,"type":"object","required":["id","status","ssl"],"properties":{"id":{"type":"string"},"status":{"type":"string"},"ssl":{"type":"object","required":["status"],"properties":{"status":{"type":"string"},"validation_errors":{"type":"array","items":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"verification_errors":{"type":"array","items":{"type":"string"}}}}}}}}},"customData":{"type":"object","description":"arbitrary"},"isThirdParty":{"type":"boolean"},"createdAt":{"type":"number"},"organizationRoles":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"string"},"name":{"type":"string"}}}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get organization applications","description":"Get applications associated with the organization."}},"/api/organizations/{id}/applications/{applicationId}":{"delete":{"operationId":"DeleteOrganizationApplication","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"$ref":"#/components/parameters/applicationId"}],"responses":{"204":{"description":"The application was removed from the organization successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Unprocessable Content"}},"summary":"Remove organization application","description":"Remove an application from the organization."}},"/api/organizations/{id}/applications/roles":{"post":{"operationId":"AssignOrganizationRolesToApplications","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["applicationIds","organizationRoleIds"],"properties":{"applicationIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of application IDs to assign roles to."},"organizationRoleIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of organization role IDs to assign to the applications."}}}}}},"responses":{"201":{"description":"Roles were assigned to the applications successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"At least one of the IDs provided is not valid. For example, the organization ID, application ID, or organization role ID does not exist; the application is not a member of the organization; or the role type is not assignable to the application."}},"summary":"Assign roles to applications in an organization","description":"Assign roles to applications in the specified organization."}},"/api/organizations/{id}/applications/{applicationId}/roles":{"get":{"operationId":"ListOrganizationApplicationRoles","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"$ref":"#/components/parameters/applicationId"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of roles.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description","type"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"type":{"type":"string","enum":["User","MachineToMachine"]}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"Unprocessable Content"}},"summary":"Get organization application roles","description":"Get roles associated with the application in the organization."},"post":{"operationId":"AssignOrganizationRolesToApplication","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"$ref":"#/components/parameters/applicationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationRoleIds"],"properties":{"organizationRoleIds":{"type":"array","items":{"type":"string","minLength":1},"description":"The role ID to add."}}}}}},"responses":{"201":{"description":"The role was added successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The role could not be added. Some of the roles may not exist."}},"summary":"Add organization application role","description":"Add a role to the application in the organization."},"put":{"operationId":"ReplaceOrganizationApplicationRoles","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"$ref":"#/components/parameters/applicationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationRoleIds"],"properties":{"organizationRoleIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of role IDs to replace existing roles."}}}}}},"responses":{"204":{"description":"The roles were replaced successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The roles could not be replaced. Some of the roles may not exist."}},"summary":"Replace organization application roles","description":"Replace all roles associated with the application in the organization with the given data."}},"/api/organizations/{id}/applications/{applicationId}/roles/{organizationRoleId}":{"delete":{"operationId":"DeleteOrganizationApplicationRole","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"$ref":"#/components/parameters/applicationId"},{"$ref":"#/components/parameters/organizationRoleId"}],"responses":{"204":{"description":"The role was removed from the application in the organization successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Cannot find the record to delete."},"422":{"description":"The application is not associated with the organization."}},"summary":"Remove organization application role","description":"Remove a role from the application in the organization."}},"/api/organizations/{id}/jit/email-domains":{"get":{"operationId":"ListOrganizationJitEmailDomains","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of email domains.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","organizationId","emailDomain"],"properties":{"tenantId":{"type":"string","maxLength":21},"organizationId":{"type":"string","minLength":1,"maxLength":21},"emailDomain":{"type":"string","minLength":1,"maxLength":128}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Get organization JIT email domains","description":"Get email domains for just-in-time provisioning of users in the organization."},"post":{"operationId":"CreateOrganizationJitEmailDomain","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["emailDomain"],"properties":{"emailDomain":{"type":"string","minLength":1,"description":"The email domain to add."}}}}}},"responses":{"201":{"description":"The email domain was added successfully.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","organizationId","emailDomain"],"properties":{"tenantId":{"type":"string","maxLength":21},"organizationId":{"type":"string","minLength":1,"maxLength":21},"emailDomain":{"type":"string","minLength":1,"maxLength":128}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The email domain is already in use."}},"summary":"Add organization JIT email domain","description":"Add a new email domain for just-in-time provisioning of users in the organization."},"put":{"operationId":"ReplaceOrganizationJitEmailDomains","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["emailDomains"],"properties":{"emailDomains":{"type":"array","items":{"type":"string"},"description":"An array of email domains to replace existing email domains."}}}}}},"responses":{"204":{"description":"The email domains were replaced successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"Replace organization JIT email domains","description":"Replace all just-in-time provisioning email domains for the organization with the given data."}},"/api/organizations/{id}/jit/email-domains/{emailDomain}":{"delete":{"operationId":"DeleteOrganizationJitEmailDomain","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"name":"emailDomain","in":"path","required":true,"schema":{"type":"string","minLength":1},"description":"The email domain to remove."}],"responses":{"204":{"description":"The email domain was removed successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The email domain was not found."}},"summary":"Remove organization JIT email domain","description":"Remove an email domain for just-in-time provisioning of users in the organization."}},"/api/organizations/{id}/jit/roles":{"get":{"operationId":"ListOrganizationJitRoles","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of organization roles.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","name","description","type"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"nullable":true,"type":"string","maxLength":256},"type":{"type":"string","enum":["User","MachineToMachine"]}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get organization JIT default roles","description":"Get organization roles that will be assigned to users during just-in-time provisioning."},"post":{"operationId":"CreateOrganizationJitRole","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationRoleIds"],"properties":{"organizationRoleIds":{"type":"array","items":{"type":"string","minLength":1},"description":"The organization role IDs to add."}}}}}},"responses":{"201":{"description":"The organization roles were added successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The organization roles could not be added. Some of the organization roles may not exist."}},"summary":"Add organization JIT default roles","description":"Add new organization roles that will be assigned to users during just-in-time provisioning."},"put":{"operationId":"ReplaceOrganizationJitRoles","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["organizationRoleIds"],"properties":{"organizationRoleIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of organization role IDs to replace existing organization roles."}}}}}},"responses":{"204":{"description":"The organization roles were replaced successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The organization roles could not be replaced. Some of the organization roles may not exist."}},"summary":"Replace organization JIT default roles","description":"Replace all organization roles that will be assigned to users during just-in-time provisioning with the given data."}},"/api/organizations/{id}/jit/roles/{organizationRoleId}":{"delete":{"operationId":"DeleteOrganizationJitRole","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"$ref":"#/components/parameters/organizationRoleId"}],"responses":{"204":{"description":"The organization role was removed successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The organization role could not be removed. The organization role may not exist."}},"summary":"Remove organization JIT default role","description":"Remove an organization role that will be assigned to users during just-in-time provisioning."}},"/api/organizations/{id}/jit/sso-connectors":{"get":{"operationId":"ListOrganizationJitSsoConnectors","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of SSO connectors.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","providerName","connectorName","config","domains","branding","syncProfile","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":128},"providerName":{"type":"string","minLength":1,"maxLength":128},"connectorName":{"type":"string","minLength":1,"maxLength":128},"config":{"type":"object","description":"arbitrary"},"domains":{"type":"array","items":{"type":"string"}},"branding":{"type":"object","properties":{"displayName":{"type":"string"},"logo":{"type":"string"},"darkLogo":{"type":"string"}}},"syncProfile":{"type":"boolean"},"createdAt":{"type":"number"}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found"}},"summary":"Get organization JIT SSO connectors","description":"Get enterprise SSO connectors for just-in-time provisioning of users in the organization."},"post":{"operationId":"CreateOrganizationJitSsoConnector","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ssoConnectorIds"],"properties":{"ssoConnectorIds":{"type":"array","items":{"type":"string","minLength":1},"description":"The SSO connector IDs to add."}}}}}},"responses":{"201":{"description":"The SSO connectors were added successfully.","content":{"application/json":{}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The SSO connectors could not be added. Some of the SSO connectors may not exist."}},"summary":"Add organization JIT SSO connectors","description":"Add new enterprise SSO connectors for just-in-time provisioning of users in the organization."},"put":{"operationId":"ReplaceOrganizationJitSsoConnectors","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["ssoConnectorIds"],"properties":{"ssoConnectorIds":{"type":"array","items":{"type":"string","minLength":1},"description":"An array of SSO connector IDs to replace existing SSO connectors."}}}}}},"responses":{"204":{"description":"The SSO connectors were replaced successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The SSO connectors could not be replaced. Some of the SSO connectors may not exist."}},"summary":"Replace organization JIT SSO connectors","description":"Replace all enterprise SSO connectors for just-in-time provisioning of users in the organization with the given data."}},"/api/organizations/{id}/jit/sso-connectors/{ssoConnectorId}":{"delete":{"operationId":"DeleteOrganizationJitSsoConnector","tags":["Organizations"],"parameters":[{"$ref":"#/components/parameters/organizationId-root"},{"$ref":"#/components/parameters/ssoConnectorId"}],"responses":{"204":{"description":"The SSO connector was removed successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"422":{"description":"The SSO connector could not be removed. The SSO connector may not exist."}},"summary":"Remove organization JIT SSO connector","description":"Remove an enterprise SSO connector for just-in-time provisioning of users in the organization."}},"/api/sso-connector-providers":{"get":{"operationId":"ListSsoConnectorProviders","tags":["SSO connector providers"],"parameters":[],"responses":{"200":{"description":"A list of SSO provider data.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["providerName","providerType","logo","logoDark","description","name"],"properties":{"providerName":{"type":"string","enum":["OIDC","SAML","AzureAD","GoogleWorkspace","Okta","AzureAdOidc"]},"providerType":{"type":"string","enum":["oidc","saml"]},"logo":{"type":"string"},"logoDark":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"}}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"List all the supported SSO connector provider details","description":"Get a complete list of supported SSO connector providers."}},"/api/sso-connectors":{"post":{"operationId":"CreateSsoConnector","tags":["SSO connectors"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["providerName","connectorName"],"properties":{"config":{"type":"object","description":"arbitrary"},"domains":{"type":"array","items":{"type":"string"}},"branding":{"type":"object","properties":{"displayName":{"type":"string"},"logo":{"type":"string"},"darkLogo":{"type":"string"}}},"syncProfile":{"type":"boolean"},"providerName":{"type":"string","minLength":1,"maxLength":128},"connectorName":{"type":"string","minLength":1,"maxLength":128}}}}}},"responses":{"200":{"description":"The created SSO connector.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","providerName","connectorName","config","domains","branding","syncProfile","createdAt"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":128},"providerName":{"type":"string","minLength":1,"maxLength":128},"connectorName":{"type":"string","minLength":1,"maxLength":128},"config":{"type":"object","description":"arbitrary"},"domains":{"type":"array","items":{"type":"string"}},"branding":{"type":"object","properties":{"displayName":{"type":"string"},"logo":{"type":"string"},"darkLogo":{"type":"string"}}},"syncProfile":{"type":"boolean"},"createdAt":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"409":{"description":"Conflict"},"422":{"description":"At lease one of the given input fields is invalid or IdP connection cannot be verified with the given config."}},"summary":"Create SSO connector","description":"Create an new SSO connector instance for a given provider."},"get":{"operationId":"ListSsoConnectors","tags":["SSO connectors"],"parameters":[{"name":"page","in":"query","description":"Page number (starts from 1).","required":false,"schema":{"type":"integer","minimum":1,"default":1}},{"name":"page_size","in":"query","description":"Entries per page.","required":false,"schema":{"type":"integer","minimum":1,"default":20}}],"responses":{"200":{"description":"A list of SSO connectors.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","required":["tenantId","id","providerName","connectorName","config","domains","branding","syncProfile","createdAt","name","providerType","providerLogo","providerLogoDark"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":128},"providerName":{"type":"string","enum":["OIDC","SAML","AzureAD","GoogleWorkspace","Okta","AzureAdOidc"]},"connectorName":{"type":"string","minLength":1,"maxLength":128},"config":{"type":"object","description":"arbitrary"},"domains":{"type":"array","items":{"type":"string"}},"branding":{"type":"object","properties":{"displayName":{"type":"string"},"logo":{"type":"string"},"darkLogo":{"type":"string"}}},"syncProfile":{"type":"boolean"},"createdAt":{"type":"number"},"name":{"type":"string"},"providerType":{"type":"string","enum":["oidc","saml"]},"providerLogo":{"type":"string"},"providerLogoDark":{"type":"string"},"providerConfig":{"type":"object","additionalProperties":{"example":{}}}}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"}},"summary":"List SSO connectors","description":"Get SSO connectors with pagination. In addition to the raw SSO connector data, a copy of fetched or parsed IdP configs and a copy of connector provider's data will be attached."}},"/api/sso-connectors/{id}":{"get":{"operationId":"GetSsoConnector","tags":["SSO connectors"],"parameters":[{"$ref":"#/components/parameters/ssoConnectorId-root"}],"responses":{"200":{"description":"The SSO connector data with the given ID.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","providerName","connectorName","config","domains","branding","syncProfile","createdAt","name","providerType","providerLogo","providerLogoDark"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":128},"providerName":{"type":"string","enum":["OIDC","SAML","AzureAD","GoogleWorkspace","Okta","AzureAdOidc"]},"connectorName":{"type":"string","minLength":1,"maxLength":128},"config":{"type":"object","description":"arbitrary"},"domains":{"type":"array","items":{"type":"string"}},"branding":{"type":"object","properties":{"displayName":{"type":"string"},"logo":{"type":"string"},"darkLogo":{"type":"string"}}},"syncProfile":{"type":"boolean"},"createdAt":{"type":"number"},"name":{"type":"string"},"providerType":{"type":"string","enum":["oidc","saml"]},"providerLogo":{"type":"string"},"providerLogoDark":{"type":"string"},"providerConfig":{"type":"object","additionalProperties":{"example":{}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"SSO connector not found."}},"summary":"Get SSO connector","description":"Get SSO connector data by ID. In addition to the raw SSO connector data, a copy of fetched or parsed IdP configs and a copy of connector provider's data will be attached."},"delete":{"operationId":"DeleteSsoConnector","tags":["SSO connectors"],"parameters":[{"$ref":"#/components/parameters/ssoConnectorId-root"}],"responses":{"204":{"description":"SSO connector deleted successfully."},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"SSO connector not found."}},"summary":"Delete SSO connector","description":"Delete an SSO connector by ID."},"patch":{"operationId":"UpdateSsoConnector","tags":["SSO connectors"],"parameters":[{"$ref":"#/components/parameters/ssoConnectorId-root"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","description":"arbitrary"},"domains":{"type":"array","items":{"type":"string"}},"branding":{"type":"object","properties":{"displayName":{"type":"string"},"logo":{"type":"string"},"darkLogo":{"type":"string"}}},"syncProfile":{"type":"boolean"},"connectorName":{"type":"string","minLength":1,"maxLength":128}}}}}},"responses":{"200":{"description":"The updated SSO connector.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","providerName","connectorName","config","domains","branding","syncProfile","createdAt","name","providerType","providerLogo","providerLogoDark"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":128},"providerName":{"type":"string","enum":["OIDC","SAML","AzureAD","GoogleWorkspace","Okta","AzureAdOidc"]},"connectorName":{"type":"string","minLength":1,"maxLength":128},"config":{"type":"object","description":"arbitrary"},"domains":{"type":"array","items":{"type":"string"}},"branding":{"type":"object","properties":{"displayName":{"type":"string"},"logo":{"type":"string"},"darkLogo":{"type":"string"}}},"syncProfile":{"type":"boolean"},"createdAt":{"type":"number"},"name":{"type":"string"},"providerType":{"type":"string","enum":["oidc","saml"]},"providerLogo":{"type":"string"},"providerLogoDark":{"type":"string"},"providerConfig":{"type":"object","additionalProperties":{"example":{}}}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"SSO connector not found."},"409":{"description":"Conflict"},"422":{"description":"At lease one of the update fields is invalid or IdP connection can not be verified with the given connection config."}},"summary":"Update SSO connector","description":"Update an SSO connector by ID. This method performs a partial update."}},"/api/systems/application":{"get":{"operationId":"GetSystemApplicationConfig","tags":["Systems"],"parameters":[],"responses":{"200":{"description":"The application constants.","content":{"application/json":{"schema":{"type":"object","required":["protectedApps"],"properties":{"protectedApps":{"type":"object","required":["defaultDomain"],"properties":{"defaultDomain":{"type":"string"}}}}}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"501":{"description":"Not Implemented"}},"summary":"Get the application constants.","description":"Get the application constants."}},"/api/subject-tokens":{"post":{"operationId":"CreateSubjectToken","tags":["Subject tokens"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["userId"],"properties":{"userId":{"type":"string","description":"The ID of the user to impersonate."},"context":{"type":"object","description":"The additional context to be included in the token, this can be used in custom JWT."}}}}}},"responses":{"201":{"description":"The subject token has been created successfully.","content":{"application/json":{"schema":{"type":"object","required":["subjectToken","expiresIn"],"properties":{"subjectToken":{"type":"string"},"expiresIn":{"type":"number"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"The user does not exist."}},"summary":"Create a new subject token.","description":"Create a new subject token for the use of impersonating the user."}},"/api/.well-known/endpoints/{tenantId}":{"get":{"operationId":"GetWellKnownEndpoint","tags":["Well-known"],"parameters":[{"$ref":"#/components/parameters/tenantId"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["user"],"properties":{"user":{"type":"string","format":"url"}}}}}},"400":{"description":"Bad Request"}},"security":[]}},"/api/.well-known/sign-in-exp":{"get":{"operationId":"GetSignInExperienceConfig","tags":["Well-known"],"parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"appId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The full sign-in experience configuration.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","color","branding","languageInfo","termsOfUseUrl","privacyPolicyUrl","agreeToTermsPolicy","signIn","signUp","socialSignIn","socialSignInConnectorTargets","signInMode","customCss","customContent","customUiAssets","passwordPolicy","mfa","singleSignOnEnabled","socialConnectors","ssoConnectors","forgotPassword","isDevelopmentTenant"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"color":{"type":"object","required":["primaryColor","isDarkModeEnabled","darkPrimaryColor"],"properties":{"primaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"},"isDarkModeEnabled":{"type":"boolean"},"darkPrimaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"}}},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"languageInfo":{"type":"object","required":["autoDetect","fallbackLanguage"],"properties":{"autoDetect":{"type":"boolean"},"fallbackLanguage":{"type":"string","enum":["af-ZA","am-ET","ar-AR","as-IN","az-AZ","be-BY","bg-BG","bn-IN","br-FR","bs-BA","ca-ES","cb-IQ","co-FR","cs-CZ","cx-PH","cy-GB","da-DK","de","de-DE","el-GR","en","en-GB","en-US","eo-EO","es","es-ES","es-419","et-EE","eu-ES","fa-IR","ff-NG","fi-FI","fo-FO","fr","fr-CA","fr-FR","fy-NL","ga-IE","gl-ES","gn-PY","gu-IN","ha-NG","he-IL","hi-IN","hr-HR","ht-HT","hu-HU","hy-AM","id-ID","ik-US","is-IS","it","it-IT","iu-CA","ja","ja-JP","ja-KS","jv-ID","ka-GE","kk-KZ","km-KH","kn-IN","ko","ko-KR","ku-TR","ky-KG","lo-LA","lt-LT","lv-LV","mg-MG","mk-MK","ml-IN","mn-MN","mr-IN","ms-MY","mt-MT","my-MM","nb-NO","ne-NP","nl-BE","nl-NL","nn-NO","or-IN","pa-IN","pl-PL","ps-AF","pt","pt-BR","pt-PT","ro-RO","ru","ru-RU","rw-RW","sc-IT","si-LK","sk-SK","sl-SI","sn-ZW","sq-AL","sr-RS","sv-SE","sw-KE","sy-SY","sz-PL","ta-IN","te-IN","tg-TJ","th-TH","tl-PH","tr","tr-TR","tt-RU","tz-MA","uk-UA","ur-PK","uz-UZ","vi-VN","zh","zh-CN","zh-HK","zh-MO","zh-TW","zz-TR"]}}},"termsOfUseUrl":{"nullable":true,"type":"string","maxLength":2048},"privacyPolicyUrl":{"nullable":true,"type":"string","maxLength":2048},"agreeToTermsPolicy":{"type":"string","enum":["Automatic","ManualRegistrationOnly","Manual"]},"signIn":{"type":"object","required":["methods"],"properties":{"methods":{"type":"array","items":{"type":"object","required":["identifier","password","verificationCode","isPasswordPrimary"],"properties":{"identifier":{"type":"string","enum":["username","email","phone"]},"password":{"type":"boolean"},"verificationCode":{"type":"boolean"},"isPasswordPrimary":{"type":"boolean"}}}}}},"signUp":{"type":"object","required":["identifiers","password","verify"],"properties":{"identifiers":{"type":"array","items":{"type":"string","enum":["username","email","phone"]}},"password":{"type":"boolean"},"verify":{"type":"boolean"}}},"socialSignIn":{"type":"object","properties":{"automaticAccountLinking":{"type":"boolean"}}},"socialSignInConnectorTargets":{"type":"array","items":{"type":"string"}},"signInMode":{"type":"string","enum":["SignIn","Register","SignInAndRegister"]},"customCss":{"nullable":true,"type":"string"},"customContent":{"type":"object","additionalProperties":{"type":"string"}},"customUiAssets":{"nullable":true,"type":"object","required":["id","createdAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"number"}}},"passwordPolicy":{"type":"object","properties":{"length":{"default":{},"type":"object","required":["min","max"],"properties":{"min":{"default":8,"type":"number"},"max":{"default":256,"type":"number"}}},"characterTypes":{"default":{},"type":"object","required":["min"],"properties":{"min":{"default":1,"type":"number"}}},"rejects":{"default":{},"type":"object","required":["pwned","repetitionAndSequence","userInfo","words"],"properties":{"pwned":{"default":true,"type":"boolean"},"repetitionAndSequence":{"default":true,"type":"boolean"},"userInfo":{"default":true,"type":"boolean"},"words":{"default":[],"type":"array","items":{"type":"string"}}}}}},"mfa":{"type":"object","required":["factors","policy"],"properties":{"factors":{"type":"array","items":{"type":"string","enum":["Totp","WebAuthn","BackupCode"]}},"policy":{"type":"string","enum":["UserControlled","Mandatory"]}}},"singleSignOnEnabled":{"type":"boolean"},"socialConnectors":{"type":"array","items":{"type":"object","required":["id","target","name","logo","logoDark","platform"],"properties":{"id":{"type":"string"},"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"},"fromEmail":{"type":"string"},"platform":{"nullable":true,"type":"string","enum":["Native","Universal","Web"]},"isStandard":{"type":"boolean"}}}},"ssoConnectors":{"type":"array","items":{"type":"object","required":["id","connectorName","logo"],"properties":{"id":{"type":"string"},"connectorName":{"type":"string"},"logo":{"type":"string"},"darkLogo":{"type":"string"}}}},"forgotPassword":{"type":"object","required":["phone","email"],"properties":{"phone":{"type":"boolean"},"email":{"type":"boolean"}}},"isDevelopmentTenant":{"type":"boolean"},"googleOneTap":{"type":"object","required":["clientId","connectorId"],"properties":{"isEnabled":{"type":"boolean"},"autoSelect":{"type":"boolean"},"closeOnTapOutside":{"type":"boolean"},"itpSupport":{"type":"boolean"},"clientId":{"type":"string"},"connectorId":{"type":"string"}}}}}}}},"400":{"description":"Bad Request"}},"security":[],"deprecated":true,"summary":"Get full sign-in experience","description":"Get the full sign-in experience configuration."}},"/api/.well-known/phrases":{"get":{"operationId":"GetSignInExperiencePhrases","tags":["Well-known"],"parameters":[{"name":"lng","in":"query","required":false,"schema":{"type":"string"},"description":"The language tag for localization."}],"responses":{"200":{"description":"Localized phrases for the specified language.","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"oneOf":[{"type":"string"},{"type":"object","additionalProperties":{"example":{}}}]}}}}},"400":{"description":"Bad Request"}},"security":[],"summary":"Get localized phrases","description":"Get localized phrases based on the specified language."}},"/api/.well-known/experience":{"get":{"operationId":"GetWellKnownExperience","tags":["Well-known"],"parameters":[{"name":"organizationId","in":"query","required":false,"schema":{"type":"string"}},{"name":"appId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The full sign-in experience configuration.","content":{"application/json":{"schema":{"type":"object","required":["tenantId","id","color","branding","languageInfo","termsOfUseUrl","privacyPolicyUrl","agreeToTermsPolicy","signIn","signUp","socialSignIn","socialSignInConnectorTargets","signInMode","customCss","customContent","customUiAssets","passwordPolicy","mfa","singleSignOnEnabled","socialConnectors","ssoConnectors","forgotPassword","isDevelopmentTenant"],"properties":{"tenantId":{"type":"string","maxLength":21},"id":{"type":"string","minLength":1,"maxLength":21},"color":{"type":"object","required":["primaryColor","isDarkModeEnabled","darkPrimaryColor"],"properties":{"primaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"},"isDarkModeEnabled":{"type":"boolean"},"darkPrimaryColor":{"type":"string","format":"regex","pattern":"/^#[\\da-f]{3}([\\da-f]{3})?$/i"}}},"branding":{"type":"object","properties":{"logoUrl":{"type":"string","format":"url"},"darkLogoUrl":{"type":"string","format":"url"},"favicon":{"type":"string","format":"url"},"darkFavicon":{"type":"string","format":"url"}}},"languageInfo":{"type":"object","required":["autoDetect","fallbackLanguage"],"properties":{"autoDetect":{"type":"boolean"},"fallbackLanguage":{"type":"string","enum":["af-ZA","am-ET","ar-AR","as-IN","az-AZ","be-BY","bg-BG","bn-IN","br-FR","bs-BA","ca-ES","cb-IQ","co-FR","cs-CZ","cx-PH","cy-GB","da-DK","de","de-DE","el-GR","en","en-GB","en-US","eo-EO","es","es-ES","es-419","et-EE","eu-ES","fa-IR","ff-NG","fi-FI","fo-FO","fr","fr-CA","fr-FR","fy-NL","ga-IE","gl-ES","gn-PY","gu-IN","ha-NG","he-IL","hi-IN","hr-HR","ht-HT","hu-HU","hy-AM","id-ID","ik-US","is-IS","it","it-IT","iu-CA","ja","ja-JP","ja-KS","jv-ID","ka-GE","kk-KZ","km-KH","kn-IN","ko","ko-KR","ku-TR","ky-KG","lo-LA","lt-LT","lv-LV","mg-MG","mk-MK","ml-IN","mn-MN","mr-IN","ms-MY","mt-MT","my-MM","nb-NO","ne-NP","nl-BE","nl-NL","nn-NO","or-IN","pa-IN","pl-PL","ps-AF","pt","pt-BR","pt-PT","ro-RO","ru","ru-RU","rw-RW","sc-IT","si-LK","sk-SK","sl-SI","sn-ZW","sq-AL","sr-RS","sv-SE","sw-KE","sy-SY","sz-PL","ta-IN","te-IN","tg-TJ","th-TH","tl-PH","tr","tr-TR","tt-RU","tz-MA","uk-UA","ur-PK","uz-UZ","vi-VN","zh","zh-CN","zh-HK","zh-MO","zh-TW","zz-TR"]}}},"termsOfUseUrl":{"nullable":true,"type":"string","maxLength":2048},"privacyPolicyUrl":{"nullable":true,"type":"string","maxLength":2048},"agreeToTermsPolicy":{"type":"string","enum":["Automatic","ManualRegistrationOnly","Manual"]},"signIn":{"type":"object","required":["methods"],"properties":{"methods":{"type":"array","items":{"type":"object","required":["identifier","password","verificationCode","isPasswordPrimary"],"properties":{"identifier":{"type":"string","enum":["username","email","phone"]},"password":{"type":"boolean"},"verificationCode":{"type":"boolean"},"isPasswordPrimary":{"type":"boolean"}}}}}},"signUp":{"type":"object","required":["identifiers","password","verify"],"properties":{"identifiers":{"type":"array","items":{"type":"string","enum":["username","email","phone"]}},"password":{"type":"boolean"},"verify":{"type":"boolean"}}},"socialSignIn":{"type":"object","properties":{"automaticAccountLinking":{"type":"boolean"}}},"socialSignInConnectorTargets":{"type":"array","items":{"type":"string"}},"signInMode":{"type":"string","enum":["SignIn","Register","SignInAndRegister"]},"customCss":{"nullable":true,"type":"string"},"customContent":{"type":"object","additionalProperties":{"type":"string"}},"customUiAssets":{"nullable":true,"type":"object","required":["id","createdAt"],"properties":{"id":{"type":"string"},"createdAt":{"type":"number"}}},"passwordPolicy":{"type":"object","properties":{"length":{"default":{},"type":"object","required":["min","max"],"properties":{"min":{"default":8,"type":"number"},"max":{"default":256,"type":"number"}}},"characterTypes":{"default":{},"type":"object","required":["min"],"properties":{"min":{"default":1,"type":"number"}}},"rejects":{"default":{},"type":"object","required":["pwned","repetitionAndSequence","userInfo","words"],"properties":{"pwned":{"default":true,"type":"boolean"},"repetitionAndSequence":{"default":true,"type":"boolean"},"userInfo":{"default":true,"type":"boolean"},"words":{"default":[],"type":"array","items":{"type":"string"}}}}}},"mfa":{"type":"object","required":["factors","policy"],"properties":{"factors":{"type":"array","items":{"type":"string","enum":["Totp","WebAuthn","BackupCode"]}},"policy":{"type":"string","enum":["UserControlled","Mandatory"]}}},"singleSignOnEnabled":{"type":"boolean"},"socialConnectors":{"type":"array","items":{"type":"object","required":["id","target","name","logo","logoDark","platform"],"properties":{"id":{"type":"string"},"target":{"type":"string"},"name":{"type":"object","description":"Validator function"},"logo":{"type":"string"},"logoDark":{"nullable":true,"type":"string"},"fromEmail":{"type":"string"},"platform":{"nullable":true,"type":"string","enum":["Native","Universal","Web"]},"isStandard":{"type":"boolean"}}}},"ssoConnectors":{"type":"array","items":{"type":"object","required":["id","connectorName","logo"],"properties":{"id":{"type":"string"},"connectorName":{"type":"string"},"logo":{"type":"string"},"darkLogo":{"type":"string"}}}},"forgotPassword":{"type":"object","required":["phone","email"],"properties":{"phone":{"type":"boolean"},"email":{"type":"boolean"}}},"isDevelopmentTenant":{"type":"boolean"},"googleOneTap":{"type":"object","required":["clientId","connectorId"],"properties":{"isEnabled":{"type":"boolean"},"autoSelect":{"type":"boolean"},"closeOnTapOutside":{"type":"boolean"},"itpSupport":{"type":"boolean"},"clientId":{"type":"string"},"connectorId":{"type":"string"}}}}}}}},"400":{"description":"Bad Request"}},"security":[],"summary":"Get full sign-in experience","description":"Get the full sign-in experience configuration."}},"/api/.well-known/management.openapi.json":{"get":{"operationId":"GetWellKnownManagementOpenapiJson","tags":["Well-known"],"parameters":[],"responses":{"200":{"description":"The JSON document.","content":{"application/json":{}}}},"security":[],"summary":"Get Management API swagger JSON","description":"The endpoint for the Management API JSON document. The JSON conforms to the [OpenAPI v3.0.1](https://spec.openapis.org/oas/v3.0.1) (a.k.a. Swagger) specification."}},"/api/.well-known/experience.openapi.json":{"get":{"operationId":"GetWellKnownExperienceOpenapiJson","tags":["Well-known"],"parameters":[],"responses":{"200":{"description":"The JSON document.","content":{"application/json":{}}}},"security":[],"summary":"Get Experience API swagger JSON","description":"The endpoint for the Experience API JSON document. The JSON conforms to the [OpenAPI v3.0.1](https://spec.openapis.org/oas/v3.0.1) (a.k.a. Swagger) specification."}},"/api/status":{"get":{"operationId":"GetStatus","tags":["Status"],"parameters":[],"responses":{"204":{"description":"The Logto core service is healthy."}},"security":[],"summary":"Health check","description":"The traditional health check API. No authentication needed.\n\n> **Note**\n> Even if 204 is returned, it does not guarantee all the APIs are working properly since they may depend on additional resources or external services."}},"/api/authn/hasura":{"get":{"operationId":"GetHasuraAuth","tags":["Authn"],"parameters":[{"name":"resource","in":"query","required":true,"schema":{"type":"string","minLength":1}},{"name":"unauthorizedRole","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"The authenticated user claims in Hasura format. See [Hasura docs](https://hasura.io/docs/latest/auth/authentication/webhook/#webhook-response) for more information.","content":{"application/json":{"schema":{"type":"object","properties":{"X-Hasura-User-Id":{"type":"string"},"X-Hasura-Role":{"type":"string"}}}}}},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"}},"security":[],"summary":"Hasura auth hook endpoint","description":"The `HASURA_GRAPHQL_AUTH_HOOK` endpoint for Hasura auth. Use this endpoint to integrate Hasura's [webhook authentication flow](https://hasura.io/docs/latest/auth/authentication/webhook/)."}},"/api/authn/saml/{connectorId}":{"post":{"operationId":"AssertSaml","tags":["Authn"],"parameters":[{"$ref":"#/components/parameters/connectorId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"arbitrary"}}}},"responses":{"302":{"description":"Redirect to the endpoint to complete the authentication flow."},"400":{"description":"Bad Request"},"404":{"description":"Not Found"}},"security":[],"summary":"SAML ACS endpoint (social)","description":"The Assertion Consumer Service (ACS) endpoint for Simple Assertion Markup Language (SAML) social connectors.\n\nSAML social connectors are deprecated. Use the SSO SAML connector instead.","deprecated":true}},"/api/authn/single-sign-on/saml/{connectorId}":{"post":{"operationId":"AssertSingleSignOnSaml","tags":["Authn"],"parameters":[{"$ref":"#/components/parameters/connectorId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["RelayState","SAMLResponse"],"properties":{"RelayState":{"type":"string","description":"SAML standard parameter that will be transmitted between the identity provider and the service provider. It will be used as the session ID (jti) of the user's Logto authentication session. This API will use this session ID to retrieve the SSO connector authentication session from the database."},"SAMLResponse":{"type":"string","description":"The SAML assertion response from the identity provider (IdP)."}}}}}},"responses":{"302":{"description":"Redirect to the endpoint to complete the authentication flow."},"400":{"description":"Invalid SAML assertion response."},"404":{"description":"Invalid SSO connector ID or SSO connector authentication session not found."}},"security":[],"summary":"SAML ACS endpoint (SSO)","description":"The Assertion Consumer Service (ACS) endpoint for Simple Assertion Markup Language (SAML) single sign-on (SSO) connectors.\n\nThis endpoint is used to complete the SAML SSO authentication flow. It receives the SAML assertion response from the identity provider (IdP) and redirects the user to complete the authentication flow."}},"/api/swagger.json":{"get":{"operationId":"GetSwaggerJson","tags":["Swagger.json"],"parameters":[],"responses":{"200":{"description":"The JSON document.","content":{"application/json":{}}}},"security":[],"summary":"Get Swagger JSON","description":"The endpoint for the current JSON document. The JSON conforms to the [OpenAPI v3.0.1](https://spec.openapis.org/oas/v3.0.1) (a.k.a. Swagger) specification."}}},"security":[{"OAuth2":["all"]}],"components":{"securitySchemes":{"OAuth2":{"type":"oauth2","description":"Logto Management API is a comprehensive set of REST APIs that gives you the full control over Logto to suit your product needs and tech stack. To see the full guide on Management API interactions, visit [Interact with Management API](https://docs.logto.io/docs/recipes/interact-with-management-api/).\n\n### Get started\n\nThe API follows the same authentication principles as other API resources in Logto, with some slight differences. To use Logto Management API:\n\n1. A machine-to-machine (M2M) application needs to be created.\n2. A machine-to-machine (M2M) role with Management API permission `all` needs to be assigned to the application.\n\nOnce you have them set up, you can use the `client_credentials` grant type to fetch an access token and use it to authenticate your requests to the Logto Management API.\n\n### Fetch an access token\n\nTo fetch an access token, you need to make a `POST` request to the `/oidc/token` endpoint of your Logto tenant.\n\nFor Logto Cloud users, the base URL is your Logto endpoint, i.e. `https://[tenant-id].logto.app`. The tenant ID can be found in the following places:\n\n- The first path segment of the URL when you are signed in to Logto Cloud. For example, if the URL is `https://cloud.logto.io/foo/get-started`, the tenant ID is `foo`.\n- In the \"Settings\" tab of Logto Cloud.\n\nThe request should follow the OAuth 2.0 [client credentials](https://datatracker.ietf.org/doc/html/rfc6749#section-4.4) grant type. Here is a non-normative example of how to fetch an access token:\n\n```bash\ncurl --location \\\n  --request POST 'https://[tenant-id].logto.app/oidc/token' \\\n  --header 'Content-Type: application/x-www-form-urlencoded' \\\n  --data-urlencode 'grant_type=client_credentials' \\\n  --data-urlencode 'client_id=[app-id]' \\\n  --data-urlencode 'client_secret=[app-secret]' \\\n  --data-urlencode 'resource=https://[tenant-id].logto.app/api' \\\n  --data-urlencode 'scope=all'\n```\n\nReplace `[tenant-id]`, `[app-id]`, and `[app-secret]` with your Logto tenant ID, application ID, and application secret, respectively.\n\nThe response will be like:\n\n```json\n{\n  \"access_token\": \"eyJhbG...2g\", // Use this value for accessing the Logto Management API\n  \"expires_in\": 3600, // Token expiration in seconds\n  \"token_type\": \"Bearer\", // Token type for your request when using the access token\n  \"scope\": \"all\" // Scope `all` for Logto Management API\n}\n```\n\n### Use the access token\n\nOnce you have the access token, you can use it to authenticate your requests to the Logto Management API. The access token should be included in the `Authorization` header of your requests with the `Bearer` authentication scheme.\n\nHere is an example of how to list the first page of users in your Logto tenant:\n\n```bash\ncurl --location \\\n  --request GET 'https://[tenant-id].logto.app/api/users' \\\n  --header 'Authorization: Bearer eyJhbG...2g'\n```\n\nReplace `[tenant-id]` with your Logto tenant ID and `eyJhbG...2g` with the access token you fetched earlier.","flows":{"clientCredentials":{"tokenUrl":"/oidc/token","scopes":{"all":"All scopes"}}}}},"schemas":{"TranslationObject":{"type":"object","properties":{"[translationKey]":{"$ref":"#/components/schemas/Translation"}},"example":{"input":{"username":"Username","password":"Password"},"action":{"sign_in":"Sign In","continue":"Continue"}}},"Translation":{"oneOf":[{"type":"string"}]},"ApplicationLegacySecret":{"type":"string","deprecated":true,"description":"The internal client secret. Note it is only used for internal validation, and the actual secrets should be retrieved from `/api/applications/{id}/secrets` endpoints."}},"parameters":{"tenantId-root":{"name":"id","in":"path","description":"The unique identifier of the tenant.","required":true,"schema":{"type":"string"}},"tenantId":{"name":"tenantId","in":"path","description":"The unique identifier of the tenant.","required":true,"schema":{"type":"string"}},"keyId-root":{"in":"path","description":"The unique identifier of the key.","required":true,"schema":{"type":"string"},"name":"id"},"keyId":{"in":"path","description":"The unique identifier of the key.","required":true,"schema":{"type":"string"},"name":"keyId"},"connectorFactoryId-root":{"in":"path","description":"The unique identifier of the connector factory.","required":true,"schema":{"type":"string"},"name":"id"},"connectorFactoryId":{"in":"path","description":"The unique identifier of the connector factory.","required":true,"schema":{"type":"string"},"name":"connectorFactoryId"},"factoryId-root":{"in":"path","description":"The unique identifier of the factory.","required":true,"schema":{"type":"string"},"name":"id"},"factoryId":{"in":"path","description":"The unique identifier of the factory.","required":true,"schema":{"type":"string"},"name":"factoryId"},"applicationId-root":{"in":"path","description":"The unique identifier of the application.","required":true,"schema":{"type":"string"},"name":"id"},"applicationId":{"in":"path","description":"The unique identifier of the application.","required":true,"schema":{"type":"string"},"name":"applicationId"},"connectorId-root":{"in":"path","description":"The unique identifier of the connector.","required":true,"schema":{"type":"string"},"name":"id"},"connectorId":{"in":"path","description":"The unique identifier of the connector.","required":true,"schema":{"type":"string"},"name":"connectorId"},"ssoConnectorId-root":{"in":"path","description":"The unique identifier of the sso connector.","required":true,"schema":{"type":"string"},"name":"id"},"ssoConnectorId":{"in":"path","description":"The unique identifier of the sso connector.","required":true,"schema":{"type":"string"},"name":"ssoConnectorId"},"resourceId-root":{"in":"path","description":"The unique identifier of the resource.","required":true,"schema":{"type":"string"},"name":"id"},"resourceId":{"in":"path","description":"The unique identifier of the resource.","required":true,"schema":{"type":"string"},"name":"resourceId"},"userId-root":{"in":"path","description":"The unique identifier of the user.","required":true,"schema":{"type":"string"},"name":"id"},"userId":{"in":"path","description":"The unique identifier of the user.","required":true,"schema":{"type":"string"},"name":"userId"},"logId-root":{"in":"path","description":"The unique identifier of the log.","required":true,"schema":{"type":"string"},"name":"id"},"logId":{"in":"path","description":"The unique identifier of the log.","required":true,"schema":{"type":"string"},"name":"logId"},"roleId-root":{"in":"path","description":"The unique identifier of the role.","required":true,"schema":{"type":"string"},"name":"id"},"roleId":{"in":"path","description":"The unique identifier of the role.","required":true,"schema":{"type":"string"},"name":"roleId"},"scopeId-root":{"in":"path","description":"The unique identifier of the scope.","required":true,"schema":{"type":"string"},"name":"id"},"scopeId":{"in":"path","description":"The unique identifier of the scope.","required":true,"schema":{"type":"string"},"name":"scopeId"},"hookId-root":{"in":"path","description":"The unique identifier of the hook.","required":true,"schema":{"type":"string"},"name":"id"},"hookId":{"in":"path","description":"The unique identifier of the hook.","required":true,"schema":{"type":"string"},"name":"hookId"},"domainId-root":{"in":"path","description":"The unique identifier of the domain.","required":true,"schema":{"type":"string"},"name":"id"},"domainId":{"in":"path","description":"The unique identifier of the domain.","required":true,"schema":{"type":"string"},"name":"domainId"},"verificationId-root":{"in":"path","description":"The unique identifier of the verification.","required":true,"schema":{"type":"string"},"name":"id"},"verificationId":{"in":"path","description":"The unique identifier of the verification.","required":true,"schema":{"type":"string"},"name":"verificationId"},"organizationId-root":{"in":"path","description":"The unique identifier of the organization.","required":true,"schema":{"type":"string"},"name":"id"},"organizationId":{"in":"path","description":"The unique identifier of the organization.","required":true,"schema":{"type":"string"},"name":"organizationId"},"organizationRoleId-root":{"in":"path","description":"The unique identifier of the organization role.","required":true,"schema":{"type":"string"},"name":"id"},"organizationRoleId":{"in":"path","description":"The unique identifier of the organization role.","required":true,"schema":{"type":"string"},"name":"organizationRoleId"},"organizationScopeId-root":{"in":"path","description":"The unique identifier of the organization scope.","required":true,"schema":{"type":"string"},"name":"id"},"organizationScopeId":{"in":"path","description":"The unique identifier of the organization scope.","required":true,"schema":{"type":"string"},"name":"organizationScopeId"},"organizationInvitationId-root":{"in":"path","description":"The unique identifier of the organization invitation.","required":true,"schema":{"type":"string"},"name":"id"},"organizationInvitationId":{"in":"path","description":"The unique identifier of the organization invitation.","required":true,"schema":{"type":"string"},"name":"organizationInvitationId"}}},"tags":[{"name":"Applications","description":"Application represents your registered software program or service that has been authorized to access user information and perform actions on behalf of users within the system. Currently, Logto supports four types of applications:\n\n- Traditional web\n\n- Single-page app\n- Native app\n- Machine-to-machine app.\n\nDepending on the application type, it may have different authentication flows and access to the system. See [🔗 Integrate Logto in your application](https://docs.logto.io/docs/recipes/integrate-logto/) to learn more about how to integrate Logto into your application.\n\nRole-based access control (RBAC) is supported for machine-to-machine applications. See [🔐 Role-based access control (RBAC)](https://docs.logto.io/docs/recipes/rbac/) to get started with role-based access control."},{"name":"Audit logs","description":"Audit logs are used to track end-user activities in Logto sign-in experience and other flows. It does not include activities in Logto Console."},{"name":"Authn","description":"Authentication endpoints for third-party integrations and identity providers."},{"name":"Cloud only"},{"name":"Configs","description":"Endpoints for managing Logto global configurations for the tenant, such as admin console config and OIDC signing keys.\n\nSee [🔑 Signing keys](https://docs.logto.io/docs/recipes/signing-keys-rotation/) to learn more about signing keys and key rotation."},{"name":"Connector factories","description":"Connector factories are used to create connectors. They can be treated as preconfigured templates for connectors."},{"name":"Connectors","description":"Connectors are the bridge between Logto and other third-party vendors who provide short message service (SMS), email service, or user information on wildly accepted social media.\n\nTo learn more about connectors, please see [🪛 Configure connectors](https://docs.logto.io/docs/recipes/configure-connectors/)."},{"name":"Custom phrases","description":"Endpoints for managing custom phrases that allow you to customize the phrases displayed in the sign-in experience.\n\nSee [Localized language](https://docs.logto.io/docs/recipes/customize-sie/localized-language/) to learn more about custom phrases for localization."},{"name":"Custom UI assets","description":"Endpoints for uploading custom UI assets for the sign-in experience. Users can upload a zip file containing custom HTML, CSS, and JavaScript files to replace and fully customize the sign-in experience."},{"name":"Dashboard","description":"Endpoints that power the dashboard page of Console to show the statistics of the current tenant."},{"name":"Domains","description":"Custom domain lets you present a consistent brand by having your own domain name on the sign-in and registration pages. See [🌍 Custom domain](https://docs.logto.io/docs/recipes/custom-domain/) for more details."},{"name":"Hooks","description":"Hook enables you to effortlessly receive real-time updates regarding specific events, such as user registration, sign-in, or password reset. See [🪝 Webhooks] to get started and learn more."},{"name":"Organization applications","description":"Manage organization - application relationships. An application can be associated with one or more organizations in order to get access to the organization resources.\n\nCurrently, only machine-to-machine applications can be associated with organizations."},{"name":"Organization invitations","description":"Organization invitations are used to invite users to join an organization. They are sent via email and contain a link that the user can click to accept the invitation and join the organization."},{"name":"Organization roles","description":"Organization roles are used to define a set of organization scopes that can be assigned to users. Every organization role is a part of the organization template.\n\nOrganization roles will only be meaningful within an organization context. For example, a user may have an `admin` role for organization A, but not for organization B. See [🏢 Organizations (Multi-tenancy)](https://docs.logto.io/docs/recipes/organizations/) to get started with organizations and organization template."},{"name":"Organization scopes","description":"Organization scopes (permissions) are used to define actions that can be performed on a organization. Every organization scope is a part of the organization template.\n\nOrganization scopes will only be meaningful within an organization context. For example, a user may have a `read` scope for organization A, but not for organization B. See [🏢 Organizations (Multi-tenancy)](https://docs.logto.io/docs/recipes/organizations/) to get started with organizations and organization template."},{"name":"Organization users","description":"Manage organization - user relationships. A user can be a member of one or more organizations in order to get access to the organization resources.\n\nUsers can be assigned roles in organizations to grant them permissions to perform certain actions in the organization."},{"name":"Organizations","description":"Organization is a concept that brings together multiple identities (mostly users). Logto supports multiple organizations, and each organization can have multiple users.\n\nEvery organization shares the same set (organization template) of roles and permissions. Each user can have different roles in different organizations. See [🏢 Organizations (Multi-tenancy)](https://docs.logto.io/docs/recipes/organizations/) to get started with organizations and organization template."},{"name":"Resources","description":"Resources (API resources) represent the APIs that you want to protect with Logto. Each resource has a unique indicator (URI) and a set of scopes (permissions). The resources will be used in the authorization process which conforms to [RFC 8707: Resource Indicators for OAuth 2.0](https://www.rfc-editor.org/rfc/rfc8707.html).\n\nSee [⚔️ Protect your API](https://docs.logto.io/docs/recipes/protect-your-api/) to learn more about how to define API resources and protect your APIs with Logto."},{"name":"Roles","description":"Role management for API resource RBAC (role-based access control). See [🔐 Role-based access control (RBAC)](https://docs.logto.io/docs/recipes/rbac/) to get started with role-based access control."},{"name":"Sign-in experience","description":"Endpoints for customizing Logto sign-in experience. See [🎨 Customize sign-in experience](https://docs.logto.io/docs/recipes/customize-sie/) to learn more about how the configuration works and reflects on the user interface."},{"name":"SSO connector providers","description":"Endpoints for SSO (single sign-on) connector providers.\n\nSSO connector providers provide the metadata and configuration templates for creating SSO connectors."},{"name":"SSO connectors","description":"Endpoints for managing single sign-on (SSO) connectors. Your sign-in experience can use these well-configured SSO connectors to authenticate users and sync user attributes from external identity providers (IdPs).\n\nSSO connectors are created by SSO connector provider factories."},{"name":"Status","description":"Endpoints for health check."},{"name":"Subject tokens","description":"The subject token API provides the ability to create a new subject token for the use of impersonating the user."},{"name":"Swagger.json","description":"Endpoints for the Swagger JSON document."},{"name":"Systems","description":"Endpoints for system constants and information."},{"name":"User assets","description":"Endpoints for managing user uploaded assets."},{"name":"Users","description":"Endpoints for user management. Including creating, updating, deleting, and querying users with flexible filters. In addition to the endpoints, see [🧑‍🚀 Manage users](https://docs.logto.io/docs/recipes/manage-users/) for more insights."},{"name":"Verification codes","description":"Endpoints for handling verification codes. It is helpful when building a custom profile page in your app. See [👤 User profile](https://docs.logto.io/docs/recipes/user-profile/#optional-validate-verification-code) for more details.\n\nNote: Before you call the endpoints, you need to setup your email/SMS connector first."},{"name":"Well-known","description":"Well-Known routes provide information and resources that can be discovered by clients without the need for authentication."}]}