Create a User Credential
POST {{apiPath}}/environments/{{envID}}/users/{{userID}}/credentials
The POST {{apiPath}}/environments/{{envID}}/users/{{userID}}/credentials
request creates a user credential and registers the new user credential with the Id Registration service.
Prerequisites
Create a user to get a userID
for the endpoint. See also Users, especially User operations.
See User Credentials data model for full property descriptions.
Property | Type | Required |
---|---|---|
credentialType.id | String | Required |
data | Object | Optional |
data.<field> | String | Required/Optional |
expiresAt | DateTime | Optional |
notification | Object | Optional |
notification.template | Object | Optional |
notification.template.locale | String | Required |
notification.template.variant | String | Required |
notification.template.variables | Object[] | Required/Optional |
After receipt of this request, if the optional notification
object is present, the credential service uses the credential_issued
notification template to send notice of the issuance 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
{"credentialType"=>{"id"=>"{{credentialTypeID}}"}, "data"=>{"Medical Limitations"=>"Corrective lenses needed"}}
RESPONSES
status: Created
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/ad7b009a-6d88-4830-b3a6-99906049e372/credentials/cde2078f-04e0-46c4-ae2e-f2be01695fe2"}},"id":"cde2078f-04e0-46c4-ae2e-f2be01695fe2","createdAt":"2024-03-29T13:56:34.966871745Z","updatedAt":"2024-03-29T13:56:34.966872235Z","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"user":{"id":"ad7b009a-6d88-4830-b3a6-99906049e372"},"credentialType":{"id":"edc25883-a7f8-44e3-83eb-3c15a7b58de4"},"title":"Card Developers","status":"PENDING"}