Skip to main content
You're reading Identity & Access Management 7.1.0. The newest release is 7.3.0, and Cloud has the newest features. Go to the newest release

Account recovery v0.9 API

Download OpenAPI (YAML)Version 0.9.0

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
ScopeDescription
readGrants read access
writeGrants write access
adminGrants 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

NameInTypeRequiredDescription
typequerystring

Notification Type

notifyqueryboolean

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

2 properties
NameTypeRequiredDescription
userUser
propertiesarray of Property

Responses

CodeDescriptionSchema
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
NameTypeRequiredDescription
keystring
passwordstring
propertiesarray of Property

Responses

CodeDescriptionSchema
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
NameTypeRequiredDescription
codestring
stepstring
propertiesarray of Property

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
usernamequerystringYes

username of the user

realmquerystring

User Store Domain that the user belongs to. If not specified, it will be PRIMARY domain.

tenant-domainquerystring

Tenant Domain that the user belongs to. If not specified, it will be carbon.super domain.

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
usernamequerystringYes

username of the user

realmquerystring

User Store Domain that the user belongs to. If not specified, it will be PRIMARY domain.

tenant-domainquerystring

Tenant Domain that the user belongs to. If not specified, it will be carbon.super domain.

Responses

CodeDescriptionSchema
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
NameTypeRequiredDescription
keystring
answersarray of SecurityAnswer
propertiesarray of Property

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
tenant-domainquerystring

tenant domain. Default carbon.super

captcha-typequerystringYes

type of captcha

recovery-typequerystringYes

username recovery or password recovery

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
tenant-domainquerystring

Tenant domain. Default carbon.super

captcha-typequerystringYes

Type of captcha

Request body (required): application/json

Recaptcha response from Google.

Schema: ReCaptchaResponseToken

1 property
NameTypeRequiredDescription
tokenstring

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
tenant-domainquerystring

Tenant Domain that the user belongs to. Default carbon.super

notifyqueryboolean

If notify=true, notifications will be internally managed.

Request body (required): application/json

User answers for recovery claims.

Schema: array of UserClaim

Responses

CodeDescriptionSchema
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

NameInTypeRequiredDescription
tenant-domainquerystring

tenant domain. Default carbon.super

Responses

CodeDescriptionSchema
200

Successful response

array of Claim
400

Bad Request

Error
500

Server Error

Error

Schemas​

User​

Type: object

2 properties
NameTypeRequiredDescription
usernamestring
realmstring

ResetPasswordRequest​

Type: object

3 properties
NameTypeRequiredDescription
keystring
passwordstring
propertiesarray of Property

Error​

Type: object

3 properties
NameTypeRequiredDescription
codestring
messagestring
descriptionstring

Question​

Type: object

2 properties
NameTypeRequiredDescription
questionstring
question-set-idstring

AnswerVerificationRequest​

Type: object

3 properties
NameTypeRequiredDescription
keystring
answersarray of SecurityAnswer
propertiesarray of Property

RetryError​

Type: object

4 properties
NameTypeRequiredDescription
codestring
messagestring
descriptionstring
keystring

Property​

Type: object

2 properties
NameTypeRequiredDescription
keystring
valuestring

RecoveryInitiatingRequest​

Type: object

2 properties
NameTypeRequiredDescription
userUser
propertiesarray of Property

InitiateAllQuestionResponse​

Type: object

3 properties
NameTypeRequiredDescription
keystring
questionsarray of Question
linkLink

InitiateQuestionResponse​

Type: object

3 properties
NameTypeRequiredDescription
keystring
questionQuestion
linkLink

SecurityAnswer​

Type: object

2 properties
NameTypeRequiredDescription
question-set-idstring
answerstring

Claim​

Type: object

8 properties
NameTypeRequiredDescription
uristring
valuestring
descriptionstring
display-namestring
dialectstring
validation-regexstring
requiredboolean
read-onlyboolean

Type: object

2 properties
NameTypeRequiredDescription
relstring
uristring

UserClaim​

Type: object

2 properties
NameTypeRequiredDescription
uristring
valuestring

CodeValidationRequest​

Type: object

3 properties
NameTypeRequiredDescription
codestring
stepstring
propertiesarray of Property

ReCaptchaResponseToken​

Type: object

1 property
NameTypeRequiredDescription
tokenstring

ReCaptchaVerificationResponse​

Type: object

1 property
NameTypeRequiredDescription
successboolean

ReCaptchaProperties​

Type: object

3 properties
NameTypeRequiredDescription
reCaptchaEnabledboolean
reCaptchaKeystring
reCaptchaAPIstring

Was this page helpful?