text: (self.webpackChunkdocusaurus_template=self.webpackChunkdocusaurus_template||[]).push([[98806],{3905:function(e,t,o){"use strict";o.d(t,{Zo:function(){return p},kt:function(){return u}});var n=o(67294);function s(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function i(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function r(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?i(Object(o),!0).forEach((function(t){s(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):i(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function a(e,t){if(null==e)return{};var o,n,s=function(e,t){if(null==e)return{};var o,n,s={},i=Object.keys(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||(s[o]=e[o]);return s}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}var c=n.createContext({}),d=function(e){var t=n.useContext(c),o=t;return e&&(o="function"==typeof e?e(t):r(r({},t),e)),o},p=function(e){var t=d(e.components);return n.createElement(c.Provider,{value:t},e.children)},l={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},h=n.forwardRef((function(e,t){var o=e.components,s=e.mdxType,i=e.originalType,c=e.parentName,p=a(e,["components","mdxType","originalType","parentName"]),h=d(o),u=s,m=h["".concat(c,".").concat(u)]||h[u]||l[u]||i;return o?n.createElement(m,r(r({ref:t},p),{},{components:o})):n.createElement(m,r({ref:t},p))}));function u(e,t){var o=arguments,s=t&&t.mdxType;if("string"==typeof e||s){var i=o.length,r=new Array(i);r[0]=h;var a={};for(var c in t)hasOwnProperty.call(t,c)&&(a[c]=t[c]);a.originalType=e,a.mdxType="string"==typeof e?e:s,r[1]=a;for(var d=2;d<i;d++)r[d]=o[d];return n.createElement.apply(null,r)}return n.createElement.apply(null,o)}h.displayName="MDXCreateElement"},29935:function(e,t,o){"use strict";o.d(t,{m:function(){return n}});var n="default"},28084:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return i},useAllPluginInstancesData:function(){return r},usePluginData:function(){return a}});var n=o(52263),s=o(29935);function i(){var e=(0,n.Z)().globalData;if(!e)throw new Error("Docusaurus global data not found.");return e}function r(e){var t=i()[e];if(!t)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return t}function a(e,t){void 0===t&&(t=s.m);var o=r(e)[t];if(!o)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return o}},29579:function(e,t,o){"use strict";o.d(t,{Z:function(){return i}});var n=o(67294),s=o(19992);var i=function(e){var t=e.spec;return n.createElement(s.Z,{spec:t})}},5831:function(e,t,o){"use strict";o.r(t),o.d(t,{contentTitle:function(){return p},default:function(){return m},frontMatter:function(){return d},metadata:function(){return l},toc:function(){return h}});var n=o(87462),s=o(63366),i=(o(67294),o(3905)),r=o(29579),a=JSON.parse('{"components":{"responses":{"emptyResponse":{"description":"Empty responses are sent when, for example, resources are deleted. The HTTP status code for empty responses is typically 201."}},"schemas":{"AdminUpdateIdentityBody":{"properties":{"schema_id":{"description":"SchemaID is the ID of the JSON Schema to be used for validating the identity\'s traits. If set\\nwill update the Identity\'s SchemaID.","type":"string"},"state":{"$ref":"#/components/schemas/identityState"},"traits":{"description":"Traits represent an identity\'s traits. The identity is able to create, modify, and delete traits\\nin a self-service manner. The input will always be validated against the JSON Schema defined\\nin `schema_id`.","type":"object"}},"required":["traits","state"],"type":"object"},"Duration":{"description":"A Duration represents the elapsed time between two instants\\nas an int64 nanosecond count. The representation limits the\\nlargest representable duration to approximately 290 years.","format":"int64","type":"integer"},"ID":{"format":"int64","type":"integer"},"JSONRawMessage":{"title":"JSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger.","type":"object"},"RecoveryAddress":{"properties":{"created_at":{"description":"CreatedAt is a helper struct field for gobuffalo.pop.","format":"date-time","type":"string"},"id":{"$ref":"#/components/schemas/UUID"},"updated_at":{"description":"UpdatedAt is a helper struct field for gobuffalo.pop.","format":"date-time","type":"string"},"value":{"type":"string"},"via":{"$ref":"#/components/schemas/RecoveryAddressType"}},"required":["id","value","via"],"type":"object"},"RecoveryAddressType":{"type":"string"},"UUID":{"format":"uuid4","type":"string"},"adminCreateIdentityBody":{"properties":{"schema_id":{"description":"SchemaID is the ID of the JSON Schema to be used for validating the identity\'s traits.","type":"string"},"state":{"$ref":"#/components/schemas/identityState"},"traits":{"description":"Traits represent an identity\'s traits. The identity is able to create, modify, and delete traits\\nin a self-service manner. The input will always be validated against the JSON Schema defined\\nin `schema_url`.","type":"object"}},"required":["schema_id","traits"],"type":"object"},"adminCreateSelfServiceRecoveryLinkBody":{"properties":{"expires_in":{"description":"Link Expires In\\n\\nThe recovery link will expire at that point in time. Defaults to the configuration value of\\n`selfservice.flows.recovery.request_lifespan`.","pattern":"^[0-9]+(ns|us|ms|s|m|h)$","type":"string"},"identity_id":{"$ref":"#/components/schemas/UUID"}},"required":["identity_id"],"type":"object"},"authenticatorAssuranceLevel":{"description":"The authenticator assurance level can be one of \\"aal1\\", \\"aal2\\", or \\"aal3\\". A higher number means that it is harder\\nfor an attacker to compromise the account.\\n\\nGenerally, \\"aal1\\" implies that one authentication factor was used while AAL2 implies that two factors (e.g.\\npassword + TOTP) have been used.\\n\\nTo learn more about these levels please head over to: https://www.ory.sh/kratos/docs/concepts/credentials","enum":["aal0","aal1","aal2","aal3"],"title":"Authenticator Assurance Level (AAL)","type":"string"},"errorAuthenticatorAssuranceLevelNotSatisfied":{"properties":{"code":{"description":"The status code","example":404,"format":"int64","type":"integer"},"debug":{"description":"Debug information\\n\\nThis field is often not exposed to protect against leaking\\nsensitive information.","example":"SQL field \\"foo\\" is not a bool.","type":"string"},"details":{"additionalProperties":true,"description":"Further error details","type":"object"},"id":{"description":"The error ID\\n\\nUseful when trying to identify various errors in application logic.","type":"string"},"message":{"description":"Error message\\n\\nThe error\'s message.","example":"The resource could not be found","type":"string"},"reason":{"description":"A human-readable reason for the error","example":"User with ID 1234 does not exist.","type":"string"},"redirect_browser_to":{"type":"string"},"request":{"description":"The request ID\\n\\nThe request ID is often exposed internally in order to trace\\nerrors across service architectures. This is often a UUID.","example":"d7ef54b1-ec15-46e6-bccb-524b82c035e6","type":"string"},"status":{"description":"The status description","example":"Not Found","type":"string"}},"required":["message"],"title":"ErrAALNotSatisfied is returned when an active session was found but the requested AAL is not satisfied.","type":"object"},"genericError":{"properties":{"code":{"description":"The status code","example":404,"format":"int64","type":"integer"},"debug":{"description":"Debug information\\n\\nThis field is often not exposed to protect against leaking\\nsensitive information.","example":"SQL field \\"foo\\" is not a bool.","type":"string"},"details":{"additionalProperties":false,"description":"Further error details","type":"object"},"id":{"description":"The error ID\\n\\nUseful when trying to identify various errors in application logic.","type":"string"},"message":{"description":"Error message\\n\\nThe error\'s message.","example":"The resource could not be found","type":"string"},"reason":{"description":"A human-readable reason for the error","example":"User with ID 1234 does not exist.","type":"string"},"request":{"description":"The request ID\\n\\nThe request ID is often exposed internally in order to trace\\nerrors across service architectures. This is often a UUID.","example":"d7ef54b1-ec15-46e6-bccb-524b82c035e6","type":"string"},"status":{"description":"The status description","example":"Not Found","type":"string"}},"required":["message"],"type":"object"},"healthNotReadyStatus":{"properties":{"errors":{"additionalProperties":{"type":"string"},"description":"Errors contains a list of errors that caused the not ready status.","type":"object"}},"type":"object"},"healthStatus":{"properties":{"status":{"description":"Status always contains \\"ok\\".","type":"string"}},"type":"object"},"identity":{"description":"An identity can be a real human, a service, an IoT device - everything that\\ncan be described as an \\"actor\\" in a system.","properties":{"created_at":{"description":"CreatedAt is a helper struct field for gobuffalo.pop.","format":"date-time","type":"string"},"credentials":{"additionalProperties":{"$ref":"#/components/schemas/identityCredentials"},"description":"Credentials represents all credentials that can be used for authenticating this identity.","type":"object"},"id":{"$ref":"#/components/schemas/UUID"},"recovery_addresses":{"description":"RecoveryAddresses contains all the addresses that can be used to recover an identity.","items":{"$ref":"#/components/schemas/RecoveryAddress"},"type":"array","x-omitempty":true},"schema_id":{"description":"SchemaID is the ID of the JSON Schema to be used for validating the identity\'s traits.","type":"string"},"schema_url":{"description":"SchemaURL is the URL of the endpoint where the identity\'s traits schema can be fetched from.\\n\\nformat: url","type":"string"},"state":{"$ref":"#/components/schemas/identityState"},"state_changed_at":{"$ref":"#/components/schemas/nullTime"},"traits":{"$ref":"#/components/schemas/identityTraits"},"updated_at":{"description":"UpdatedAt is a helper struct field for gobuffalo.pop.","format":"date-time","type":"string"},"verifiable_addresses":{"description":"VerifiableAddresses contains all the addresses that can be verified by the user.","items":{"$ref":"#/components/schemas/verifiableIdentityAddress"},"type":"array","x-omitempty":true}},"required":["id","schema_id","schema_url","traits"],"title":"Identity represents an Ory Kratos identity","type":"object"},"identityCredentials":{"description":"Credentials represents a specific credential type","properties":{"config":{"$ref":"#/components/schemas/JSONRawMessage"},"created_at":{"description":"CreatedAt is a helper struct field for gobuffalo.pop.","format":"date-time","type":"string"},"identifiers":{"description":"Identifiers represents a list of unique identifiers this credential type matches.","items":{"type":"string"},"type":"array"},"type":{"$ref":"#/components/schemas/identityCredentialsType"},"updated_at":{"description":"UpdatedAt is a helper struct field for gobuffalo.pop.","format":"date-time","type":"string"}},"type":"object"},"identityCredentialsType":{"description":"and so on.","enum":["password","totp","oidc"],"title":"CredentialsType  represents several different credential types, like password credentials, passwordless credentials,","type":"string"},"identityList":{"items":{"$ref":"#/components/schemas/identity"},"title":"A list of identities.","type":"array"},"identitySchema":{"properties":{"id":{"description":"The ID of the Identity JSON Schema","type":"string"},"schema":{"description":"The actual Identity JSON Schema","type":"object"}},"type":"object"},"identitySchemas":{"description":"Raw identity Schema list","items":{"$ref":"#/components/schemas/identitySchema"},"type":"array"},"identityState":{"description":"The state can either be `active` or `inactive`.","enum":["active","inactive"],"title":"An Identity\'s State","type":"string"},"identityTraits":{"description":"Traits represent an identity\'s traits. The identity is able to create, modify, and delete traits\\nin a self-service manner. The input will always be validated against the JSON Schema defined\\nin `schema_url`."},"identityVerifiableAddressStatus":{"description":"VerifiableAddressStatus must not exceed 16 characters as that is the limitation in the SQL Schema","type":"string"},"identityVerifiableAddressType":{"description":"VerifiableAddressType must not exceed 16 characters as that is the limitation in the SQL Schema","type":"string"},"jsonError":{"description":"The standard Ory JSON API error format.","properties":{"error":{"$ref":"#/components/schemas/genericError"}},"required":["error"],"title":"JSON API Error Response","type":"object"},"jsonSchema":{"description":"Raw JSON Schema","type":"object"},"needsPrivilegedSessionError":{"properties":{"code":{"description":"The status code","example":404,"format":"int64","type":"integer"},"debug":{"description":"Debug information\\n\\nThis field is often not exposed to protect against leaking\\nsensitive information.","example":"SQL field \\"foo\\" is not a bool.","type":"string"},"details":{"additionalProperties":true,"description":"Further error details","type":"object"},"id":{"description":"The error ID\\n\\nUseful when trying to identify various errors in application logic.","type":"string"},"message":{"description":"Error message\\n\\nThe error\'s message.","example":"The resource could not be found","type":"string"},"reason":{"description":"A human-readable reason for the error","example":"User with ID 1234 does not exist.","type":"string"},"redirect_browser_to":{"description":"Points to where to redirect the user to next.","type":"string"},"request":{"description":"The request ID\\n\\nThe request ID is often exposed internally in order to trace\\nerrors across service architectures. This is often a UUID.","example":"d7ef54b1-ec15-46e6-bccb-524b82c035e6","type":"string"},"status":{"description":"The status description","example":"Not Found","type":"string"}},"required":["message","redirect_browser_to"],"title":"Is sent when a privileged session is required to perform the settings update.","type":"object"},"nullTime":{"format":"date-time","title":"NullTime implements sql.NullTime functionality.","type":"string"},"selfServiceBrowserLocationChangeRequiredError":{"properties":{"code":{"description":"The status code","example":404,"format":"int64","type":"integer"},"debug":{"description":"Debug information\\n\\nThis field is often not exposed to protect against leaking\\nsensitive information.","example":"SQL field \\"foo\\" is not a bool.","type":"string"},"details":{"additionalProperties":true,"description":"Further error details","type":"object"},"id":{"description":"The error ID\\n\\nUseful when trying to identify various errors in application logic.","type":"string"},"message":{"description":"Error message\\n\\nThe error\'s message.","example":"The resource could not be found","type":"string"},"reason":{"description":"A human-readable reason for the error","example":"User with ID 1234 does not exist.","type":"string"},"redirect_browser_to":{"description":"Since when the flow has expired","type":"string"},"request":{"description":"The request ID\\n\\nThe request ID is often exposed internally in order to trace\\nerrors across service architectures. This is often a UUID.","example":"d7ef54b1-ec15-46e6-bccb-524b82c035e6","type":"string"},"status":{"description":"The status description","example":"Not Found","type":"string"}},"required":["message"],"title":"Is sent when a flow requires a browser to change its location.","type":"object"},"selfServiceError":{"properties":{"created_at":{"description":"CreatedAt is a helper struct field for gobuffalo.pop.","format":"date-time","type":"string"},"error":{"type":"object"},"id":{"$ref":"#/components/schemas/UUID"},"updated_at":{"description":"UpdatedAt is a helper struct field for gobuffalo.pop.","format":"date-time","type":"string"}},"required":["id"],"type":"object"},"selfServiceFlowExpiredError":{"description":"Is sent when a flow is expired","properties":{"code":{"description":"The status code","example":404,"format":"int64","type":"integer"},"debug":{"description":"Debug information\\n\\nThis field is often not exposed to protect against leaking\\nsensitive information.","example":"SQL field \\"foo\\" is not a bool.","type":"string"},"details":{"additionalProperties":true,"description":"Further error details","type":"object"},"id":{"description":"The error ID\\n\\nUseful when trying to identify various errors in application logic.","type":"string"},"message":{"description":"Error message\\n\\nThe error\'s message.","example":"The resource could not be found","type":"string"},"reason":{"description":"A human-readable reason for the error","example":"User with ID 1234 does not exist.","type":"string"},"request":{"description":"The request ID\\n\\nThe request ID is often exposed internally in order to trace\\nerrors across service architectures. This is often a UUID.","example":"d7ef54b1-ec15-46e6-bccb-524b82c035e6","type":"string"},"since":{"$ref":"#/components/schemas/Duration"},"status":{"description":"The status description","example":"Not Found","type":"string"},"use_flow_id":{"$ref":"#/components/schemas/UUID"}},"required":["message"],"type":"object"},"selfServiceFlowType":{"description":"The flow type can either be `api` or `browser`.","title":"Type is the flow type.","type":"string"},"selfServiceLoginFlow":{"description":"This object represents a login flow. A login flow is initiated at the \\"Initiate Login API / Browser Flow\\"\\nendpoint by a client.\\n\\nOnce a login flow is completed successfully, a session cookie or session token will be issued.","properties":{"active":{"$ref":"#/components/schemas/identityCredentialsType"},"created_at":{"description":"CreatedAt is a helper struct field for gobuffalo.pop.","format":"date-time","type":"string"},"expires_at":{"description":"ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in,\\na new flow has to be initiated.","format":"date-time","type":"string"},"id":{"$ref":"#/components/schemas/UUID"},"issued_at":{"description":"IssuedAt is the time (UTC) when the flow started.","format":"date-time","type":"string"},"refresh":{"description":"Refresh stores whether this login flow should enforce re-authentication.","type":"boolean"},"request_url":{"description":"RequestURL is the initial URL that was requested from Ory Kratos. It can be used\\nto forward information contained in the URL\'s path or query for example.","type":"string"},"requested_aal":{"$ref":"#/components/schemas/authenticatorAssuranceLevel"},"return_to":{"description":"ReturnTo contains the requested return_to URL.","type":"string"},"type":{"$ref":"#/components/schemas/selfServiceFlowType"},"ui":{"$ref":"#/components/schemas/uiContainer"},"updated_at":{"description":"UpdatedAt is a helper struct field for gobuffalo.pop.","format":"date-time","type":"string"}},"required":["id","type","expires_at","issued_at","request_url","ui"],"title":"Login Flow","type":"object"},"selfServiceLogoutUrl":{"properties":{"logout_token":{"description":"LogoutToken can be used to perform logout using AJAX.","type":"string"},"logout_url":{"description":"LogoutURL can be opened in a browser to sign the user out.\\n\\nformat: uri","type":"string"}},"required":["logout_url","logout_token"],"type":"object"},"selfServiceRecoveryFlow":{"description":"This request is used when an identity wants to recover their account.\\n\\nWe recommend reading the [Account Recovery Documentation](../self-service/flows/password-reset-account-recovery)","properties":{"active":{"description":"Active, if set, contains the registration method that is being used. It is initially\\nnot set.","type":"string"},"expires_at":{"description":"ExpiresAt is the time (UTC) when the request expires. If the user still wishes to update the setting,\\na new request has to be initiated.","format":"date-time","type":"string"},"id":{"$ref":"#/components/schemas/UUID"},"issued_at":{"description":"IssuedAt is the time (UTC) when the request occurred.","format":"date-time","type":"string"},"request_url":{"description":"RequestURL is the initial URL that was requested from Ory Kratos. It can be used\\nto forward information contained in the URL\'s path or query for example.","type":"string"},"return_to":{"description":"ReturnTo contains the requested return_to URL.","type":"string"},"state":{"$ref":"#/components/schemas/selfServiceRecoveryFlowState"},"type":{"$ref":"#/components/schemas/selfServiceFlowType"},"ui":{"$ref":"#/components/schemas/uiContainer"}},"required":["id","expires_at","issued_at","request_url","ui","state"],"title":"A Recovery Flow","type":"object"},"selfServiceRecoveryFlowState":{"description":"The state represents the state of the recovery flow.\\n\\nchoose_method: ask the user to choose a method (e.g. recover account via email)\\nsent_email: the email has been sent to the user\\npassed_challenge: the request was successful and the recovery challenge was passed.","enum":["choose_method","sent_email","passed_challenge"],"title":"Recovery Flow State","type":"string"},"selfServiceRecoveryLink":{"properties":{"expires_at":{"description":"Recovery Link Expires At\\n\\nThe timestamp when the recovery link expires.","format":"date-time","type":"string"},"recovery_link":{"description":"Recovery Link\\n\\nThis link can be used to recover the account.","type":"string"}},"required":["recovery_link"],"type":"object"},"selfServiceRegistrationFlow":{"properties":{"active":{"$ref":"#/components/schemas/identityCredentialsType"},"expires_at":{"description":"ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in,\\na new flow has to be initiated.","format":"date-time","type":"string"},"id":{"$ref":"#/components/schemas/UUID"},"issued_at":{"description":"IssuedAt is the time (UTC) when the flow occurred.","format":"date-time","type":"string"},"request_url":{"description":"RequestURL is the initial URL that was requested from Ory Kratos. It can be used\\nto forward information contained in the URL\'s path or query for example.","type":"string"},"return_to":{"description":"ReturnTo contains the requested return_to URL.","type":"string"},"type":{"$ref":"#/components/schemas/selfServiceFlowType"},"ui":{"$ref":"#/components/schemas/uiContainer"}},"required":["id","expires_at","issued_at","request_url","ui"],"type":"object"},"selfServiceSettingsFlow":{"description":"This flow is used when an identity wants to update settings\\n(e.g. profile data, passwords, ...) in a selfservice manner.\\n\\nWe recommend reading the [User Settings Documentation](../self-service/flows/user-settings)","properties":{"active":{"description":"Active, if set, contains the registration method that is being used. It is initially\\nnot set.","type":"string"},"expires_at":{"description":"ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to update the setting,\\na new flow has to be initiated.","format":"date-time","type":"string"},"id":{"$ref":"#/components/schemas/UUID"},"identity":{"$ref":"#/components/schemas/identity"},"issued_at":{"description":"IssuedAt is the time (UTC) when the flow occurred.","format":"date-time","type":"string"},"request_url":{"description":"RequestURL is the initial URL that was requested from Ory Kratos. It can be used\\nto forward information contained in the URL\'s path or query for example.","type":"string"},"return_to":{"description":"ReturnTo contains the requested return_to URL.","type":"string"},"state":{"$ref":"#/components/schemas/selfServiceSettingsFlowState"},"type":{"$ref":"#/components/schemas/selfServiceFlowType"},"ui":{"$ref":"#/components/schemas/uiContainer"}},"required":["id","expires_at","issued_at","request_url","ui","identity","state"],"title":"Flow represents a Settings Flow","type":"object"},"selfServiceSettingsFlowState":{"description":"show_form: No user data has been collected, or it is invalid, and thus the form should be shown.\\nsuccess: Indicates that the settings flow has been updated successfully with the provided data.\\nDone will stay true when repeatedly checking. If set to true, done will revert back to false only\\nwhen a flow with invalid (e.g. \\"please use a valid phone number\\") data was sent.","enum":["show_form","success"],"title":"State represents the state of this flow. It knows two states:","type":"string"},"selfServiceVerificationFlow":{"description":"Used to verify an out-of-band communication\\nchannel such as an email address or a phone number.\\n\\nFor more information head over to: https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation","properties":{"active":{"description":"Active, if set, contains the registration method that is being used. It is initially\\nnot set.","type":"string"},"expires_at":{"description":"ExpiresAt is the time (UTC) when the request expires. If the user still wishes to verify the address,\\na new request has to be initiated.","format":"date-time","type":"string"},"id":{"$ref":"#/components/schemas/UUID"},"issued_at":{"description":"IssuedAt is the time (UTC) when the request occurred.","format":"date-time","type":"string"},"request_url":{"description":"RequestURL is the initial URL that was requested from Ory Kratos. It can be used\\nto forward information contained in the URL\'s path or query for example.","type":"string"},"return_to":{"description":"ReturnTo contains the requested return_to URL.","type":"string"},"state":{"$ref":"#/components/schemas/selfServiceVerificationFlowState"},"type":{"$ref":"#/components/schemas/selfServiceFlowType"},"ui":{"$ref":"#/components/schemas/uiContainer"}},"required":["id","type","ui","state"],"title":"A Verification Flow","type":"object"},"selfServiceVerificationFlowState":{"description":"The state represents the state of the verification flow.\\n\\nchoose_method: ask the user to choose a method (e.g. recover account via email)\\nsent_email: the email has been sent to the user\\npassed_challenge: the request was successful and the recovery challenge was passed.","enum":["choose_method","sent_email","passed_challenge"],"title":"Verification Flow State","type":"string"},"session":{"description":"A Session","properties":{"active":{"description":"Active state. If false the session is no longer active.","type":"boolean"},"authenticated_at":{"description":"The Session Authentication Timestamp\\n\\nWhen this session was authenticated at. If multi-factor authentication was used this\\nis the time when the last factor was authenticated (e.g. the TOTP code challenge was completed).","format":"date-time","type":"string"},"authentication_methods":{"$ref":"#/components/schemas/sessionAuthenticationMethods"},"authenticator_assurance_level":{"$ref":"#/components/schemas/authenticatorAssuranceLevel"},"expires_at":{"description":"The Session Expiry\\n\\nWhen this session expires at.","format":"date-time","type":"string"},"id":{"$ref":"#/components/schemas/UUID"},"identity":{"$ref":"#/components/schemas/identity"},"issued_at":{"description":"The Session Issuance Timestamp\\n\\nWhen this session was issued at. Usually equal or close to `authenticated_at`.","format":"date-time","type":"string"}},"required":["id","identity"],"type":"object"},"sessionAuthenticationMethod":{"description":"A singular authenticator used during authentication / login.","properties":{"completed_at":{"description":"When the authentication challenge was completed.","format":"date-time","type":"string"},"method":{"enum":["link_recovery","password","totp","oidc","webauthn"],"title":"The method used","type":"string"}},"title":"AuthenticationMethod identifies an authentication method","type":"object"},"sessionAuthenticationMethods":{"description":"A list of authenticators which were used to authenticate the session.","items":{"$ref":"#/components/schemas/sessionAuthenticationMethod"},"title":"List of (Used) AuthenticationMethods","type":"array"},"sessionDevice":{"properties":{"user_agent":{"description":"UserAgent of this device","type":"string"}},"type":"object"},"settingsProfileFormConfig":{"properties":{"action":{"description":"Action should be used as the form action URL `<form action=\\"{{ .Action }}\\" method=\\"post\\">`.","type":"string"},"messages":{"$ref":"#/components/schemas/uiTexts"},"method":{"description":"Method is the form method (e.g. POST)","type":"string"},"nodes":{"$ref":"#/components/schemas/uiNodes"}},"required":["action","method","nodes"],"type":"object"},"submitSelfServiceLoginFlowBody":{"discriminator":{"mapping":{"oidc":"#/components/schemas/submitSelfServiceLoginFlowWithOidcMethodBody","password":"#/components/schemas/submitSelfServiceLoginFlowWithPasswordMethodBody","totp":"#/components/schemas/submitSelfServiceLoginFlowWithTotpMethodBody"},"propertyName":"method"},"oneOf":[{"$ref":"#/components/schemas/submitSelfServiceLoginFlowWithPasswordMethodBody"},{"$ref":"#/components/schemas/submitSelfServiceLoginFlowWithOidcMethodBody"},{"$ref":"#/components/schemas/submitSelfServiceLoginFlowWithTotpMethodBody"}]},"submitSelfServiceLoginFlowWithLookupSecretMethodBody":{"properties":{"csrf_token":{"description":"Sending the anti-csrf token is only required for browser login flows.","type":"string"},"lookup_secret":{"description":"The lookup secret.","type":"string"},"method":{"description":"Method should be set to \\"lookup_secret\\" when logging in using the lookup_secret strategy.","type":"string"}},"required":["method","lookup_secret"],"title":"submitSelfServiceLoginFlowWithLookupSecretMethodBody is used to decode the login form payload.","type":"object"},"submitSelfServiceLoginFlowWithOidcMethodBody":{"description":"SubmitSelfServiceLoginFlowWithOidcMethodBody is used to decode the login form payload\\nwhen using the oidc method.","properties":{"csrf_token":{"description":"The CSRF Token","type":"string"},"method":{"description":"Method to use\\n\\nThis field must be set to `oidc` when using the oidc method.","type":"string"},"provider":{"description":"The provider to register with","type":"string"},"traits":{"description":"The identity traits. This is a placeholder for the registration flow.","type":"object"}},"required":["provider","method"],"type":"object"},"submitSelfServiceLoginFlowWithPasswordMethodBody":{"properties":{"csrf_token":{"description":"Sending the anti-csrf token is only required for browser login flows.","type":"string"},"method":{"description":"Method should be set to \\"password\\" when logging in using the identifier and password strategy.","type":"string"},"password":{"description":"The user\'s password.","type":"string"},"password_identifier":{"description":"Identifier is the email or username of the user trying to log in.","type":"string"}},"required":["method","password","password_identifier"],"title":"submitSelfServiceLoginFlowWithPasswordMethodBody is used to decode the login form payload.","type":"object"},"submitSelfServiceLoginFlowWithTotpMethodBody":{"properties":{"csrf_token":{"description":"Sending the anti-csrf token is only required for browser login flows.","type":"string"},"method":{"description":"Method should be set to \\"totp\\" when logging in using the TOTP strategy.","type":"string"},"totp_code":{"description":"The TOTP code.","type":"string"}},"required":["method","totp_code"],"title":"submitSelfServiceLoginFlowWithTotpMethodBody is used to decode the login form payload.","type":"object"},"submitSelfServiceLoginFlowWithWebAuthnMethodBody":{"properties":{"csrf_token":{"description":"Sending the anti-csrf token is only required for browser login flows.","type":"string"},"method":{"description":"Method should be set to \\"webAuthn\\" when logging in using the WebAuthn strategy.","type":"string"},"webauthn_login":{"description":"Login a WebAuthn Security Key\\n\\nThis must contain the ID of the WebAuthN connection.","type":"string"}},"required":["method"],"title":"submitSelfServiceLoginFlowWithWebAuthnMethodBody is used to decode the login form payload.","type":"object"},"submitSelfServiceLogoutFlowWithoutBrowserBody":{"description":"nolint:deadcode,unused","properties":{"session_token":{"description":"The Session Token\\n\\nInvalidate this session token.","type":"string"}},"required":["session_token"],"type":"object"},"submitSelfServiceRecoveryFlowBody":{"discriminator":{"mapping":{"link":"#/components/schemas/submitSelfServiceRecoveryFlowWithLinkMethodBody"},"propertyName":"method"},"oneOf":[{"$ref":"#/components/schemas/submitSelfServiceRecoveryFlowWithLinkMethodBody"}]},"submitSelfServiceRecoveryFlowWithLinkMethodBody":{"properties":{"csrf_token":{"description":"Sending the anti-csrf token is only required for browser login flows.","type":"string"},"email":{"description":"Email to Recover\\n\\nNeeds to be set when initiating the flow. If the email is a registered\\nrecovery email, a recovery link will be sent. If the email is not known,\\na email with details on what happened will be sent instead.\\n\\nformat: email","type":"string"},"method":{"description":"Method supports `link` only right now.","type":"string"}},"required":["email","method"],"type":"object"},"submitSelfServiceRegistrationFlowBody":{"discriminator":{"mapping":{"oidc":"#/components/schemas/submitSelfServiceRegistrationFlowWithOidcMethodBody","password":"#/components/schemas/submitSelfServiceRegistrationFlowWithPasswordMethodBody"},"propertyName":"method"},"oneOf":[{"$ref":"#/components/schemas/submitSelfServiceRegistrationFlowWithPasswordMethodBody"},{"$ref":"#/components/schemas/submitSelfServiceRegistrationFlowWithOidcMethodBody"}]},"submitSelfServiceRegistrationFlowWithOidcMethodBody":{"description":"SubmitSelfServiceRegistrationFlowWithOidcMethodBody is used to decode the registration form payload\\nwhen using the oidc method.","properties":{"csrf_token":{"description":"The CSRF Token","type":"string"},"method":{"description":"Method to use\\n\\nThis field must be set to `oidc` when using the oidc method.","type":"string"},"provider":{"description":"The provider to register with","type":"string"},"traits":{"description":"The identity traits","type":"object"}},"required":["provider","method"],"type":"object"},"submitSelfServiceRegistrationFlowWithPasswordMethodBody":{"description":"SubmitSelfServiceRegistrationFlowWithPasswordMethodBody is used to decode the registration form payload\\nwhen using the password method.","properties":{"csrf_token":{"description":"The CSRF Token","type":"string"},"method":{"description":"Method to use\\n\\nThis field must be set to `password` when using the password method.","type":"string"},"password":{"description":"Password to sign the user up with","type":"string"},"traits":{"description":"The identity\'s traits","type":"object"}},"required":["password","traits","method"],"type":"object"},"submitSelfServiceSettingsFlowBody":{"discriminator":{"mapping":{"oidc":"#/components/schemas/submitSelfServiceSettingsFlowWithOidcMethodBody","password":"#/components/schemas/submitSelfServiceSettingsFlowWithPasswordMethodBody","profile":"#/components/schemas/submitSelfServiceSettingsFlowWithProfileMethodBody","totp":"#/components/schemas/submitSelfServiceSettingsFlowWithTotpMethodBody"},"propertyName":"method"},"oneOf":[{"$ref":"#/components/schemas/submitSelfServiceSettingsFlowWithPasswordMethodBody"},{"$ref":"#/components/schemas/submitSelfServiceSettingsFlowWithProfileMethodBody"},{"$ref":"#/components/schemas/submitSelfServiceSettingsFlowWithOidcMethodBody"},{"$ref":"#/components/schemas/submitSelfServiceSettingsFlowWithOidcMethodBody"},{"$ref":"#/components/schemas/submitSelfServiceSettingsFlowWithTotpMethodBody"}]},"submitSelfServiceSettingsFlowWithLookupMethodBody":{"properties":{"csrf_token":{"description":"CSRFToken is the anti-CSRF token","type":"string"},"lookup_secret_confirm":{"description":"If set to true will save the regenerated lookup secrets","type":"boolean"},"lookup_secret_disable":{"description":"Disables this method if true.","type":"boolean"},"lookup_secret_regenerate":{"description":"If set to true will regenerate the lookup secrets","type":"boolean"},"lookup_secret_reveal":{"description":"If set to true will reveal the lookup secrets","type":"boolean"},"method":{"description":"Method\\n\\nShould be set to \\"lookup\\" when trying to add, update, or remove a lookup pairing.","type":"string"}},"required":["method"],"type":"object"},"submitSelfServiceSettingsFlowWithOidcMethodBody":{"description":"nolint:deadcode,unused","properties":{"flow":{"description":"Flow ID is the flow\'s ID.\\n\\nin: query","type":"string"},"link":{"description":"Link this provider\\n\\nEither this or `unlink` must be set.\\n\\ntype: string\\nin: body","type":"string"},"method":{"description":"Method\\n\\nShould be set to profile when trying to update a profile.","type":"string"},"traits":{"description":"The identity\'s traits\\n\\nin: body","type":"object"},"unlink":{"description":"Unlink this provider\\n\\nEither this or `link` must be set.\\n\\ntype: string\\nin: body","type":"string"}},"required":["method"],"type":"object"},"submitSelfServiceSettingsFlowWithPasswordMethodBody":{"properties":{"csrf_token":{"description":"CSRFToken is the anti-CSRF token","type":"string"},"method":{"description":"Method\\n\\nShould be set to password when trying to update a password.","type":"string"},"password":{"description":"Password is the updated password","type":"string"}},"required":["password","method"],"type":"object"},"submitSelfServiceSettingsFlowWithProfileMethodBody":{"description":"nolint:deadcode,unused","properties":{"csrf_token":{"description":"The Anti-CSRF Token\\n\\nThis token is only required when performing browser flows.","type":"string"},"method":{"description":"Method\\n\\nShould be set to profile when trying to update a profile.","type":"string"},"traits":{"description":"Traits contains all of the identity\'s traits.","type":"object"}},"required":["traits","method"],"type":"object"},"submitSelfServiceSettingsFlowWithTotpMethodBody":{"properties":{"csrf_token":{"description":"CSRFToken is the anti-CSRF token","type":"string"},"method":{"description":"Method\\n\\nShould be set to \\"totp\\" when trying to add, update, or remove a totp pairing.","type":"string"},"totp_code":{"description":"ValidationTOTP must contain a valid TOTP based on the","type":"string"},"totp_unlink":{"description":"UnlinkTOTP if true will remove the TOTP pairing,\\neffectively removing the credential. This can be used\\nto set up a new TOTP device.","type":"boolean"}},"required":["method"],"type":"object"},"submitSelfServiceSettingsFlowWithWebAuthnMethodBody":{"properties":{"csrf_token":{"description":"CSRFToken is the anti-CSRF token","type":"string"},"method":{"description":"Method\\n\\nShould be set to \\"webauthn\\" when trying to add, update, or remove a webAuthn pairing.","type":"string"},"webauthn_register":{"description":"Register a WebAuthn Security Key\\n\\nIt is expected that the JSON returned by the WebAuthn registration process\\nis included here.","type":"string"},"webauthn_register_displayname":{"description":"Name of the WebAuthn Security Key to be Added\\n\\nA human-readable name for the security key which will be added.","type":"string"},"webauthn_remove":{"description":"Remove a WebAuthn Security Key\\n\\nThis must contain the ID of the WebAuthN connection.","type":"string"}},"required":["method"],"type":"object"},"submitSelfServiceVerificationFlowBody":{"description":"nolint:deadcode,unused","discriminator":{"mapping":{"link":"#/components/schemas/submitSelfServiceVerificationFlowWithLinkMethodBody"},"propertyName":"method"},"oneOf":[{"$ref":"#/components/schemas/submitSelfServiceVerificationFlowWithLinkMethodBody"}]},"submitSelfServiceVerificationFlowWithLinkMethodBody":{"properties":{"csrf_token":{"description":"Sending the anti-csrf token is only required for browser login flows.","type":"string"},"email":{"description":"Email to Verify\\n\\nNeeds to be set when initiating the flow. If the email is a registered\\nverification email, a verification link will be sent. If the email is not known,\\na email with details on what happened will be sent instead.\\n\\nformat: email","type":"string"},"method":{"description":"Method supports `link` only right now.","type":"string"}},"required":["email","method"],"type":"object"},"successfulSelfServiceLoginWithoutBrowser":{"description":"The Response for Login Flows via API","properties":{"session":{"$ref":"#/components/schemas/session"},"session_token":{"description":"The Session Token\\n\\nA session token is equivalent to a session cookie, but it can be sent in the HTTP Authorization\\nHeader:\\n\\nAuthorization: bearer ${session-token}\\n\\nThe session token is only issued for API flows, not for Browser flows!","type":"string"}},"required":["session"],"type":"object"},"successfulSelfServiceRegistrationWithoutBrowser":{"description":"The Response for Registration Flows via API","properties":{"identity":{"$ref":"#/components/schemas/identity"},"session":{"$ref":"#/components/schemas/session"},"session_token":{"description":"The Session Token\\n\\nThis field is only set when the session hook is configured as a post-registration hook.\\n\\nA session token is equivalent to a session cookie, but it can be sent in the HTTP Authorization\\nHeader:\\n\\nAuthorization: bearer ${session-token}\\n\\nThe session token is only issued for API flows, not for Browser flows!","type":"string"}},"required":["identity"],"type":"object"},"uiContainer":{"description":"Container represents a HTML Form. The container can work with both HTTP Form and JSON requests","properties":{"action":{"description":"Action should be used as the form action URL `<form action=\\"{{ .Action }}\\" method=\\"post\\">`.","type":"string"},"messages":{"$ref":"#/components/schemas/uiTexts"},"method":{"description":"Method is the form method (e.g. POST)","type":"string"},"nodes":{"$ref":"#/components/schemas/uiNodes"}},"required":["action","method","nodes"],"type":"object"},"uiNode":{"description":"Nodes are represented as HTML elements or their native UI equivalents. For example,\\na node can be an `<img>` tag, or an `<input element>` but also `some plain text`.","properties":{"attributes":{"$ref":"#/components/schemas/uiNodeAttributes"},"group":{"$ref":"#/components/schemas/uiNodeGroup"},"messages":{"$ref":"#/components/schemas/uiTexts"},"meta":{"$ref":"#/components/schemas/uiNodeMeta"},"type":{"$ref":"#/components/schemas/uiNodeType"}},"required":["type","group","attributes","messages","meta"],"title":"Node represents a flow\'s nodes","type":"object"},"uiNodeAnchorAttributes":{"properties":{"href":{"description":"The link\'s href (destination) URL.\\n\\nformat: uri","type":"string"},"id":{"description":"A unique identifier","type":"string"},"node_type":{"$ref":"#/components/schemas/uiNodeType"},"title":{"$ref":"#/components/schemas/uiText"}},"required":["href","title","id","node_type"],"title":"AnchorAttributes represents the attributes of an anchor node.","type":"object"},"uiNodeAttributes":{"discriminator":{"mapping":{"anchor":"#/components/schemas/uiNodeAnchorAttributes","image":"#/components/schemas/uiNodeImageAttributes","input":"#/components/schemas/uiNodeInputAttributes","script":"#/components/schemas/uiNodeScriptAttributes","text":"#/components/schemas/uiNodeTextAttributes"},"propertyName":"node_type"},"oneOf":[{"$ref":"#/components/schemas/uiNodeInputAttributes"},{"$ref":"#/components/schemas/uiNodeTextAttributes"},{"$ref":"#/components/schemas/uiNodeImageAttributes"},{"$ref":"#/components/schemas/uiNodeAnchorAttributes"},{"$ref":"#/components/schemas/uiNodeScriptAttributes"}],"title":"Attributes represents a list of attributes (e.g. `href=\\"foo\\"` for links)."},"uiNodeGroup":{"type":"string"},"uiNodeImageAttributes":{"properties":{"height":{"description":"Height of the image","format":"int64","type":"integer"},"id":{"description":"A unique identifier","type":"string"},"node_type":{"$ref":"#/components/schemas/uiNodeType"},"src":{"description":"The image\'s source URL.\\n\\nformat: uri","type":"string"},"width":{"description":"Width of the image","format":"int64","type":"integer"}},"required":["src","id","node_type"],"title":"ImageAttributes represents the attributes of an image node.","type":"object"},"uiNodeInputAttributeType":{"type":"string"},"uiNodeInputAttributes":{"description":"InputAttributes represents the attributes of an input node","properties":{"disabled":{"description":"Sets the input\'s disabled field to true or false.","type":"boolean"},"label":{"$ref":"#/components/schemas/uiText"},"name":{"description":"The input\'s element name.","type":"string"},"node_type":{"$ref":"#/components/schemas/uiNodeType"},"onclick":{"description":"OnClick may contain javascript which should be executed on click. This is primarily\\nused for WebAuthn.","type":"string"},"pattern":{"description":"The input\'s pattern.","type":"string"},"required":{"description":"Mark this input field as required.","type":"boolean"},"type":{"$ref":"#/components/schemas/uiNodeInputAttributeType"},"value":{"description":"The input\'s value.","nullable":true}},"required":["name","type","disabled","node_type"],"type":"object"},"uiNodeMeta":{"description":"This might include a label and other information that can optionally\\nbe used to render UIs.","properties":{"label":{"$ref":"#/components/schemas/uiText"}},"title":"A Node\'s Meta Information","type":"object"},"uiNodeScriptAttributes":{"properties":{"async":{"description":"The script async type","type":"boolean"},"crossorigin":{"description":"The script cross origin policy","type":"string"},"id":{"description":"A unique identifier","type":"string"},"integrity":{"description":"The script\'s integrity hash","type":"string"},"node_type":{"$ref":"#/components/schemas/uiNodeType"},"referrerpolicy":{"description":"The script referrer policy","type":"string"},"src":{"description":"The script source","type":"string"},"type":{"description":"The script MIME type","type":"string"}},"required":["src","async","referrerpolicy","crossorigin","integrity","type","id","node_type"],"title":"ScriptAttributes represent script nodes which load javascript.","type":"object"},"uiNodeTextAttributes":{"properties":{"id":{"description":"A unique identifier","type":"string"},"node_type":{"$ref":"#/components/schemas/uiNodeType"},"text":{"$ref":"#/components/schemas/uiText"}},"required":["text","id","node_type"],"title":"TextAttributes represents the attributes of a text node.","type":"object"},"uiNodeType":{"type":"string"},"uiNodes":{"items":{"$ref":"#/components/schemas/uiNode"},"type":"array"},"uiText":{"properties":{"context":{"description":"The message\'s context. Useful when customizing messages.","type":"object"},"id":{"$ref":"#/components/schemas/ID"},"text":{"description":"The message text. Written in american english.","type":"string"},"type":{"$ref":"#/components/schemas/uiTextType"}},"required":["id","text","type"],"type":"object"},"uiTextType":{"type":"string"},"uiTexts":{"items":{"$ref":"#/components/schemas/uiText"},"type":"array"},"verifiableIdentityAddress":{"description":"VerifiableAddress is an identity\'s verifiable address","properties":{"created_at":{"description":"When this entry was created","example":"2014-01-01T23:28:56.782Z","format":"date-time","type":"string"},"id":{"$ref":"#/components/schemas/UUID"},"status":{"$ref":"#/components/schemas/identityVerifiableAddressStatus"},"updated_at":{"description":"When this entry was last updated","example":"2014-01-01T23:28:56.782Z","format":"date-time","type":"string"},"value":{"description":"The address value\\n\\nexample foo@user.com","type":"string"},"verified":{"description":"Indicates if the address has already been verified","example":true,"type":"boolean"},"verified_at":{"$ref":"#/components/schemas/nullTime"},"via":{"$ref":"#/components/schemas/identityVerifiableAddressType"}},"required":["id","value","verified","via","status"],"type":"object"},"version":{"properties":{"version":{"description":"Version is the service\'s version.","type":"string"}},"type":"object"},"webAuthnJavaScript":{"type":"string"}},"securitySchemes":{"oryAccessToken":{"in":"header","name":"Authorization","type":"apiKey"}}},"info":{"contact":{"email":"hi@ory.sh"},"description":"Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs\\nare exposed on different ports. Public APIs can face the public internet without any protection\\nwhile administrative APIs should never be exposed without prior authorization. To protect\\nthe administative API port you should use something like Nginx, Ory Oathkeeper, or any other\\ntechnology capable of authorizing incoming requests.\\n","license":{"name":"Apache 2.0"},"title":"Ory Kratos API","version":"v0.8.0-alpha.4.pre.0"},"openapi":"3.0.3","paths":{"/.well-known/ory/webauthn.js":{"get":{"description":"This endpoint provides JavaScript which is needed in order to perform WebAuthn login and registration.\\n\\nIf you are building a JavaScript Browser App (e.g. in ReactJS or AngularJS) you will need to load this file:\\n\\n```html\\n<script src=\\"https://public-kratos.example.org/.well-known/ory/webauthn.js\\" type=\\"script\\" async />\\n```\\n\\nMore information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).","operationId":"getWebAuthnJavaScript","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/webAuthnJavaScript"}}},"description":"webAuthnJavaScript"}},"summary":"Get WebAuthn JavaScript","tags":["v0alpha2"]}},"/health/alive":{"get":{"description":"This endpoint returns a HTTP 200 status code when Ory Kratos is accepting incoming\\nHTTP requests. This status does currently not include checks whether the database connection is working.\\n\\nIf the service supports TLS Edge Termination, this endpoint does not require the\\n`X-Forwarded-Proto` header to be set.\\n\\nBe aware that if you are running multiple nodes of this service, the health status will never\\nrefer to the cluster state, only to a single instance.","operationId":"isAlive","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"description":"Always \\"ok\\".","type":"string"}},"required":["status"],"type":"object"}}},"description":"Ory Kratos is ready to accept connections."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/genericError"}}},"description":"genericError"}},"summary":"Check HTTP Server Status","tags":["metadata"]}},"/health/ready":{"get":{"description":"This endpoint returns a HTTP 200 status code when Ory Kratos is up running and the environment dependencies (e.g.\\nthe database) are responsive as well.\\n\\nIf the service supports TLS Edge Termination, this endpoint does not require the\\n`X-Forwarded-Proto` header to be set.\\n\\nBe aware that if you are running multiple nodes of Ory Kratos, the health status will never\\nrefer to the cluster state, only to a single instance.","operationId":"isReady","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"status":{"description":"Always \\"ok\\".","type":"string"}},"required":["status"],"type":"object"}}},"description":"Ory Kratos is ready to accept requests."},"503":{"content":{"application/json":{"schema":{"properties":{"errors":{"additionalProperties":{"type":"string"},"description":"Errors contains a list of errors that caused the not ready status.","type":"object"}},"required":["errors"],"type":"object"}}},"description":"Ory Kratos is not yet ready to accept requests."}},"summary":"Check HTTP Server and Database Status","tags":["metadata"]}},"/identities":{"get":{"description":"Lists all identities. Does not support search at the moment.\\n\\nLearn how identities work in [Ory Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).","operationId":"adminListIdentities","parameters":[{"description":"Items per Page\\n\\nThis is the number of items per page.","in":"query","name":"per_page","schema":{"default":100,"format":"int64","maximum":500,"minimum":1,"type":"integer"}},{"description":"Pagination Page","in":"query","name":"page","schema":{"default":0,"format":"int64","minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identityList"}}},"description":"identityList"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"security":[{"oryAccessToken":[]}],"summary":"List Identities","tags":["v0alpha2"]},"post":{"description":"This endpoint creates an identity. It is NOT possible to set an identity\'s credentials (password, ...)\\nusing this method! A way to achieve that will be introduced in the future.\\n\\nLearn how identities work in [Ory Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).","operationId":"adminCreateIdentity","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/adminCreateIdentityBody"}}},"x-originalParamName":"Body"},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity"}}},"description":"identity"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"security":[{"oryAccessToken":[]}],"summary":"Create an Identity","tags":["v0alpha2"]}},"/identities/{id}":{"delete":{"description":"Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone.\\nThis endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is\\nassumed that is has been deleted already.\\n\\nLearn how identities work in [Ory Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).","operationId":"adminDeleteIdentity","parameters":[{"description":"ID is the identity\'s ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"security":[{"oryAccessToken":[]}],"summary":"Delete an Identity","tags":["v0alpha2"]},"get":{"description":"Learn how identities work in [Ory Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).","operationId":"adminGetIdentity","parameters":[{"description":"ID must be set to the ID of identity you want to get","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"DeclassifyCredentials will declassify one or more identity\'s credentials\\n\\nCurrently, only `oidc` is supported. This will return the initial OAuth 2.0 Access,\\nRefresh and (optionally) OpenID Connect ID Token.","in":"query","name":"include_credential","schema":{"items":{"type":"string"},"type":"array"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity"}}},"description":"identity"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"security":[{"oryAccessToken":[]}],"summary":"Get an Identity","tags":["v0alpha2"]},"put":{"description":"This endpoint updates an identity. It is NOT possible to set an identity\'s credentials (password, ...)\\nusing this method! A way to achieve that will be introduced in the future.\\n\\nThe full identity payload (except credentials) is expected. This endpoint does not support patching.\\n\\nLearn how identities work in [Ory Kratos\' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).","operationId":"adminUpdateIdentity","parameters":[{"description":"ID must be set to the ID of identity you want to update","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateIdentityBody"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identity"}}},"description":"identity"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"security":[{"oryAccessToken":[]}],"summary":"Update an Identity","tags":["v0alpha2"]}},"/identities/{id}/sessions":{"delete":{"description":"This endpoint is useful for:\\n\\nTo forcefully logout Identity from all devices and sessions","operationId":"adminDeleteIdentitySessions","parameters":[{"description":"ID is the identity\'s ID.","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"security":[{"oryAccessToken":[]}],"summary":"Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.","tags":["v0alpha2"]}},"/recovery/link":{"post":{"description":"This endpoint creates a recovery link which should be given to the user in order for them to recover\\n(or activate) their account.","operationId":"adminCreateSelfServiceRecoveryLink","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/adminCreateSelfServiceRecoveryLinkBody"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceRecoveryLink"}}},"description":"selfServiceRecoveryLink"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Create a Recovery Link","tags":["v0alpha2"]}},"/schemas":{"get":{"description":"Get all Identity Schemas","operationId":"listIdentitySchemas","parameters":[{"description":"Items per Page\\n\\nThis is the number of items per page.","in":"query","name":"per_page","schema":{"default":100,"format":"int64","maximum":500,"minimum":1,"type":"integer"}},{"description":"Pagination Page","in":"query","name":"page","schema":{"default":0,"format":"int64","minimum":0,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/identitySchemas"}}},"description":"identitySchemas"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"tags":["v0alpha2"]}},"/schemas/{id}":{"get":{"description":"Get a JSON Schema","operationId":"getJsonSchema","parameters":[{"description":"ID must be set to the ID of schema you want to get","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonSchema"}}},"description":"jsonSchema"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"tags":["v0alpha2"]}},"/self-service/errors":{"get":{"description":"This endpoint returns the error associated with a user-facing self service errors.\\n\\nThis endpoint supports stub values to help you implement the error UI:\\n\\n`?id=stub:500` - returns a stub 500 (Internal Server Error) error.\\n\\nMore information can be found at [Ory Kratos User User Facing Error Documentation](https://www.ory.sh/docs/kratos/self-service/flows/user-facing-errors).","operationId":"getSelfServiceError","parameters":[{"description":"Error is the error\'s ID","in":"query","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceError"}}},"description":"selfServiceError"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Get Self-Service Errors","tags":["v0alpha2"]}},"/self-service/login":{"post":{"description":":::info\\n\\nThis endpoint is EXPERIMENTAL and subject to potential breaking changes in the future.\\n\\n:::\\n\\nUse this endpoint to complete a login flow. This endpoint\\nbehaves differently for API and browser flows.\\n\\nAPI flows expect `application/json` to be sent in the body and responds with\\nHTTP 200 and a application/json body with the session token on success;\\nHTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set;\\nHTTP 400 on form validation errors.\\n\\nBrowser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with\\na HTTP 302 redirect to the post/after login URL or the `return_to` value if it was set and if the login succeeded;\\na HTTP 302 redirect to the login UI URL with the flow ID containing the validation errors otherwise.\\n\\nBrowser flows with an accept header of `application/json` will not redirect but instead respond with\\nHTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success;\\nHTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set;\\nHTTP 400 on form validation errors.\\n\\nIf this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the\\ncase of an error, the `error.id` of the JSON response body can be one of:\\n\\n`session_already_available`: The user is already signed in.\\n`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.\\n`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!\\n`browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.\\nMost likely used in Social Sign In flows.\\n\\nMore information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).","operationId":"submitSelfServiceLoginFlow","parameters":[{"description":"The Login Flow ID\\n\\nThe value for this parameter comes from `flow` URL Query parameter sent to your\\napplication (e.g. `/login?flow=abcde`).","in":"query","name":"flow","required":true,"schema":{"type":"string"}},{"description":"The Session Token of the Identity performing the settings flow.","in":"header","name":"X-Session-Token","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitSelfServiceLoginFlowBody"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/submitSelfServiceLoginFlowBody"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/successfulSelfServiceLoginWithoutBrowser"}}},"description":"successfulSelfServiceLoginWithoutBrowser"},"302":{"$ref":"#/components/responses/emptyResponse"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceLoginFlow"}}},"description":"selfServiceLoginFlow"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceBrowserLocationChangeRequiredError"}}},"description":"selfServiceBrowserLocationChangeRequiredError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Submit a Login Flow","tags":["v0alpha2"]}},"/self-service/login/api":{"get":{"description":"This endpoint initiates a login flow for API clients that do not use a browser, such as mobile devices, smart TVs, and so on.\\n\\nIf a valid provided session cookie or session token is provided, a 400 Bad Request error\\nwill be returned unless the URL query parameter `?refresh=true` is set.\\n\\nTo fetch an existing login flow call `/self-service/login/flows?flow=<flow_id>`.\\n\\nYou MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server\\nPages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make\\nyou vulnerable to a variety of CSRF attacks, including CSRF login attacks.\\n\\nIn the case of an error, the `error.id` of the JSON response body can be one of:\\n\\n`session_already_available`: The user is already signed in.\\n`session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet.\\n`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.\\n\\nThis endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).\\n\\nMore information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).","operationId":"initializeSelfServiceLoginFlowWithoutBrowser","parameters":[{"description":"Refresh a login session\\n\\nIf set to true, this will refresh an existing login session by\\nasking the user to sign in again. This will reset the\\nauthenticated_at time of the session.","in":"query","name":"refresh","schema":{"type":"boolean"}},{"description":"Request a Specific AuthenticationMethod Assurance Level\\n\\nUse this parameter to upgrade an existing session\'s authenticator assurance level (AAL). This\\nallows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password,\\nthe AAL is 1. If you wish to \\"upgrade\\" the session\'s security by asking the user to perform TOTP / WebAuth/ ...\\nyou would set this to \\"aal2\\".","in":"query","name":"aal","schema":{"type":"string"}},{"description":"The Session Token of the Identity performing the settings flow.","in":"header","name":"X-Session-Token","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceLoginFlow"}}},"description":"selfServiceLoginFlow"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Initialize Login Flow for APIs, Services, Apps, ...","tags":["v0alpha2"]}},"/self-service/login/browser":{"get":{"description":"This endpoint initializes a browser-based user login flow. This endpoint will set the appropriate\\ncookies and anti-CSRF measures required for browser-based flows.\\n\\nIf this endpoint is opened as a link in the browser, it will be redirected to\\n`selfservice.flows.login.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session\\nexists already, the browser will be redirected to `urls.default_redirect_url` unless the query parameter\\n`?refresh=true` was set.\\n\\nIf this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the\\ncase of an error, the `error.id` of the JSON response body can be one of:\\n\\n`session_already_available`: The user is already signed in.\\n`session_aal1_required`: Multi-factor auth (e.g. 2fa) was requested but the user has no session yet.\\n`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.\\n`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!\\n\\nThis endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.\\n\\nMore information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).","operationId":"initializeSelfServiceLoginFlowForBrowsers","parameters":[{"description":"Refresh a login session\\n\\nIf set to true, this will refresh an existing login session by\\nasking the user to sign in again. This will reset the\\nauthenticated_at time of the session.","in":"query","name":"refresh","schema":{"type":"boolean"}},{"description":"Request a Specific AuthenticationMethod Assurance Level\\n\\nUse this parameter to upgrade an existing session\'s authenticator assurance level (AAL). This\\nallows you to ask for multi-factor authentication. When an identity sign in using e.g. username+password,\\nthe AAL is 1. If you wish to \\"upgrade\\" the session\'s security by asking the user to perform TOTP / WebAuth/ ...\\nyou would set this to \\"aal2\\".","in":"query","name":"aal","schema":{"type":"string"}},{"description":"The URL to return the browser to after the flow was completed.","in":"query","name":"return_to","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceLoginFlow"}}},"description":"selfServiceLoginFlow"},"302":{"$ref":"#/components/responses/emptyResponse"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Initialize Login Flow for Browsers","tags":["v0alpha2"]}},"/self-service/login/flows":{"get":{"description":"This endpoint returns a login flow\'s context with, for example, error details and other information.\\n\\nBrowser flows expect the anti-CSRF cookie to be included in the request\'s HTTP Cookie Header.\\nFor AJAX requests you must ensure that cookies are included in the request or requests will fail.\\n\\nIf you use the browser-flow for server-side apps, the services need to run on a common top-level-domain\\nand you need to forward the incoming HTTP Cookie header to this endpoint:\\n\\n```js\\npseudo-code example\\nrouter.get(\'/login\', async function (req, res) {\\nconst flow = await client.getSelfServiceLoginFlow(req.header(\'cookie\'), req.query[\'flow\'])\\n\\nres.render(\'login\', flow)\\n})\\n```\\n\\nThis request may fail due to several reasons. The `error.id` can be one of:\\n\\n`session_already_available`: The user is already signed in.\\n`self_service_flow_expired`: The flow is expired and you should request a new one.\\n\\nMore information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).","operationId":"getSelfServiceLoginFlow","parameters":[{"description":"The Login Flow ID\\n\\nThe value for this parameter comes from `flow` URL Query parameter sent to your\\napplication (e.g. `/login?flow=abcde`).","in":"query","name":"id","required":true,"schema":{"type":"string"}},{"description":"HTTP Cookies\\n\\nWhen using the SDK on the server side you must include the HTTP Cookie Header\\noriginally sent to your HTTP handler here.","in":"header","name":"cookie","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceLoginFlow"}}},"description":"selfServiceLoginFlow"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Get Login Flow","tags":["v0alpha2"]}},"/self-service/logout":{"get":{"description":"This endpoint logs out an identity in a self-service manner.\\n\\nIf the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 302 Found)\\nto the `return_to` parameter of the initial request or fall back to `urls.default_return_to`.\\n\\nIf the `Accept` HTTP header is set to `application/json`, a 204 No Content response\\nwill be sent on successful logout instead.\\n\\nThis endpoint is NOT INTENDED for API clients and only works\\nwith browsers (Chrome, Firefox, ...). For API clients you can\\ncall the `/self-service/logout/api` URL directly with the Ory Session Token.\\n\\nMore information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).","operationId":"submitSelfServiceLogoutFlow","parameters":[{"description":"A Valid Logout Token\\n\\nIf you do not have a logout token because you only have a session cookie,\\ncall `/self-service/logout/urls` to generate a URL for this endpoint.","in":"query","name":"token","schema":{"type":"string"}},{"description":"The URL to return to after the logout was completed.","in":"query","name":"return_to","schema":{"type":"string"}}],"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"302":{"$ref":"#/components/responses/emptyResponse"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Complete Self-Service Logout","tags":["v0alpha2"]}},"/self-service/logout/api":{"delete":{"description":"Use this endpoint to log out an identity using an Ory Session Token. If the Ory Session Token was successfully\\nrevoked, the server returns a 204 No Content response. A 204 No Content response is also sent when\\nthe Ory Session Token has been revoked already before.\\n\\nIf the Ory Session Token is malformed or does not exist a 403 Forbidden response will be returned.\\n\\nThis endpoint does not remove any HTTP\\nCookies - use the Browser-Based Self-Service Logout Flow instead.","operationId":"submitSelfServiceLogoutFlowWithoutBrowser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitSelfServiceLogoutFlowWithoutBrowserBody"}}},"required":true,"x-originalParamName":"Body"},"responses":{"204":{"$ref":"#/components/responses/emptyResponse"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Perform Logout for APIs, Services, Apps, ...","tags":["v0alpha2"]}},"/self-service/logout/browser":{"get":{"description":"This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user.\\n\\nThis endpoint is NOT INTENDED for API clients and only works\\nwith browsers (Chrome, Firefox, ...). For API clients you can\\ncall the `/self-service/logout/api` URL directly with the Ory Session Token.\\n\\nThe URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns\\na 401 error.\\n\\nWhen calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.","operationId":"createSelfServiceLogoutFlowUrlForBrowsers","parameters":[{"description":"HTTP Cookies\\n\\nIf you call this endpoint from a backend, please include the\\noriginal Cookie header in the request.","in":"header","name":"cookie","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceLogoutUrl"}}},"description":"selfServiceLogoutUrl"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Create a Logout URL for Browsers","tags":["v0alpha2"]}},"/self-service/recovery":{"post":{"description":"Use this endpoint to complete a recovery flow. This endpoint\\nbehaves differently for API and browser flows and has several states:\\n\\n`choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent\\nand works with API- and Browser-initiated flows.\\nFor API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid.\\nand a HTTP 302 Found redirect with a fresh recovery flow if the flow was otherwise invalid (e.g. expired).\\nFor Browser clients without HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP 302 Found redirect to the Recovery UI URL with the Recovery Flow ID appended.\\n`sent_email` is the success state after `choose_method` for the `link` method and allows the user to request another recovery email. It\\nworks for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state.\\n`passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\\"sending a recovery link\\")\\ndoes not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL\\n(if the link was valid) and instructs the user to update their password, or a redirect to the Recover UI URL with\\na new Recovery Flow ID which contains an error message that the recovery link was invalid.\\n\\nMore information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).","operationId":"submitSelfServiceRecoveryFlow","parameters":[{"description":"The Recovery Flow ID\\n\\nThe value for this parameter comes from `flow` URL Query parameter sent to your\\napplication (e.g. `/recovery?flow=abcde`).","in":"query","name":"flow","required":true,"schema":{"type":"string"}},{"description":"Recovery Token\\n\\nThe recovery token which completes the recovery request. If the token\\nis invalid (e.g. expired) an error will be shown to the end-user.\\n\\nThis parameter is usually set in a link and not used by any direct API call.","in":"query","name":"token","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitSelfServiceRecoveryFlowBody"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/submitSelfServiceRecoveryFlowBody"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceRecoveryFlow"}}},"description":"selfServiceRecoveryFlow"},"302":{"$ref":"#/components/responses/emptyResponse"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceRecoveryFlow"}}},"description":"selfServiceRecoveryFlow"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Complete Recovery Flow","tags":["v0alpha2"]}},"/self-service/recovery/api":{"get":{"description":"This endpoint initiates a recovery flow for API clients such as mobile devices, smart TVs, and so on.\\n\\nIf a valid provided session cookie or session token is provided, a 400 Bad Request error.\\n\\nTo fetch an existing recovery flow call `/self-service/recovery/flows?flow=<flow_id>`.\\n\\nYou MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server\\nPages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make\\nyou vulnerable to a variety of CSRF attacks.\\n\\nThis endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).\\n\\n\\nMore information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).","operationId":"initializeSelfServiceRecoveryFlowWithoutBrowser","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceRecoveryFlow"}}},"description":"selfServiceRecoveryFlow"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Initialize Recovery Flow for APIs, Services, Apps, ...","tags":["v0alpha2"]}},"/self-service/recovery/browser":{"get":{"description":"This endpoint initializes a browser-based account recovery flow. Once initialized, the browser will be redirected to\\n`selfservice.flows.recovery.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session\\nexists, the browser is returned to the configured return URL.\\n\\nIf this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects\\nor a 400 bad request error if the user is already authenticated.\\n\\nThis endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.\\n\\nMore information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).","operationId":"initializeSelfServiceRecoveryFlowForBrowsers","parameters":[{"description":"The URL to return the browser to after the flow was completed.","in":"query","name":"return_to","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceRecoveryFlow"}}},"description":"selfServiceRecoveryFlow"},"302":{"$ref":"#/components/responses/emptyResponse"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Initialize Recovery Flow for Browsers","tags":["v0alpha2"]}},"/self-service/recovery/flows":{"get":{"description":"This endpoint returns a recovery flow\'s context with, for example, error details and other information.\\n\\nBrowser flows expect the anti-CSRF cookie to be included in the request\'s HTTP Cookie Header.\\nFor AJAX requests you must ensure that cookies are included in the request or requests will fail.\\n\\nIf you use the browser-flow for server-side apps, the services need to run on a common top-level-domain\\nand you need to forward the incoming HTTP Cookie header to this endpoint:\\n\\n```js\\npseudo-code example\\nrouter.get(\'/recovery\', async function (req, res) {\\nconst flow = await client.getSelfServiceRecoveryFlow(req.header(\'Cookie\'), req.query[\'flow\'])\\n\\nres.render(\'recovery\', flow)\\n})\\n```\\n\\nMore information can be found at [Ory Kratos Account Recovery Documentation](../self-service/flows/account-recovery.mdx).","operationId":"getSelfServiceRecoveryFlow","parameters":[{"description":"The Flow ID\\n\\nThe value for this parameter comes from `request` URL Query parameter sent to your\\napplication (e.g. `/recovery?flow=abcde`).","in":"query","name":"id","required":true,"schema":{"type":"string"}},{"description":"HTTP Cookies\\n\\nWhen using the SDK on the server side you must include the HTTP Cookie Header\\noriginally sent to your HTTP handler here.","in":"header","name":"cookie","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceRecoveryFlow"}}},"description":"selfServiceRecoveryFlow"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Get Recovery Flow","tags":["v0alpha2"]}},"/self-service/registration":{"post":{"description":"Use this endpoint to complete a registration flow by sending an identity\'s traits and password. This endpoint\\nbehaves differently for API and browser flows.\\n\\nAPI flows expect `application/json` to be sent in the body and respond with\\nHTTP 200 and a application/json body with the created identity success - if the session hook is configured the\\n`session` and `session_token` will also be included;\\nHTTP 302 redirect to a fresh registration flow if the original flow expired with the appropriate error messages set;\\nHTTP 400 on form validation errors.\\n\\nBrowser flows expect a Content-Type of `application/x-www-form-urlencoded` or `application/json` to be sent in the body and respond with\\na HTTP 302 redirect to the post/after registration URL or the `return_to` value if it was set and if the registration succeeded;\\na HTTP 302 redirect to the registration UI URL with the flow ID containing the validation errors otherwise.\\n\\nBrowser flows with an accept header of `application/json` will not redirect but instead respond with\\nHTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success;\\nHTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set;\\nHTTP 400 on form validation errors.\\n\\nIf this endpoint is called with `Accept: application/json` in the header, the response contains the flow without a redirect. In the\\ncase of an error, the `error.id` of the JSON response body can be one of:\\n\\n`session_already_available`: The user is already signed in.\\n`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.\\n`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!\\n`browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.\\nMost likely used in Social Sign In flows.\\n\\nMore information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).","operationId":"submitSelfServiceRegistrationFlow","parameters":[{"description":"The Registration Flow ID\\n\\nThe value for this parameter comes from `flow` URL Query parameter sent to your\\napplication (e.g. `/registration?flow=abcde`).","in":"query","name":"flow","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitSelfServiceRegistrationFlowBody"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/submitSelfServiceRegistrationFlowBody"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/successfulSelfServiceRegistrationWithoutBrowser"}}},"description":"successfulSelfServiceRegistrationWithoutBrowser"},"302":{"$ref":"#/components/responses/emptyResponse"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceRegistrationFlow"}}},"description":"selfServiceRegistrationFlow"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceBrowserLocationChangeRequiredError"}}},"description":"selfServiceBrowserLocationChangeRequiredError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Submit a Registration Flow","tags":["v0alpha2"]}},"/self-service/registration/api":{"get":{"description":"This endpoint initiates a registration flow for API clients such as mobile devices, smart TVs, and so on.\\n\\nIf a valid provided session cookie or session token is provided, a 400 Bad Request error\\nwill be returned unless the URL query parameter `?refresh=true` is set.\\n\\nTo fetch an existing registration flow call `/self-service/registration/flows?flow=<flow_id>`.\\n\\nYou MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server\\nPages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make\\nyou vulnerable to a variety of CSRF attacks.\\n\\nIn the case of an error, the `error.id` of the JSON response body can be one of:\\n\\n`session_already_available`: The user is already signed in.\\n`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.\\n\\nThis endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).\\n\\nMore information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).","operationId":"initializeSelfServiceRegistrationFlowWithoutBrowser","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceRegistrationFlow"}}},"description":"selfServiceRegistrationFlow"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Initialize Registration Flow for APIs, Services, Apps, ...","tags":["v0alpha2"]}},"/self-service/registration/browser":{"get":{"description":"This endpoint initializes a browser-based user registration flow. This endpoint will set the appropriate\\ncookies and anti-CSRF measures required for browser-based flows.\\n\\n:::info\\n\\nThis endpoint is EXPERIMENTAL and subject to potential breaking changes in the future.\\n\\n:::\\n\\nIf this endpoint is opened as a link in the browser, it will be redirected to\\n`selfservice.flows.registration.ui_url` with the flow ID set as the query parameter `?flow=`. If a valid user session\\nexists already, the browser will be redirected to `urls.default_redirect_url`.\\n\\nIf this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the\\ncase of an error, the `error.id` of the JSON response body can be one of:\\n\\n`session_already_available`: The user is already signed in.\\n`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.\\n`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!\\n\\nIf this endpoint is called via an AJAX request, the response contains the registration flow without a redirect.\\n\\nThis endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.\\n\\nMore information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).","operationId":"initializeSelfServiceRegistrationFlowForBrowsers","parameters":[{"description":"The URL to return the browser to after the flow was completed.","in":"query","name":"return_to","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceRegistrationFlow"}}},"description":"selfServiceRegistrationFlow"},"302":{"$ref":"#/components/responses/emptyResponse"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Initialize Registration Flow for Browsers","tags":["v0alpha2"]}},"/self-service/registration/flows":{"get":{"description":"This endpoint returns a registration flow\'s context with, for example, error details and other information.\\n\\nBrowser flows expect the anti-CSRF cookie to be included in the request\'s HTTP Cookie Header.\\nFor AJAX requests you must ensure that cookies are included in the request or requests will fail.\\n\\nIf you use the browser-flow for server-side apps, the services need to run on a common top-level-domain\\nand you need to forward the incoming HTTP Cookie header to this endpoint:\\n\\n```js\\npseudo-code example\\nrouter.get(\'/registration\', async function (req, res) {\\nconst flow = await client.getSelfServiceRegistrationFlow(req.header(\'cookie\'), req.query[\'flow\'])\\n\\nres.render(\'registration\', flow)\\n})\\n```\\n\\nThis request may fail due to several reasons. The `error.id` can be one of:\\n\\n`session_already_available`: The user is already signed in.\\n`self_service_flow_expired`: The flow is expired and you should request a new one.\\n\\nMore information can be found at [Ory Kratos User Login and User Registration Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-login-user-registration).","operationId":"getSelfServiceRegistrationFlow","parameters":[{"description":"The Registration Flow ID\\n\\nThe value for this parameter comes from `flow` URL Query parameter sent to your\\napplication (e.g. `/registration?flow=abcde`).","in":"query","name":"id","required":true,"schema":{"type":"string"}},{"description":"HTTP Cookies\\n\\nWhen using the SDK on the server side you must include the HTTP Cookie Header\\noriginally sent to your HTTP handler here.","in":"header","name":"cookie","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceRegistrationFlow"}}},"description":"selfServiceRegistrationFlow"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Get Registration Flow","tags":["v0alpha2"]}},"/self-service/settings":{"post":{"description":"Use this endpoint to complete a settings flow by sending an identity\'s updated password. This endpoint\\nbehaves differently for API and browser flows.\\n\\nAPI-initiated flows expect `application/json` to be sent in the body and respond with\\nHTTP 200 and an application/json body with the session token on success;\\nHTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set;\\nHTTP 400 on form validation errors.\\nHTTP 401 when the endpoint is called without a valid session token.\\nHTTP 403 when `selfservice.flows.settings.privileged_session_max_age` was reached or the session\'s AAL is too low.\\nImplies that the user needs to re-authenticate.\\n\\nBrowser flows without HTTP Header `Accept` or with `Accept: text/*` respond with\\na HTTP 302 redirect to the post/after settings URL or the `return_to` value if it was set and if the flow succeeded;\\na HTTP 302 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise.\\na HTTP 302 redirect to the login endpoint when `selfservice.flows.settings.privileged_session_max_age` was reached or the session\'s AAL is too low.\\n\\nBrowser flows with HTTP Header `Accept: application/json` respond with\\nHTTP 200 and a application/json body with the signed in identity and a `Set-Cookie` header on success;\\nHTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set;\\nHTTP 401 when the endpoint is called without a valid session cookie.\\nHTTP 403 when the page is accessed without a session cookie or the session\'s AAL is too low.\\nHTTP 400 on form validation errors.\\n\\nDepending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator\\nAssurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn\\ncredentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user\\nto sign in with the second factor (happens automatically for server-side browser flows) or change the configuration.\\n\\nIf this endpoint is called with a `Accept: application/json` HTTP header, the response contains the flow without a redirect. In the\\ncase of an error, the `error.id` of the JSON response body can be one of:\\n\\n`session_refresh_required`: The identity requested to change something that needs a privileged session. Redirect\\nthe identity to the login init endpoint with query parameters `?refresh=true&return_to=<the-current-browser-url>`,\\nor initiate a refresh login flow otherwise.\\n`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.\\n`session_inactive`: No Ory Session was found - sign in a user first.\\n`security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other\\nidentity logged in instead.\\n`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!\\n`browser_location_change_required`: Usually sent when an AJAX request indicates that the browser needs to open a specific URL.\\nMost likely used in Social Sign In flows.\\n\\nMore information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).","operationId":"submitSelfServiceSettingsFlow","parameters":[{"description":"The Settings Flow ID\\n\\nThe value for this parameter comes from `flow` URL Query parameter sent to your\\napplication (e.g. `/settings?flow=abcde`).","in":"query","name":"flow","required":true,"schema":{"type":"string"}},{"description":"The Session Token of the Identity performing the settings flow.","in":"header","name":"X-Session-Token","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitSelfServiceSettingsFlowBody"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/submitSelfServiceSettingsFlowBody"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceSettingsFlow"}}},"description":"selfServiceSettingsFlow"},"302":{"$ref":"#/components/responses/emptyResponse"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceSettingsFlow"}}},"description":"selfServiceSettingsFlow"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceBrowserLocationChangeRequiredError"}}},"description":"selfServiceBrowserLocationChangeRequiredError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"security":[{"sessionToken":[]}],"summary":"Complete Settings Flow","tags":["v0alpha2"]}},"/self-service/settings/api":{"get":{"description":"This endpoint initiates a settings flow for API clients such as mobile devices, smart TVs, and so on.\\nYou must provide a valid Ory Kratos Session Token for this endpoint to respond with HTTP 200 OK.\\n\\nTo fetch an existing settings flow call `/self-service/settings/flows?flow=<flow_id>`.\\n\\nYou MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server\\nPages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make\\nyou vulnerable to a variety of CSRF attacks.\\n\\nDepending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator\\nAssurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn\\ncredentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user\\nto sign in with the second factor or change the configuration.\\n\\nIn the case of an error, the `error.id` of the JSON response body can be one of:\\n\\n`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.\\n`session_inactive`: No Ory Session was found - sign in a user first.\\n\\nThis endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).\\n\\nMore information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).","operationId":"initializeSelfServiceSettingsFlowWithoutBrowser","parameters":[{"description":"The Session Token of the Identity performing the settings flow.","in":"header","name":"X-Session-Token","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceSettingsFlow"}}},"description":"selfServiceSettingsFlow"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Initialize Settings Flow for APIs, Services, Apps, ...","tags":["v0alpha2"]}},"/self-service/settings/browser":{"get":{"description":"This endpoint initializes a browser-based user settings flow. Once initialized, the browser will be redirected to\\n`selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid\\nOry Kratos Session Cookie is included in the request, a login flow will be initialized.\\n\\nIf this endpoint is opened as a link in the browser, it will be redirected to\\n`selfservice.flows.settings.ui_url` with the flow ID set as the query parameter `?flow=`. If no valid user session\\nwas set, the browser will be redirected to the login endpoint.\\n\\nIf this endpoint is called via an AJAX request, the response contains the settings flow without any redirects\\nor a 401 forbidden error if no valid session was set.\\n\\nDepending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator\\nAssurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn\\ncredentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user\\nto sign in with the second factor (happens automatically for server-side browser flows) or change the configuration.\\n\\nIf this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the\\ncase of an error, the `error.id` of the JSON response body can be one of:\\n\\n`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.\\n`session_inactive`: No Ory Session was found - sign in a user first.\\n`security_identity_mismatch`: The requested `?return_to` address is not allowed to be used. Adjust this in the configuration!\\n\\nThis endpoint is NOT INTENDED for clients that do not have a browser (Chrome, Firefox, ...) as cookies are needed.\\n\\nMore information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).","operationId":"initializeSelfServiceSettingsFlowForBrowsers","parameters":[{"description":"The URL to return the browser to after the flow was completed.","in":"query","name":"return_to","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceSettingsFlow"}}},"description":"selfServiceSettingsFlow"},"302":{"$ref":"#/components/responses/emptyResponse"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Initialize Settings Flow for Browsers","tags":["v0alpha2"]}},"/self-service/settings/flows":{"get":{"description":"When accessing this endpoint through Ory Kratos\' Public API you must ensure that either the Ory Kratos Session Cookie\\nor the Ory Kratos Session Token are set.\\n\\nDepending on your configuration this endpoint might return a 403 error if the session has a lower Authenticator\\nAssurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn\\ncredentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user\\nto sign in with the second factor or change the configuration.\\n\\nYou can access this endpoint without credentials when using Ory Kratos\' Admin API.\\n\\nIf this endpoint is called via an AJAX request, the response contains the flow without a redirect. In the\\ncase of an error, the `error.id` of the JSON response body can be one of:\\n\\n`security_csrf_violation`: Unable to fetch the flow because a CSRF violation occurred.\\n`session_inactive`: No Ory Session was found - sign in a user first.\\n`security_identity_mismatch`: The flow was interrupted with `session_refresh_required` but apparently some other\\nidentity logged in instead.\\n\\nMore information can be found at [Ory Kratos User Settings & Profile Management Documentation](../self-service/flows/user-settings).","operationId":"getSelfServiceSettingsFlow","parameters":[{"description":"ID is the Settings Flow ID\\n\\nThe value for this parameter comes from `flow` URL Query parameter sent to your\\napplication (e.g. `/settings?flow=abcde`).","in":"query","name":"id","required":true,"schema":{"type":"string"}},{"description":"The Session Token\\n\\nWhen using the SDK in an app without a browser, please include the\\nsession token here.","in":"header","name":"X-Session-Token","schema":{"type":"string"}},{"description":"HTTP Cookies\\n\\nWhen using the SDK on the server side you must include the HTTP Cookie Header\\noriginally sent to your HTTP handler here. You only need to do this for browser-\\nbased flows.","in":"header","name":"cookie","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceSettingsFlow"}}},"description":"selfServiceSettingsFlow"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Get Settings Flow","tags":["v0alpha2"]}},"/self-service/verification":{"post":{"description":"Use this endpoint to complete a verification flow. This endpoint\\nbehaves differently for API and browser flows and has several states:\\n\\n`choose_method` expects `flow` (in the URL query) and `email` (in the body) to be sent\\nand works with API- and Browser-initiated flows.\\nFor API clients and Browser clients with HTTP Header `Accept: application/json` it either returns a HTTP 200 OK when the form is valid and HTTP 400 OK when the form is invalid\\nand a HTTP 302 Found redirect with a fresh verification flow if the flow was otherwise invalid (e.g. expired).\\nFor Browser clients without HTTP Header `Accept` or with `Accept: text/*` it returns a HTTP 302 Found redirect to the Verification UI URL with the Verification Flow ID appended.\\n`sent_email` is the success state after `choose_method` when using the `link` method and allows the user to request another verification email. It\\nworks for both API and Browser-initiated flows and returns the same responses as the flow in `choose_method` state.\\n`passed_challenge` expects a `token` to be sent in the URL query and given the nature of the flow (\\"sending a verification link\\")\\ndoes not have any API capabilities. The server responds with a HTTP 302 Found redirect either to the Settings UI URL\\n(if the link was valid) and instructs the user to update their password, or a redirect to the Verification UI URL with\\na new Verification Flow ID which contains an error message that the verification link was invalid.\\n\\nMore information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).","operationId":"submitSelfServiceVerificationFlow","parameters":[{"description":"The Verification Flow ID\\n\\nThe value for this parameter comes from `flow` URL Query parameter sent to your\\napplication (e.g. `/verification?flow=abcde`).","in":"query","name":"flow","required":true,"schema":{"type":"string"}},{"description":"Verification Token\\n\\nThe verification token which completes the verification request. If the token\\nis invalid (e.g. expired) an error will be shown to the end-user.\\n\\nThis parameter is usually set in a link and not used by any direct API call.","in":"query","name":"token","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/submitSelfServiceVerificationFlowBody"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/submitSelfServiceVerificationFlowBody"}}},"x-originalParamName":"Body"},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceVerificationFlow"}}},"description":"selfServiceVerificationFlow"},"302":{"$ref":"#/components/responses/emptyResponse"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceVerificationFlow"}}},"description":"selfServiceVerificationFlow"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Complete Verification Flow","tags":["v0alpha2"]}},"/self-service/verification/api":{"get":{"description":"This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on.\\n\\nTo fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`.\\n\\nYou MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server\\nPages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make\\nyou vulnerable to a variety of CSRF attacks.\\n\\nThis endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...).\\n\\nMore information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).","operationId":"initializeSelfServiceVerificationFlowWithoutBrowser","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceVerificationFlow"}}},"description":"selfServiceVerificationFlow"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Initialize Verification Flow for APIs, Services, Apps, ...","tags":["v0alpha2"]}},"/self-service/verification/browser":{"get":{"description":"This endpoint initializes a browser-based account verification flow. Once initialized, the browser will be redirected to\\n`selfservice.flows.verification.ui_url` with the flow ID set as the query parameter `?flow=`.\\n\\nIf this endpoint is called via an AJAX request, the response contains the recovery flow without any redirects.\\n\\nThis endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...).\\n\\nMore information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).","operationId":"initializeSelfServiceVerificationFlowForBrowsers","parameters":[{"description":"The URL to return the browser to after the flow was completed.","in":"query","name":"return_to","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceVerificationFlow"}}},"description":"selfServiceVerificationFlow"},"302":{"$ref":"#/components/responses/emptyResponse"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Initialize Verification Flow for Browser Clients","tags":["v0alpha2"]}},"/self-service/verification/flows":{"get":{"description":"This endpoint returns a verification flow\'s context with, for example, error details and other information.\\n\\nBrowser flows expect the anti-CSRF cookie to be included in the request\'s HTTP Cookie Header.\\nFor AJAX requests you must ensure that cookies are included in the request or requests will fail.\\n\\nIf you use the browser-flow for server-side apps, the services need to run on a common top-level-domain\\nand you need to forward the incoming HTTP Cookie header to this endpoint:\\n\\n```js\\npseudo-code example\\nrouter.get(\'/recovery\', async function (req, res) {\\nconst flow = await client.getSelfServiceVerificationFlow(req.header(\'cookie\'), req.query[\'flow\'])\\n\\nres.render(\'verification\', flow)\\n})\\n\\nMore information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).","operationId":"getSelfServiceVerificationFlow","parameters":[{"description":"The Flow ID\\n\\nThe value for this parameter comes from `request` URL Query parameter sent to your\\napplication (e.g. `/verification?flow=abcde`).","in":"query","name":"id","required":true,"schema":{"type":"string"}},{"description":"HTTP Cookies\\n\\nWhen using the SDK on the server side you must include the HTTP Cookie Header\\noriginally sent to your HTTP handler here.","in":"header","name":"cookie","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/selfServiceVerificationFlow"}}},"description":"selfServiceVerificationFlow"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Get Verification Flow","tags":["v0alpha2"]}},"/sessions/whoami":{"get":{"description":"Uses the HTTP Headers in the GET request to determine (e.g. by using checking the cookies) who is authenticated.\\nReturns a session object in the body or 401 if the credentials are invalid or no credentials were sent.\\nAdditionally when the request it successful it adds the user ID to the \'X-Kratos-Authenticated-Identity-Id\' header in the response.\\n\\nIf you call this endpoint from a server-side application, you must forward the HTTP Cookie Header to this endpoint:\\n\\n```js\\npseudo-code example\\nrouter.get(\'/protected-endpoint\', async function (req, res) {\\nconst session = await client.toSession(undefined, req.header(\'cookie\'))\\n\\nconsole.log(session)\\n})\\n```\\n\\nWhen calling this endpoint from a non-browser application (e.g. mobile app) you must include the session token:\\n\\n```js\\npseudo-code example\\n...\\nconst session = await client.toSession(\\"the-session-token\\")\\n\\nconsole.log(session)\\n```\\n\\nDepending on your configuration this endpoint might return a 403 status code if the session has a lower Authenticator\\nAssurance Level (AAL) than is possible for the identity. This can happen if the identity has password + webauthn\\ncredentials (which would result in AAL2) but the session has only AAL1. If this error occurs, ask the user\\nto sign in with the second factor or change the configuration.\\n\\nThis endpoint is useful for:\\n\\nAJAX calls. Remember to send credentials and set up CORS correctly!\\nReverse proxies and API Gateways\\nServer-side calls - use the `X-Session-Token` header!\\n\\nThis endpoint authenticates users by checking\\n\\nif the `Cookie` HTTP header was set containing an Ory Kratos Session Cookie;\\nif the `Authorization: bearer <ory-session-token>` HTTP header was set with a valid Ory Kratos Session Token;\\nif the `X-Session-Token` HTTP header was set with a valid Ory Kratos Session Token.\\n\\nIf none of these headers are set or the cooke or token are invalid, the endpoint returns a HTTP 401 status code.\\n\\nAs explained above, this request may fail due to several reasons. The `error.id` can be one of:\\n\\n`session_inactive`: No active session was found in the request (e.g. no Ory Session Cookie / Ory Session Token).\\n`session_aal2_required`: An active session was found but it does not fulfil the Authenticator Assurance Level, implying that the session must (e.g.) authenticate the second factor.","operationId":"toSession","parameters":[{"description":"Set the Session Token when calling from non-browser clients. A session token has a format of `MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj`.","example":"MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj","in":"header","name":"X-Session-Token","schema":{"type":"string"}},{"description":"Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that\\nscenario you must include the HTTP Cookie Header which originally was included in the request to your server.\\nAn example of a session in the HTTP Cookie Header is: `ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==`.\\n\\nIt is ok if more than one cookie are included here as all other cookies will be ignored.","example":"ory_kratos_session=a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f==","in":"header","name":"Cookie","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/session"}}},"description":"session"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/jsonError"}}},"description":"jsonError"}},"summary":"Check Who the Current HTTP Session Belongs To","tags":["v0alpha2"]}},"/version":{"get":{"description":"This endpoint returns the version of Ory Kratos.\\n\\nIf the service supports TLS Edge Termination, this endpoint does not require the\\n`X-Forwarded-Proto` header to be set.\\n\\nBe aware that if you are running multiple nodes of this service, the version will never\\nrefer to the cluster state, only to a single instance.","operationId":"getVersion","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"version":{"description":"The version of Ory Kratos.","type":"string"}},"required":["version"],"type":"object"}}},"description":"Returns the Ory Kratos version."}},"summary":"Return Running Software Version.","tags":["metadata"]}}},"x-forwarded-proto":"string","x-request-id":"string"}'),c=["components"],d={id:"api",hide_title:!0,title:"HTTP API Documentation",description:"Ory Kratos HTTP API Documentation",sidebar_label:"HTTP API"},p=void 0,l={unversionedId:"reference/api",id:"reference/api",isDocsHomePage:!1,title:"HTTP API Documentation",description:"Ory Kratos HTTP API Documentation",source:"@site/docs/reference/api.mdx",sourceDirName:"reference",slug:"/reference/api",permalink:"/kratos/docs/next/reference/api",editUrl:"https://github.com/ory/kratos/edit/master/docs/docs/reference/api.mdx",tags:[],version:"current",lastUpdatedBy:"aeneasr",lastUpdatedAt:1625567312,formattedLastUpdatedAt:"7/6/2021",frontMatter:{id:"api",hide_title:!0,title:"HTTP API Documentation",description:"Ory Kratos HTTP API Documentation",sidebar_label:"HTTP API"},sidebar:"docs",previous:{title:"Distributed Tracing",permalink:"/kratos/docs/next/guides/tracing"},next:{title:"Configuration",permalink:"/kratos/docs/next/reference/configuration"}},h=[],u={toc:h};function m(e){var t=e.components,o=(0,s.Z)(e,c);return(0,i.kt)("wrapper",(0,n.Z)({},u,o,{components:t,mdxType:"MDXLayout"}),(0,i.kt)(r.Z,{spec:a,mdxType:"API"}))}m.isMDXComponent=!0},86010:function(e,t,o){"use strict";function n(e){var t,o,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(o=n(e[t]))&&(s&&(s+=" "),s+=o);else for(t in e)e[t]&&(s&&(s+=" "),s+=t);return s}function s(){for(var e,t,o=0,s="";o<arguments.length;)(e=arguments[o++])&&(t=n(e))&&(s&&(s+=" "),s+=t);return s}o.d(t,{Z:function(){return s}})},15101:function(){},23197:function(){},52361:function(){},94616:function(){},49702:function(){}}]);