Update a User Credential
PUT {{apiPath}}/environments/{{envID}}/users/{{userID}}/credentials/{{credentialID}}
Use the PUT {{apiPath}}/environments/{{envID}}/users/{{userID}}/credentials/{{credentialID}}
request to add or modify a field value in the specified user credential.
Prerequisites
Create a user to get a
userID
for the endpoint. See also Users, especially User operations.Create a user credential to get a
credentialID
for the endpoint. See also PingOne Credentials, especially User Credentials.
See User Credentials data model for full property descriptions.
Property | Type | Required |
---|---|---|
credentialType.id | String | Required |
data | Object | Optional |
data.<field> | String | Required/Optional |
notification | Object | Optional |
notification.template | Object | Optional |
notification.template.locale | String | Required |
notification.template.variant | String | Required |
notification.template.variables | Object[] | Required/Optional |
All data must be provided in the data
object. Anything not included will default to null and any missing required fields cause an error.
After receipt of this request, if the optional notification
object is present, the credential service uses the credential_updated
notification template to send notice of the update to the user via email or SMS text. The notification.template
object can define a variant and locale for the notifications, if needed.
Request Body
{"expiresAt"=>"2024-01-01T00:00:00.000Z"}
RESPONSES
status: OK
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/39b4548e-e71e-4a8b-9a3d-d668a8f8e0ba/credentials/5d5751ae-e21b-4226-b1e8-1bf02127a093"}},"id":"5d5751ae-e21b-4226-b1e8-1bf02127a093","createdAt":"2023-03-15T13:01:50.207Z","updatedAt":"2023-03-15T13:15:44.717Z","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"user":{"id":"39b4548e-e71e-4a8b-9a3d-d668a8f8e0ba"},"credentialType":{"id":"6d20e9c2-9102-42d1-a1fc-74eed31d65d8"},"title":"Wallet Developers","status":"REVOKED","expiresAt":"2024-01-01T00:00:00Z"}