Account recovery v0.9 API
Base URL: https://localhost:9443/t/carbon.super/api/identity/recovery/v0.9
The Recovery API (version 0.9.0).
Download the OpenAPI definition (YAML)
Security schemes
BasicAuth: HTTP basic
OAuth2: oauth2
authorizationCode flow, token URL https://localhost:9443/oauth/token, authorization URL https://localhost:9443/oauth/authorize
3 scopes
| Scope | Description |
|---|---|
read | Grants read access |
write | Grants write access |
admin | Grants read and write access to administrative information |
Password Recovery
Send recovery notification
POST /recover-password
This API is used to send password recovery confirmation over defined channels like email/SMS.
Scope(Permission) required: internal_recovery_create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
type | query | string | Notification Type | |
notify | query | boolean | If notify=true, notifications will be internally managed. |
Request body (required): application/json
Optional property parameters can be sent via email based on the email template.
Schema: RecoveryInitiatingRequest
Responses
| Code | Description | Schema |
|---|---|---|
202 | Successful response | string |
400 | Bad Request | Error |
500 | Server Error | Error |
Update password
POST /set-password
This API is used to reset the user password using the confirmation key received through the recovery process. You need to input the key and the new password.
Scope(Permission) required: internal_recovery_create
Request body (required): application/json
Key, password, and optional metadata properties.
Schema: ResetPasswordRequest
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
key | string | ||
password | string | ||
properties | array of Property |
Responses
| Code | Description | Schema |
|---|---|---|
202 | Successful response | |
400 | Bad Request | Error |
412 | Precondition Failed | RetryError |
500 | Server Error | Error |
Validate confirmation code
POST /validate-code
This API is used to validate confirmation codes sent in account recovery scenarios and self-signup. You need to input the confirmation code and recovery step as parameters.
Scope(Permission) required: internal_recovery_create
Request body (required): application/json
Code, recovery step, and optional parameters.
For recovery step, you can use one of the following according to the recovery scenario that you want to validate the code. UPDATE_PASSWORD CONFIRM_SIGN_UP VALIDATE_CHALLENGE_QUESTION VALIDATE_ALL_CHALLENGE_QUESTION
Schema: CodeValidationRequest
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | ||
step | string | ||
properties | array of Property |
Responses
| Code | Description | Schema |
|---|---|---|
202 | Accepted | |
400 | Bad Request | Error |
500 | Server Error | Error |
Get challenge question of user
GET /security-question
This API is used to initiate password recovery using user challenge questions. The response will be a random challenge question with a confirmation key.
Scope(Permission) required: internal_recovery_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
username | query | string | Yes | username of the user |
realm | query | string |
| |
tenant-domain | query | string |
|
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successful response | InitiateQuestionResponse |
204 | No content | |
400 | Bad Request | Error |
500 | Server Error | Error |
Get challenge questions of user
GET /security-questions
This API is used to initiate password recovery using user challenge questions at once. The response will be a random challenge question with a confirmation key.
Scope(Permission) required: internal_recovery_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
username | query | string | Yes | username of the user |
realm | query | string |
| |
tenant-domain | query | string |
|
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successful response | InitiateAllQuestionResponse |
204 | No content | |
400 | Bad Request | Error |
500 | Server Error | Error |
Validate user challenge answer/answers
POST /validate-answer
This is used to validate the user challenge answer. If the user challenge answer is valid, it sends another challenge question to answer until the status becomes COMPLETE. If the answer is wrong, the user can retry the answer.
Scope(Permission) required: internal_recovery_create
Request body (required): application/json
User answers verification with the key returned in the previous step.
Schema: AnswerVerificationRequest
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
key | string | ||
answers | array of SecurityAnswer | ||
properties | array of Property |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successful response | InitiateQuestionResponse |
400 | Bad Request | RetryError |
500 | Server Error | Error |
Get CAPTCHA
GET /captcha
Return the reCaptcha information if it's supported for the given tenant.
Scope(Permission) required: internal_recovery_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant-domain | query | string | tenant domain. Default | |
captcha-type | query | string | Yes | type of captcha |
recovery-type | query | string | Yes | username recovery or password recovery |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successful response | ReCaptchaProperties |
400 | Bad Request | Error |
500 | Server Error | Error |
Verify CAPTCHA
POST /captcha
Return true or false after verifying the captcha response.
Scope(Permission) required: internal_recovery_create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant-domain | query | string | Tenant domain. Default | |
captcha-type | query | string | Yes | Type of captcha |
Request body (required): application/json
Recaptcha response from Google.
Schema: ReCaptchaResponseToken
1 property
| Name | Type | Required | Description |
|---|---|---|---|
token | string |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successful response | ReCaptchaVerificationResponse |
400 | Bad Request | Error |
500 | Server Error | Error |
Username Recovery
Recover username
POST /recover-username
This API can be used to recover a forgotten username.
Scope(Permission) required: internal_recovery_create
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant-domain | query | string | Tenant Domain that the user belongs to. Default | |
notify | query | boolean | If notify=true, notifications will be internally managed. |
Request body (required): application/json
User answers for recovery claims.
Schema: array of UserClaim
Responses
| Code | Description | Schema |
|---|---|---|
202 | Successful response | |
204 | No valid user found for given data. | |
400 | Bad Request | Error |
500 | Server Error | Error |
Get supported claims
GET /claims
Return the recovery-supported claims in the given tenant.
Scope(Permission) required: internal_recovery_view
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
tenant-domain | query | string | tenant domain. Default |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Successful response | array of Claim |
400 | Bad Request | Error |
500 | Server Error | Error |
Schemas
ResetPasswordRequest
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
key | string | ||
password | string | ||
properties | array of Property |
AnswerVerificationRequest
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
key | string | ||
answers | array of SecurityAnswer | ||
properties | array of Property |
RetryError
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | ||
message | string | ||
description | string | ||
key | string |
RecoveryInitiatingRequest
Type: object
InitiateAllQuestionResponse
Type: object
InitiateQuestionResponse
Type: object
Claim
Type: object
8 properties
| Name | Type | Required | Description |
|---|---|---|---|
uri | string | ||
value | string | ||
description | string | ||
display-name | string | ||
dialect | string | ||
validation-regex | string | ||
required | boolean | ||
read-only | boolean |
CodeValidationRequest
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | ||
step | string | ||
properties | array of Property |
ReCaptchaProperties
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
reCaptchaEnabled | boolean | ||
reCaptchaKey | string | ||
reCaptchaAPI | string |
Was this page helpful?