Skip to main content

Update a Password Profile

PUT Update a Password Profile

https://useast.api.elasticpath.com/v2/authentication-realms/:realm-id/password-profiles/:profile-id

Parameters

Path parameters

NameRequiredTypeDescription
realm-idRequiredstringThe ID for the authentication-realm containing the password profile.
profile-idRequiredstringThe ID for the requested password profile.

Headers

NameRequiredTypeDescription
AuthorizationRequiredstringThe Bearer token required to get access to the API.

Body

NameRequiredTypeDescription
typeRequiredstringRepresents the type of object being returned. You must use password_profile.
username_formatRequiredstringThe passport profile format. The options are any or email.
nameRequiredstringThe name of the passport profile.
enable_one_time_password_tokenOptionalbooleanSet to true to enable one time password token requests and events.

Request Examples

Curl

curl -X PUT https://useast.api.elasticpath.com/v2/authentication-realms/:realm-id/password-profiles/:profile-id \
-H "Authorization: Bearer XXXX" \
-H "Content-Type: application/json" \
-d $'{
"data": {
"type": "password_profile",
"username_format": "any",
"name": "password profile",
"enable_one_time_password_token" : true
}
}'

JavaScript SDK

const MoltinGateway = require('@moltin/sdk').gateway
const Moltin = MoltinGateway({
client_id: 'X'
})
const realmId = 'XXXX'
const profileId = 'XXXX'
Moltin.PasswordProfile.Update({
realmId,
profileId,
body
}
)

Response Example

200 OK

{
"data": {
"meta": {
"created_at": "2021-06-03T21:12:14.896Z",
"updated_at": "2021-06-03T21:19:30.169Z"
},
"type": "password_profile",
"id": "0a6f5f8a-3a61-4ad1-9ea1-60fd1aa71243",
"username_format": "any",
"name": "password profile",
"enable_one_time_password_token" : true
},
"links": {
"self": "http://useast.api.elasticpath.com/v2/authentication-realms/c624ab3d-44f0-49cc-bff7-446ff39a24f0/password-profiles/0a6f5f8a-3a61-4ad1-9ea1-60fd1aa71243"
}
}