Update Registration Flow
Changed onUse this endpoint to complete a registration flow by sending an identity's traits and password. This endpoint behaves differently for API and browser flows.
API flows expect application/json to be sent in the body and respond with HTTP 200 and a application/json body with the created identity success - if the session hook is configured the session and session_token will also be included; HTTP 410 if the original flow expired with the appropriate error messages set and optionally a use_flow_id parameter in the body; HTTP 400 on form validation errors.
Browser flows expect a Content-Type of application/x-www-form-urlencoded or application/json to be sent in the body and respond with a HTTP 303 redirect to the post/after registration URL or the return_to value if it was set and if the registration succeeded; a HTTP 303 redirect to the registration UI URL with the flow ID containing the validation errors otherwise.
Browser flows with an accept header of application/json will not redirect but instead respond with HTTP 200 and a application/json body with the signed in identity and a Set-Cookie header on success; HTTP 303 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors.
If this endpoint is called with Accept: application/json in the header, the response contains the flow without a redirect. In the case of an error, the error.id of the JSON response body can be one of:
session_already_available: The user is already signed in. security_csrf_violation: Unable to fetch the flow because a CSRF violation occurred. security_identity_mismatch: The requested ?return_to address is not allowed to be used. Adjust this in the configuration! browser_location_change_required: Usually sent when an AJAX request indicates that the browser needs to open a specific URL. Most likely used in Social Sign In flows.
More information can be found at Ory Kratos User Login and User Registration Documentation.
Request
- Base URL/ (relative, and the document was published on a file host, not at the API’s origin)
- URL/self-service/registration
- Authnone declared
Query parameters
The Registration Flow ID
The value for this parameter comes from flow URL Query parameter sent to your application (e.g. /registration?flow=abcde).
Headers
HTTP Cookies
When using the SDK in a browser app, on the server side you must include the HTTP Cookie Header sent by the client to your server here. This ensures that CSRF and session cookies are respected.
Request body
Response
successfulNativeRegistration
Example response
{
"session_token": "session_token",
"identity": {
"traits": "",
"credentials": {
"key": {
"updated_at": "2000-01-23T04:56:07.000+00:00",
"identifiers": [
"identifiers",
"identifiers"
],
"created_at": "2000-01-23T04:56:07.000+00:00",
"type": "password",
"config": "{}",
"version": 0
}
},
"state_changed_at": "2000-01-23T04:56:07.000+00:00",
"created_at": "2000-01-23T04:56:07.000+00:00",
"external_id": "external_id",
"recovery_addresses": [
{
"updated_at": "2000-01-23T04:56:07.000+00:00",
"created_at": "2000-01-23T04:56:07.000+00:00",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"value": "value",
"via": "via"
},
{
"updated_at": "2000-01-23T04:56:07.000+00:00",
"created_at": "2000-01-23T04:56:07.000+00:00",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"value": "value",
"via": "via"
}
],
"metadata_admin": "",
"updated_at": "2000-01-23T04:56:07.000+00:00",
"verifiable_addresses": [
{
"updated_at": "2014-01-01T23:28:56.782Z",
"verified_at": "2000-01-23T04:56:07.000+00:00",
"verified": true,
"created_at": "2014-01-01T23:28:56.782Z",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"value": "value",
"status": "status",
"via": "email"
},
{
"updated_at": "2014-01-01T23:28:56.782Z",
"verified_at": "2000-01-23T04:56:07.000+00:00",
"verified": true,
"created_at": "2014-01-01T23:28:56.782Z",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"value": "value",
"status": "status",
"via": "email"
}
],
"organization_id": "organization_id",
"schema_id": "schema_id",
"schema_url": "schema_url",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"state": "active",
"metadata_public": ""
},
"session": {
"tokenized": "tokenized",
"expires_at": "2000-01-23T04:56:07.000+00:00",
"devices": [
{
"location": "location",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"ip_address": "ip_address",
"user_agent": "user_agent"
},
{
"location": "location",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"ip_address": "ip_address",
"user_agent": "user_agent"
}
],
"authentication_methods": [
{
"completed_at": "2000-01-23T04:56:07.000+00:00",
"method": "password",
"provider": "provider",
"organization": "organization",
"aal": "aal0"
},
{
"completed_at": "2000-01-23T04:56:07.000+00:00",
"method": "password",
"provider": "provider",
"organization": "organization",
"aal": "aal0"
}
],
"authenticator_assurance_level": null,
"identity": {
"traits": "",
"credentials": {
"key": {
"updated_at": "2000-01-23T04:56:07.000+00:00",
"identifiers": [
"identifiers",
"identifiers"
],
"created_at": "2000-01-23T04:56:07.000+00:00",
"type": "password",
"config": "{}",
"version": 0
}
},
"state_changed_at": "2000-01-23T04:56:07.000+00:00",
"created_at": "2000-01-23T04:56:07.000+00:00",
"external_id": "external_id",
"recovery_addresses": [
{
"updated_at": "2000-01-23T04:56:07.000+00:00",
"created_at": "2000-01-23T04:56:07.000+00:00",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"value": "value",
"via": "via"
},
{
"updated_at": "2000-01-23T04:56:07.000+00:00",
"created_at": "2000-01-23T04:56:07.000+00:00",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"value": "value",
"via": "via"
}
],
"metadata_admin": "",
"updated_at": "2000-01-23T04:56:07.000+00:00",
"verifiable_addresses": [
{
"updated_at": "2014-01-01T23:28:56.782Z",
"verified_at": "2000-01-23T04:56:07.000+00:00",
"verified": true,
"created_at": "2014-01-01T23:28:56.782Z",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"value": "value",
"status": "status",
"via": "email"
},
{
"updated_at": "2014-01-01T23:28:56.782Z",
"verified_at": "2000-01-23T04:56:07.000+00:00",
"verified": true,
"created_at": "2014-01-01T23:28:56.782Z",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"value": "value",
"status": "status",
"via": "email"
}
],
"organization_id": "organization_id",
"schema_id": "schema_id",
"schema_url": "schema_url",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"state": "active",
"metadata_public": ""
},
"authenticated_at": "2000-01-23T04:56:07.000+00:00",
"active": true,
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"issued_at": "2000-01-23T04:56:07.000+00:00"
},
"continue_with": [
{
"action": "show_verification_ui",
"flow": {
"verifiable_address": "verifiable_address",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"url": "url"
}
},
{
"action": "show_verification_ui",
"flow": {
"verifiable_address": "verifiable_address",
"id": "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"url": "url"
}
}
]
}Changes
- breaking
the response property
///became optional for the status - breaking
the response property
////became optional for the status - breaking
added to the
///response propertyoneOflist for the response status - warning
added the new
divenum value to the///response property for the response status - warning
added the new
passkeyenum value to the///response property for the response status - warning
added the new
profileenum value to the///response property for the response status - warning
added the new
samlenum value to the///response property for the response status - warning
added the new
username webauthnenum value to the////////response property for the response status - info
added
samlmapping keys to the request discriminator (media type: application/json) - info
added
samlmapping keys to the request discriminator (media type: application/x-www-form-urlencoded) - info
added to the request body
oneOflist (media type: application/json) - info
added to the request body
oneOflist (media type: application/x-www-form-urlencoded) - info
added the optional property
/to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
//to the response with the status - info
added
divdiscriminator mapping keys to the///response property for the response status - info
removed the
aenum value from the////////response property for the response status - info
removed the
aenum value from the/////response property for the response status - info
removed the
aenum value from the/////response property for the response status - info
removed the
aenum value from the/////response property for the response status - info
removed the
imgenum value from the////////response property for the response status - info
removed the
imgenum value from the/////response property for the response status - info
removed the
imgenum value from the/////response property for the response status - info
removed the
imgenum value from the/////response property for the response status - info
removed the
inputenum value from the/////response property for the response status - info
removed the
inputenum value from the/////response property for the response status - info
removed the
inputenum value from the/////response property for the response status - info
removed the
inputenum value from the/////response property for the response status - info
removed the
scriptenum value from the////////response property for the response status - info
removed the
scriptenum value from the/////response property for the response status - info
removed the
scriptenum value from the/////response property for the response status - info
removed the
scriptenum value from the/////response property for the response status - info
removed the
textenum value from the////////response property for the response status - info
removed the
textenum value from the/////response property for the response status - info
removed the
textenum value from the/////response property for the response status - info
removed the
textenum value from the/////response property for the response status - info
removed the
v0.6_legacy_sessionenum value from the///response property for the response status
- breaking
- breaking
added to the
/response propertyoneOflist for the response status - breaking
the
/response's property type changed from no type toobjectfor status - warning
added the new
captchaenum value to the///response property for the response status - warning
added the new
identifier_firstenum value to the///response property for the response status - warning
added the new
samlenum value to theresponse property for the response status - warning
added the new
samlenum value to the///response property for the response status - warning
added the new
samlenum value to the////response property for the response status - warning
added the new
samlenum value to the///response property for the response status - info
added
passkeyprofilemapping keys to the request discriminator (media type: application/json) - info
added
passkeyprofilemapping keys to the request discriminator (media type: application/x-www-form-urlencoded) - info
removed
passKeymapping keys from the request discriminator (media type: application/json) - info
removed
passKeymapping keys from the request discriminator (media type: application/x-www-form-urlencoded) - info
added to the request body
oneOflist (media type: application/json) - info
added to the request body
oneOflist (media type: application/x-www-form-urlencoded) - info
added the optional property
///////to the response with the status - info
added the optional property
////////to the response with the status - info
added the optional property
////////to the response with the status - info
added the optional property
////////to the response with the status - info
added
redirect_browser_todiscriminator mapping keys to the/response property for the response status
- breaking