---
title: "Change Recovery Question"
method: POST
path: "/api/v1/users/{userId}/credentials/change_recovery_question"
tags: ["User"]
---

# Change Recovery Question

`POST /api/v1/users/{userId}/credentials/change_recovery_question`

## Request

- Base URL: `https://your-subdomain.okta.com`
- URL: `https://your-subdomain.okta.com/api/v1/users/{userId}/credentials/change_recovery_question`
- Auth: API key in header `Authorization`

Changes a user's recovery question & answer credential by validating the user's current password.  This operation can only be performed on users in **STAGED**, **ACTIVE** or **RECOVERY** `status` that have a valid password credential

## Path parameters

- `userId` string, required

## Request body

- UserCredentials
  - `password` PasswordCredential
    - `hash` PasswordCredentialHash
      - `algorithm` 'BCRYPT' | 'SHA-512' | 'SHA-256' | 'SHA-1' | 'MD5'
      - `salt` string
      - `saltOrder` string
      - `value` string
      - `workFactor` integer
    - `hook` PasswordCredentialHook
      - `type` string
    - `value` string, password
  - `provider` AuthenticationProvider
    - `name` string
    - `type` 'ACTIVE_DIRECTORY' | 'FEDERATION' | 'LDAP' | 'OKTA' | 'SOCIAL' | 'IMPORT'
  - `recovery_question` RecoveryQuestionCredential
    - `answer` string
    - `question` string

## Response `200`

Success

- UserCredentials
  - `password` PasswordCredential
    - `hash` PasswordCredentialHash
      - `algorithm` 'BCRYPT' | 'SHA-512' | 'SHA-256' | 'SHA-1' | 'MD5'
      - `salt` string
      - `saltOrder` string
      - `value` string
      - `workFactor` integer
    - `hook` PasswordCredentialHook
      - `type` string
    - `value` string, password
  - `provider` AuthenticationProvider
    - `name` string
    - `type` 'ACTIVE_DIRECTORY' | 'FEDERATION' | 'LDAP' | 'OKTA' | 'SOCIAL' | 'IMPORT'
  - `recovery_question` RecoveryQuestionCredential
    - `answer` string
    - `question` string

---

[API](https://skmtc.dev/okta/apis/okta-api.md) - [All operations](https://skmtc.dev/okta/apis/okta-api/llms.txt) - [OpenAPI document](https://skmtc.dev/okta/apis/okta-api/revisions/7e5249c30571?raw)
