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.

PropertyTypeRequired
credentialType.idStringRequired
dataObjectOptional
data.<field>StringRequired/Optional
expiresAtDateTimeOptional
notificationObjectOptional
notification.templateObjectOptional
notification.template.localeStringRequired
notification.template.variantStringRequired
notification.template.variablesObject[]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

{&quot;_links&quot;:{&quot;self&quot;:{&quot;href&quot;:&quot;https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/users/ad7b009a-6d88-4830-b3a6-99906049e372/credentials/cde2078f-04e0-46c4-ae2e-f2be01695fe2&quot;}},&quot;id&quot;:&quot;cde2078f-04e0-46c4-ae2e-f2be01695fe2&quot;,&quot;createdAt&quot;:&quot;2024-03-29T13:56:34.966871745Z&quot;,&quot;updatedAt&quot;:&quot;2024-03-29T13:56:34.966872235Z&quot;,&quot;environment&quot;:{&quot;id&quot;:&quot;abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6&quot;},&quot;user&quot;:{&quot;id&quot;:&quot;ad7b009a-6d88-4830-b3a6-99906049e372&quot;},&quot;credentialType&quot;:{&quot;id&quot;:&quot;edc25883-a7f8-44e3-83eb-3c15a7b58de4&quot;},&quot;title&quot;:&quot;Card Developers&quot;,&quot;status&quot;:&quot;PENDING&quot;}