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 Credential Types data model for full property descriptions.

PropertyTypeRequired?
cardDesignTemplateStringRequired
cardTypeStringOptional
descriptionStringOptional
issuerNameStringOptional
management.modeStringOptional
metadataObjectRequired
multipleObjectOptional
multiple.expressionStringRequired
onDelete.revokeIssuedCredentialsBooleanOptional
titleStringRequired
versionStringOptional

Disclaimer: The feature supporting multiple is available on a limited basis. Please contact your sales representative for more information.

metadata object data model

PropertyTypeRequired?
backgroundImageStringOptional
bgOpacityPercentStringOptional
cardColorStringOptional
descriptionStringOptional
fieldsObject[]Optional
fields.attributeStringRequired/Optional
fields.fileSupportStringOptional
fields.idStringRequired
fields.isVisibleBooleanRequired
fields.requiredBooleanOptional
fields.titleStringRequired
fields.typeStringRequired
fields.valuesString[]Required/Optional
logoImageStringOptional
nameStringOptional
textColorStringOptional
versionStringOptional

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

{&quot;_links&quot;:{&quot;self&quot;:{&quot;href&quot;:&quot;https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/b065a70c-90db-44f3-a2b4-8c455b61c0d0&quot;}},&quot;id&quot;:&quot;b065a70c-90db-44f3-a2b4-8c455b61c0d0&quot;,&quot;createdAt&quot;:&quot;2024-04-08T18:47:52.509027160Z&quot;,&quot;updatedAt&quot;:&quot;2024-04-08T18:47:52.509027160Z&quot;,&quot;environment&quot;:{&quot;id&quot;:&quot;abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6&quot;},&quot;issuer&quot;:{&quot;id&quot;:&quot;824c722c-254a-4b2d-9b50-17e2abdf5f8a&quot;},&quot;management&quot;:{&quot;mode&quot;:&quot;MANAGED&quot;},&quot;title&quot;:&quot;Card Developers&quot;,&quot;description&quot;:&quot;PingOne Credentials&quot;,&quot;cardType&quot;:&quot;Card Developers&quot;,&quot;uri&quot;:&quot;https://api.pingone.com/v1/distributedid/credentialTypes/b065a70c-90db-44f3-a2b4-8c455b61c0d0&quot;,&quot;version&quot;:{&quot;number&quot;:1,&quot;uri&quot;:&quot;https://api.pingone.com/v1/distributedid/credentialTypes/b065a70c-90db-44f3-a2b4-8c455b61c0d0/v1&quot;},&quot;metadata&quot;:{&quot;name&quot;:&quot;Card Developers&quot;,&quot;description&quot;:&quot;PingOne Credentials&quot;,&quot;textColor&quot;:&quot;#000000&quot;,&quot;cardColor&quot;:&quot;#FFFFFF&quot;,&quot;backgroundImage&quot;:&quot;data:image/jpeg;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=&quot;,&quot;logoImage&quot;:&quot;&quot;,&quot;bgOpacityPercent&quot;:20,&quot;fields&quot;:[{&quot;id&quot;:&quot;Directory Attribute -\u003e Name&quot;,&quot;title&quot;:&quot;Name&quot;,&quot;isVisible&quot;:true,&quot;type&quot;:&quot;Directory Attribute&quot;,&quot;attribute&quot;:&quot;name.formatted&quot;,&quot;required&quot;:false},{&quot;id&quot;:&quot;Directory Attribute -\u003e Street Address&quot;,&quot;title&quot;:&quot;Street Address&quot;,&quot;isVisible&quot;:true,&quot;type&quot;:&quot;Directory Attribute&quot;,&quot;attribute&quot;:&quot;streetAddress&quot;,&quot;required&quot;:true},{&quot;id&quot;:&quot;Directory Attribute -\u003e City&quot;,&quot;title&quot;:&quot;City&quot;,&quot;isVisible&quot;:true,&quot;type&quot;:&quot;Directory Attribute&quot;,&quot;attribute&quot;:&quot;locality&quot;,&quot;required&quot;:true},{&quot;id&quot;:&quot;Directory Attribute -\u003e State&quot;,&quot;title&quot;:&quot;State&quot;,&quot;isVisible&quot;:true,&quot;type&quot;:&quot;Directory Attribute&quot;,&quot;attribute&quot;:&quot;region&quot;,&quot;required&quot;:true},{&quot;id&quot;:&quot;Directory Attribute -\u003e Zip Code&quot;,&quot;title&quot;:&quot;Zip Code&quot;,&quot;isVisible&quot;:true,&quot;type&quot;:&quot;Directory Attribute&quot;,&quot;attribute&quot;:&quot;postalCode&quot;,&quot;required&quot;:true},{&quot;id&quot;:&quot;Alphanumeric Text -\u003e Medical Limitations&quot;,&quot;title&quot;:&quot;Medical Limitations&quot;,&quot;isVisible&quot;:true,&quot;type&quot;:&quot;Alphanumeric Text&quot;,&quot;required&quot;:false}],&quot;version&quot;:1},&quot;cardDesignTemplate&quot;:&quot;\u003csvg xmlns=\&quot;http://www.w3.org/2000/svg\&quot; viewBox=\&quot;0 0 740 480\&quot;\u003e\u003cg\u003e\u003crect fill=\&quot;none\&quot; width=\&quot;736\&quot; height=\&quot;476\&quot; stroke=\&quot;#808993\&quot; stroke-width=\&quot;3\&quot; rx=\&quot;10\&quot; ry=\&quot;10\&quot; x=\&quot;2\&quot; y=\&quot;2\&quot;\u003e\u003c/rect\u003e\u003crect fill=\&quot;${cardColor}\&quot; height=\&quot;476\&quot; rx=\&quot;10\&quot; ry=\&quot;10\&quot; width=\&quot;736\&quot; x=\&quot;2\&quot; y=\&quot;2\&quot;\u003e\u003c/rect\u003e\u003cimage href=\&quot;${backgroundImage}\&quot; opacity=\&quot;${bgOpacityPercent}\&quot; height=\&quot;476\&quot; rx=\&quot;10\&quot; ry=\&quot;10\&quot; width=\&quot;736\&quot; x=\&quot;2\&quot; y=\&quot;2\&quot;\u003e\u003c/image\u003e\u003ctext fill=\&quot;${textColor}\&quot; font-weight=\&quot;450\&quot; font-size=\&quot;30\&quot; x=\&quot;160\&quot; y=\&quot;80\&quot;\u003e${cardTitle}\u003c/text\u003e\u003ctext fill=\&quot;${textColor}\&quot; font-size=\&quot;25\&quot; font-weight=\&quot;300\&quot; x=\&quot;160\&quot; y=\&quot;120\&quot;\u003e${cardSubtitle}\u003c/text\u003e\u003cimage href=\&quot;${logoImage}\&quot; x=\&quot;42\&quot; y=\&quot;43\&quot; height=\&quot;90px\&quot; width=\&quot;90px\&quot;\u003e\u003c/image\u003e\u003cline xmlns=\&quot;http://www.w3.org/2000/svg\&quot; y2=\&quot;160\&quot; x2=\&quot;695\&quot; y1=\&quot;160\&quot; x1=\&quot;42.5\&quot; stroke=\&quot;#808993\&quot;\u003e\u003c/line\u003e\u003cimage href=\&quot;data:image/jpeg;base64,${fields[0].value}\&quot; x=\&quot;42.5\&quot; y=\&quot;180\&quot; rx=\&quot;80px\&quot; ry=\&quot;80px\&quot; height=\&quot;130px\&quot; width=\&quot;130px\&quot;\u003e\u003c/image\u003e\u003ctext fill=\&quot;${textColor}\&quot; font-weight=\&quot;500\&quot; font-size=\&quot;20\&quot; x=\&quot;190\&quot; y=\&quot;230\&quot;\u003e${fields[1].title}: ${fields[1].value}\u003c/text\u003e\u003ctext fill=\&quot;${textColor}\&quot; font-weight=\&quot;500\&quot; font-size=\&quot;20\&quot; x=\&quot;190\&quot; y=\&quot;272\&quot;\u003e${fields[2].title}: ${fields[2].value}\u003c/text\u003e\u003ctext fill=\&quot;${textColor}\&quot; font-weight=\&quot;500\&quot; font-size=\&quot;20\&quot; x=\&quot;190\&quot; y=\&quot;314\&quot;\u003e${fields[3].title}: ${fields[3].value}\u003c/text\u003e\u003c/g\u003e\u003c/svg\u003e&quot;,&quot;onDelete&quot;:{&quot;revokeIssuedCredentials&quot;:true}}