Create Credential Type (managed)
POST {{apiPath}}/environments/{{envID}}/credentialTypes
Use the POST {{apiPath}}/environments/{{envID}}/credentialTypes
operation to create a new type of credential for issuance. A credential type corresponds to the Card type presented by the compatible wallet app.
In this request, management.mode
is MANAGED
. Such credential types are only issued by Create a User Credential or Update a User Credential API requests.
Prerequisites
- See PingOne Credentials and Credential Types for important overview information.
See Credential Types data model for full property descriptions.
Property | Type | Required? |
---|---|---|
cardDesignTemplate | String | Required |
cardType | String | Optional |
description | String | Optional |
issuerName | String | Optional |
management.mode | String | Optional |
metadata | Object | Required |
multiple | Object | Optional |
multiple.expression | String | Required |
onDelete.revokeIssuedCredentials | Boolean | Optional |
title | String | Required |
version | String | Optional |
Disclaimer: The feature supporting multiple
is available on a limited basis. Please contact your sales representative for more information.
metadata object data model
Property | Type | Required? |
---|---|---|
backgroundImage | String | Optional |
bgOpacityPercent | String | Optional |
cardColor | String | Optional |
description | String | Optional |
fields | Object[] | Optional |
fields.attribute | String | Required/Optional |
fields.fileSupport | String | Optional |
fields.id | String | Required |
fields.isVisible | Boolean | Required |
fields.required | Boolean | Optional |
fields.title | String | Required |
fields.type | String | Required |
fields.values | String[] | Required/Optional |
logoImage | String | Optional |
name | String | Optional |
textColor | String | Optional |
version | String | Optional |
Note: You must ensure that any fields used in the cardDesignTemplate
are defined appropriately in metadata.fields
or errors occur when you attempt to create a credential of that type.
Request Body
{"title"=>"Card Developers", "description"=>"PingOne Credentials", "management"=>{"mode"=>"MANAGED"}, "cardType"=>"Card Developers", "metadata"=>{"name"=>"Card Developers", "description"=>"PingOne Credentials", "textColor"=>"#000000", "cardColor"=>"#FFFFFF", "backgroundImage"=>"data:image/jpeg;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=", "logoImage"=>"", "bgOpacityPercent"=>20, "fields"=>[{"id"=>"Directory Attribute -> Name", "title"=>"Name", "isVisible"=>true, "type"=>"Directory Attribute", "attribute"=>"name.formatted", "required"=>false}, {"id"=>"Directory Attribute -> Street Address", "title"=>"Street Address", "isVisible"=>true, "type"=>"Directory Attribute", "attribute"=>"streetAddress", "required"=>true}, {"id"=>"Directory Attribute -> City", "title"=>"City", "isVisible"=>true, "type"=>"Directory Attribute", "attribute"=>"locality", "required"=>true}, {"id"=>"Directory Attribute -> State", "title"=>"State", "isVisible"=>true, "type"=>"Directory Attribute", "attribute"=>"region", "required"=>true}, {"id"=>"Directory Attribute -> Zip Code", "title"=>"Zip Code", "isVisible"=>true, "type"=>"Directory Attribute", "attribute"=>"postalCode", "required"=>true}, {"id"=>"Alphanumeric Text -> Medical Limitations", "title"=>"Medical Limitations", "isVisible"=>true, "type"=>"Alphanumeric Text", "required"=>false}], "version"=>1}, "cardDesignTemplate"=>"<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 740 480\"><g><rect fill=\"none\" width=\"736\" height=\"476\" stroke=\"#808993\" stroke-width=\"3\" rx=\"10\" ry=\"10\" x=\"2\" y=\"2\"></rect><rect fill=\"${cardColor}\" height=\"476\" rx=\"10\" ry=\"10\" width=\"736\" x=\"2\" y=\"2\"></rect><image href=\"${backgroundImage}\" opacity=\"${bgOpacityPercent}\" height=\"476\" rx=\"10\" ry=\"10\" width=\"736\" x=\"2\" y=\"2\"></image><text fill=\"${textColor}\" font-weight=\"450\" font-size=\"30\" x=\"160\" y=\"80\">${cardTitle}</text><text fill=\"${textColor}\" font-size=\"25\" font-weight=\"300\" x=\"160\" y=\"120\">${cardSubtitle}</text><image href=\"${logoImage}\" x=\"42\" y=\"43\" height=\"90px\" width=\"90px\"></image><line xmlns=\"http://www.w3.org/2000/svg\" y2=\"160\" x2=\"695\" y1=\"160\" x1=\"42.5\" stroke=\"#808993\"></line><image href=\"data:image/jpeg;base64,${fields[0].value}\" x=\"42.5\" y=\"180\" rx=\"80px\" ry=\"80px\" height=\"130px\" width=\"130px\"></image><text fill=\"${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"230\">${fields[1].title}: ${fields[1].value}</text><text fill=\"${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"272\">${fields[2].title}: ${fields[2].value}</text><text fill=\"${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"314\">${fields[3].title}: ${fields[3].value}</text></g></svg>", "onDelete"=>{"revokeIssuedCredentials"=>true}}
RESPONSES
status: Created
{"_links":{"self":{"href":"https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/b065a70c-90db-44f3-a2b4-8c455b61c0d0"}},"id":"b065a70c-90db-44f3-a2b4-8c455b61c0d0","createdAt":"2024-04-08T18:47:52.509027160Z","updatedAt":"2024-04-08T18:47:52.509027160Z","environment":{"id":"abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"},"issuer":{"id":"824c722c-254a-4b2d-9b50-17e2abdf5f8a"},"management":{"mode":"MANAGED"},"title":"Card Developers","description":"PingOne Credentials","cardType":"Card Developers","uri":"https://api.pingone.com/v1/distributedid/credentialTypes/b065a70c-90db-44f3-a2b4-8c455b61c0d0","version":{"number":1,"uri":"https://api.pingone.com/v1/distributedid/credentialTypes/b065a70c-90db-44f3-a2b4-8c455b61c0d0/v1"},"metadata":{"name":"Card Developers","description":"PingOne Credentials","textColor":"#000000","cardColor":"#FFFFFF","backgroundImage":"data:image/jpeg;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=","logoImage":"","bgOpacityPercent":20,"fields":[{"id":"Directory Attribute -\u003e Name","title":"Name","isVisible":true,"type":"Directory Attribute","attribute":"name.formatted","required":false},{"id":"Directory Attribute -\u003e Street Address","title":"Street Address","isVisible":true,"type":"Directory Attribute","attribute":"streetAddress","required":true},{"id":"Directory Attribute -\u003e City","title":"City","isVisible":true,"type":"Directory Attribute","attribute":"locality","required":true},{"id":"Directory Attribute -\u003e State","title":"State","isVisible":true,"type":"Directory Attribute","attribute":"region","required":true},{"id":"Directory Attribute -\u003e Zip Code","title":"Zip Code","isVisible":true,"type":"Directory Attribute","attribute":"postalCode","required":true},{"id":"Alphanumeric Text -\u003e Medical Limitations","title":"Medical Limitations","isVisible":true,"type":"Alphanumeric Text","required":false}],"version":1},"cardDesignTemplate":"\u003csvg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 740 480\"\u003e\u003cg\u003e\u003crect fill=\"none\" width=\"736\" height=\"476\" stroke=\"#808993\" stroke-width=\"3\" rx=\"10\" ry=\"10\" x=\"2\" y=\"2\"\u003e\u003c/rect\u003e\u003crect fill=\"${cardColor}\" height=\"476\" rx=\"10\" ry=\"10\" width=\"736\" x=\"2\" y=\"2\"\u003e\u003c/rect\u003e\u003cimage href=\"${backgroundImage}\" opacity=\"${bgOpacityPercent}\" height=\"476\" rx=\"10\" ry=\"10\" width=\"736\" x=\"2\" y=\"2\"\u003e\u003c/image\u003e\u003ctext fill=\"${textColor}\" font-weight=\"450\" font-size=\"30\" x=\"160\" y=\"80\"\u003e${cardTitle}\u003c/text\u003e\u003ctext fill=\"${textColor}\" font-size=\"25\" font-weight=\"300\" x=\"160\" y=\"120\"\u003e${cardSubtitle}\u003c/text\u003e\u003cimage href=\"${logoImage}\" x=\"42\" y=\"43\" height=\"90px\" width=\"90px\"\u003e\u003c/image\u003e\u003cline xmlns=\"http://www.w3.org/2000/svg\" y2=\"160\" x2=\"695\" y1=\"160\" x1=\"42.5\" stroke=\"#808993\"\u003e\u003c/line\u003e\u003cimage href=\"data:image/jpeg;base64,${fields[0].value}\" x=\"42.5\" y=\"180\" rx=\"80px\" ry=\"80px\" height=\"130px\" width=\"130px\"\u003e\u003c/image\u003e\u003ctext fill=\"${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"230\"\u003e${fields[1].title}: ${fields[1].value}\u003c/text\u003e\u003ctext fill=\"${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"272\"\u003e${fields[2].title}: ${fields[2].value}\u003c/text\u003e\u003ctext fill=\"${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"314\"\u003e${fields[3].title}: ${fields[3].value}\u003c/text\u003e\u003c/g\u003e\u003c/svg\u003e","onDelete":{"revokeIssuedCredentials":true}}