v0alpha1

Complete Settings Flow

Use this endpoint to complete a settings flow by sending an identity's updated password. This endpoint behaves differently for API and browser flows.

API-initiated flows expect application/json to be sent in the body and respond with HTTP 200 and an application/json body with the session token on success; HTTP 302 redirect to a fresh settings flow if the original flow expired with the appropriate error messages set; HTTP 400 on form validation errors. HTTP 401 when the endpoint is called without a valid session token. HTTP 403 when selfservice.flows.settings.privileged_session_max_age was reached. Implies that the user needs to re-authenticate.

Browser flows without HTTP Header Accept or with Accept: text/* respond with a HTTP 302 redirect to the post/after settings URL or the return_to value if it was set and if the flow succeeded; a HTTP 302 redirect to the Settings UI URL with the flow ID containing the validation errors otherwise. a HTTP 302 redirect to the login endpoint when selfservice.flows.settings.privileged_session_max_age was reached.

Browser flows with HTTP Header Accept: application/json respond with HTTP 200 and a application/json body with the signed in identity and a Set-Cookie header on success; HTTP 302 redirect to a fresh login flow if the original flow expired with the appropriate error messages set; HTTP 403 when the page is accessed without a session cookie. HTTP 400 on form validation errors.

More information can be found at Ory Kratos User Settings & Profile Management Documentation.

post/self-service/settings

Query parameters

flowstring required

The Settings Flow ID

The value for this parameter comes from flow URL Query parameter sent to your application (e.g. /settings?flow=abcde).

Headers

X-Session-Tokenstring

The Session Token of the Identity performing the settings flow.

Request body

OR

Response

successfulSelfServiceSettingsWithoutBrowser

Example response

{
  "identity": {
    "recovery_addresses": [
      {
        "updated_at": "2000-01-23T04:56:07.000+00:00",
        "created_at": "2000-01-23T04:56:07.000+00:00",
        "id": "id",
        "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": "id",
        "value": "value",
        "via": "via"
      }
    ],
    "traits": "",
    "updated_at": "2000-01-23T04:56:07.000+00:00",
    "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": "type",
        "config": "{}"
      }
    },
    "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": "id",
        "value": "value",
        "status": "status",
        "via": "via"
      },
      {
        "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": "id",
        "value": "value",
        "status": "status",
        "via": "via"
      }
    ],
    "schema_id": "schema_id",
    "state_changed_at": "2000-01-23T04:56:07.000+00:00",
    "created_at": "2000-01-23T04:56:07.000+00:00",
    "schema_url": "schema_url",
    "id": "id"
  },
  "flow": {
    "expires_at": "2000-01-23T04:56:07.000+00:00",
    "ui": {
      "nodes": [
        {
          "meta": {
            "label": {
              "context": "{}",
              "id": 0,
              "text": "text",
              "type": "type"
            }
          },
          "messages": [
            {
              "context": "{}",
              "id": 0,
              "text": "text",
              "type": "type"
            },
            {
              "context": "{}",
              "id": 0,
              "text": "text",
              "type": "type"
            }
          ],
          "type": "type",
          "group": "group"
        },
        {
          "meta": {
            "label": {
              "context": "{}",
              "id": 0,
              "text": "text",
              "type": "type"
            }
          },
          "messages": [
            {
              "context": "{}",
              "id": 0,
              "text": "text",
              "type": "type"
            },
            {
              "context": "{}",
              "id": 0,
              "text": "text",
              "type": "type"
            }
          ],
          "type": "type",
          "group": "group"
        }
      ],
      "method": "method",
      "action": "action",
      "messages": [
        {
          "context": "{}",
          "id": 0,
          "text": "text",
          "type": "type"
        },
        {
          "context": "{}",
          "id": 0,
          "text": "text",
          "type": "type"
        }
      ]
    },
    "identity": {
      "recovery_addresses": [
        {
          "updated_at": "2000-01-23T04:56:07.000+00:00",
          "created_at": "2000-01-23T04:56:07.000+00:00",
          "id": "id",
          "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": "id",
          "value": "value",
          "via": "via"
        }
      ],
      "traits": "",
      "updated_at": "2000-01-23T04:56:07.000+00:00",
      "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": "type",
          "config": "{}"
        }
      },
      "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": "id",
          "value": "value",
          "status": "status",
          "via": "via"
        },
        {
          "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": "id",
          "value": "value",
          "status": "status",
          "via": "via"
        }
      ],
      "schema_id": "schema_id",
      "state_changed_at": "2000-01-23T04:56:07.000+00:00",
      "created_at": "2000-01-23T04:56:07.000+00:00",
      "schema_url": "schema_url",
      "id": "id"
    },
    "active": "active",
    "id": "id",
    "type": "type",
    "issued_at": "2000-01-23T04:56:07.000+00:00",
    "request_url": "request_url"
  }
}

Changes