---
title: Create Credential Type (automated)
description: Use the POST {{apiPath}}/v1/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.
component: pingone-api
page_id: pingone-api:credentials:credential-types/create-credential-type-automated
canonical_url: https://developer.pingidentity.com/pingone-api/credentials/credential-types/create-credential-type-automated.html
section_ids:
  prerequisites: Prerequisites
  headers: Headers
  body: Body
  example-request: Example Request
  example-response: Example Response
---

# Create Credential Type (automated)

##

```none
POST {{apiPath}}/v1/environments/{{envID}}/credentialTypes
```

Use the `POST {{apiPath}}/v1/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 `AUTOMATED`. Such credential types are only issued by its associated [credential issuance rule](../credential-issuance-rules.html). An `expiration` object can be used to set the date when the credential will expire.

### Prerequisites

Refer to [Credential Types](../credential-types.html) for important overview information.

> **Collapse: Request Model**
>
> Refer to [Credential Types data model](../credential-types.html#credential-types-data-model) for full property descriptions.
>
> | Property                           | Type     | Required?         |
> | ---------------------------------- | -------- | ----------------- |
> | `cardDesignTemplate` (deprecated)  | String   | Required          |
> | `cardType`                         | String   | Optional          |
> | `description`                      | String   | Optional          |
> | `expiration`                       | Object   | Optional          |
> | `expiration.after`                 | Object   | Required/Optional |
> | `expiration.after.duration`        | Integer  | Required          |
> | `expiration.after.timeUnit`        | String   | Required          |
> | `expiration.expression`            | String   | Required/Optional |
> | `expiration.fieldName`             | String   | Required/Optional |
> | `expiration.timestamp`             | DateTime | Required/Optional |
> | `expiration.type`                  | String   | Required          |
> | `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          |
>
> **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` (deprecated) | 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          |

### Headers

Authorization      Bearer {{accessToken}}

Content-Type      application/json

### Body

raw ( application/json )

```json
{
    "title": "Wallet Developers",
    "description": "PingOne Credentials",
    "issuerName": "WalletDevInc",
    "cardType": "Driver License",
    "metadata": {
        "logoImage": "",
        "backgroundImage": "data:image/jpeg;base64,R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgABACwAAAAAIAAgAAACc4yPqcvtD6OcNIiLsxZg7o91EgiKShYA6sq27Ymm7swumsHRLgfHOXuZ8RKkn6YVHBU3pscRUIRGntDSxSJoZICfzoZBLWFjvRBJdLMtQ4d0edkkE9dJDz1bQXzyNiK/1/bXRoaRd2d4SHGHJ0gi+Ai5UAAAOw==",
        "name": "Wallet Developers",
        "description": "PingOne Credentials",
        "cardColor": "#FFFFFF",
        "bgOpacityPercent": 20,
        "fields": [
            {
                "id": "Alphanumeric Text -> Logo",
                "title": "Logo",
                "isVisible": true,
                "type": "Alphanumeric Text",
                "value": "R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh/jpQaW5neSBQaW5neSBQaW5neSBQaW5neQpQSU5HWSBQSU5HWSBQSU5HWSAKUElOR1lQSU5HWVBJTkdZACH5BAkKAAEALAAAAAAgACAAAAKDjI+py+0Po5wSiIuzFtPufx0Z44GbOCbAyrauG2jLS8OxrAo1zd0pYuHpXJyQw0PMsH6Nkgn30D0vK0xE+lwaowHnprVVhEJejbYnTpXNTAR0DWK8p22U1QD/oOzo7vPG1+dwYjAGxbUQJyHodjgYluD4eJdGYSJmqUgRqbnp+QkaUAAAOw=="
            },
            {
                "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": "Directory Attribute -> User Photo Base64",
                "title": "User Photo Base64",
                "attribute": "image.href",
                "isVisible": true,
                "type": "Directory Attribute",
                "fileSupport": "BASE64_STRING",
                "required": true
            },
            {
                "id": "Directory Attribute -> User Photo",
                "title": "User Photo",
                "attribute": "image.href",
                "isVisible": true,
                "type": "Directory Attribute",
                "fileSupport": "INCLUDE_FILE",
                "required": true
            },
            {
                "id": "Directory Attribute -> User Photo Reference",
                "title": "User Photo Reference",
                "attribute": "image.href",
                "isVisible": true,
                "type": "Directory Attribute",
                "fileSupport": "REFERENCE_FILE",
                "required": true
            }
        ],
        "textColor": "#000000"
    },
    "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><text fill=\"${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"356\">${fields[4].title}: ${fields[4].value}</text></g></svg>",
    "onDelete": {
        "revokeIssuedCredentials": true
    },
    "expiration" : {
        "type" : "HARD",
        "after" : {
            "duration" : 1826,
            "timeUnit" : "DAYS"
        }
    }
}
```

##

### Example Request

* cURL

* C#

* Go

* HTTP

* Java

* jQuery

* NodeJS

* Python

* PHP

* Ruby

* Swift

```shell
curl --location --globoff '{{apiPath}}/v1/environments/{{envID}}/credentialTypes' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{accessToken}}' \
--data '{
    "title": "Wallet Developers",
    "description": "PingOne Credentials",
    "issuerName": "WalletDevInc",
    "cardType": "Driver License",
    "metadata": {
        "logoImage": "",
        "backgroundImage": "data:image/jpeg;base64,R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgABACwAAAAAIAAgAAACc4yPqcvtD6OcNIiLsxZg7o91EgiKShYA6sq27Ymm7swumsHRLgfHOXuZ8RKkn6YVHBU3pscRUIRGntDSxSJoZICfzoZBLWFjvRBJdLMtQ4d0edkkE9dJDz1bQXzyNiK/1/bXRoaRd2d4SHGHJ0gi+Ai5UAAAOw==",
        "name": "Wallet Developers",
        "description": "PingOne Credentials",
        "cardColor": "#FFFFFF",
        "bgOpacityPercent": 20,
        "fields": [
            {
                "id": "Alphanumeric Text -> Logo",
                "title": "Logo",
                "isVisible": true,
                "type": "Alphanumeric Text",
                "value": "R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh/jpQaW5neSBQaW5neSBQaW5neSBQaW5neQpQSU5HWSBQSU5HWSBQSU5HWSAKUElOR1lQSU5HWVBJTkdZACH5BAkKAAEALAAAAAAgACAAAAKDjI+py+0Po5wSiIuzFtPufx0Z44GbOCbAyrauG2jLS8OxrAo1zd0pYuHpXJyQw0PMsH6Nkgn30D0vK0xE+lwaowHnprVVhEJejbYnTpXNTAR0DWK8p22U1QD/oOzo7vPG1+dwYjAGxbUQJyHodjgYluD4eJdGYSJmqUgRqbnp+QkaUAAAOw=="
            },
            {
                "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": "Directory Attribute -> User Photo Base64",
                "title": "User Photo Base64",
                "attribute": "image.href",
                "isVisible": true,
                "type": "Directory Attribute",
                "fileSupport": "BASE64_STRING",
                "required": true
            },
            {
                "id": "Directory Attribute -> User Photo",
                "title": "User Photo",
                "attribute": "image.href",
                "isVisible": true,
                "type": "Directory Attribute",
                "fileSupport": "INCLUDE_FILE",
                "required": true
            },
            {
                "id": "Directory Attribute -> User Photo Reference",
                "title": "User Photo Reference",
                "attribute": "image.href",
                "isVisible": true,
                "type": "Directory Attribute",
                "fileSupport": "REFERENCE_FILE",
                "required": true
            }
        ],
        "textColor": "#000000"
    },
    "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><text fill=\"${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"356\">${fields[4].title}: ${fields[4].value}</text></g></svg>",
    "onDelete": {
        "revokeIssuedCredentials": true
    },
    "expiration" : {
        "type" : "HARD",
        "after" : {
            "duration" : 1826,
            "timeUnit" : "DAYS"
        }
    }
}'
```

```csharp
var options = new RestClientOptions("{{apiPath}}/v1/environments/{{envID}}/credentialTypes")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer {{accessToken}}");
var body = @"{" + "\n" +
@"    ""title"": ""Wallet Developers""," + "\n" +
@"    ""description"": ""PingOne Credentials""," + "\n" +
@"    ""issuerName"": ""WalletDevInc""," + "\n" +
@"    ""cardType"": ""Driver License""," + "\n" +
@"    ""metadata"": {" + "\n" +
@"        ""logoImage"": """"," + "\n" +
@"        ""backgroundImage"": ""data:image/jpeg;base64,R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgABACwAAAAAIAAgAAACc4yPqcvtD6OcNIiLsxZg7o91EgiKShYA6sq27Ymm7swumsHRLgfHOXuZ8RKkn6YVHBU3pscRUIRGntDSxSJoZICfzoZBLWFjvRBJdLMtQ4d0edkkE9dJDz1bQXzyNiK/1/bXRoaRd2d4SHGHJ0gi+Ai5UAAAOw==""," + "\n" +
@"        ""name"": ""Wallet Developers""," + "\n" +
@"        ""description"": ""PingOne Credentials""," + "\n" +
@"        ""cardColor"": ""#FFFFFF""," + "\n" +
@"        ""bgOpacityPercent"": 20," + "\n" +
@"        ""fields"": [" + "\n" +
@"            {" + "\n" +
@"                ""id"": ""Alphanumeric Text -> Logo""," + "\n" +
@"                ""title"": ""Logo""," + "\n" +
@"                ""isVisible"": true," + "\n" +
@"                ""type"": ""Alphanumeric Text""," + "\n" +
@"                ""value"": ""R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh/jpQaW5neSBQaW5neSBQaW5neSBQaW5neQpQSU5HWSBQSU5HWSBQSU5HWSAKUElOR1lQSU5HWVBJTkdZACH5BAkKAAEALAAAAAAgACAAAAKDjI+py+0Po5wSiIuzFtPufx0Z44GbOCbAyrauG2jLS8OxrAo1zd0pYuHpXJyQw0PMsH6Nkgn30D0vK0xE+lwaowHnprVVhEJejbYnTpXNTAR0DWK8p22U1QD/oOzo7vPG1+dwYjAGxbUQJyHodjgYluD4eJdGYSJmqUgRqbnp+QkaUAAAOw==""" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"                ""id"": ""Directory Attribute -> Street Address""," + "\n" +
@"                ""title"": ""Street Address""," + "\n" +
@"                ""isVisible"": true," + "\n" +
@"                ""type"": ""Directory Attribute""," + "\n" +
@"                ""attribute"": ""streetAddress""," + "\n" +
@"                ""required"": true" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"                ""id"": ""Directory Attribute -> City""," + "\n" +
@"                ""title"": ""City""," + "\n" +
@"                ""isVisible"": true," + "\n" +
@"                ""type"": ""Directory Attribute""," + "\n" +
@"                ""attribute"": ""locality""," + "\n" +
@"                ""required"": true" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"                ""id"": ""Directory Attribute -> State""," + "\n" +
@"                ""title"": ""State""," + "\n" +
@"                ""isVisible"": true," + "\n" +
@"                ""type"": ""Directory Attribute""," + "\n" +
@"                ""attribute"": ""region""," + "\n" +
@"                ""required"": true" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"                ""id"": ""Directory Attribute -> Zip Code""," + "\n" +
@"                ""title"": ""Zip Code""," + "\n" +
@"                ""isVisible"": true," + "\n" +
@"                ""type"": ""Directory Attribute""," + "\n" +
@"                ""attribute"": ""postalCode""," + "\n" +
@"                ""required"": true" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"                ""id"": ""Directory Attribute -> User Photo Base64""," + "\n" +
@"                ""title"": ""User Photo Base64""," + "\n" +
@"                ""attribute"": ""image.href""," + "\n" +
@"                ""isVisible"": true," + "\n" +
@"                ""type"": ""Directory Attribute""," + "\n" +
@"                ""fileSupport"": ""BASE64_STRING""," + "\n" +
@"                ""required"": true" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"                ""id"": ""Directory Attribute -> User Photo""," + "\n" +
@"                ""title"": ""User Photo""," + "\n" +
@"                ""attribute"": ""image.href""," + "\n" +
@"                ""isVisible"": true," + "\n" +
@"                ""type"": ""Directory Attribute""," + "\n" +
@"                ""fileSupport"": ""INCLUDE_FILE""," + "\n" +
@"                ""required"": true" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"                ""id"": ""Directory Attribute -> User Photo Reference""," + "\n" +
@"                ""title"": ""User Photo Reference""," + "\n" +
@"                ""attribute"": ""image.href""," + "\n" +
@"                ""isVisible"": true," + "\n" +
@"                ""type"": ""Directory Attribute""," + "\n" +
@"                ""fileSupport"": ""REFERENCE_FILE""," + "\n" +
@"                ""required"": true" + "\n" +
@"            }" + "\n" +
@"        ]," + "\n" +
@"        ""textColor"": ""#000000""" + "\n" +
@"    }," + "\n" +
@"    ""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><text fill=\""${textColor}\"" font-weight=\""500\"" font-size=\""20\"" x=\""190\"" y=\""356\"">${fields[4].title}: ${fields[4].value}</text></g></svg>""," + "\n" +
@"    ""onDelete"": {" + "\n" +
@"        ""revokeIssuedCredentials"": true" + "\n" +
@"    }," + "\n" +
@"    ""expiration"" : {" + "\n" +
@"        ""type"" : ""HARD""," + "\n" +
@"        ""after"" : {" + "\n" +
@"            ""duration"" : 1826," + "\n" +
@"            ""timeUnit"" : ""DAYS""" + "\n" +
@"        }" + "\n" +
@"    }" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
```

```golang
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "{{apiPath}}/v1/environments/{{envID}}/credentialTypes"
  method := "POST"

  payload := strings.NewReader(`{
    "title": "Wallet Developers",
    "description": "PingOne Credentials",
    "issuerName": "WalletDevInc",
    "cardType": "Driver License",
    "metadata": {
        "logoImage": "",
        "backgroundImage": "data:image/jpeg;base64,R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgABACwAAAAAIAAgAAACc4yPqcvtD6OcNIiLsxZg7o91EgiKShYA6sq27Ymm7swumsHRLgfHOXuZ8RKkn6YVHBU3pscRUIRGntDSxSJoZICfzoZBLWFjvRBJdLMtQ4d0edkkE9dJDz1bQXzyNiK/1/bXRoaRd2d4SHGHJ0gi+Ai5UAAAOw==",
        "name": "Wallet Developers",
        "description": "PingOne Credentials",
        "cardColor": "#FFFFFF",
        "bgOpacityPercent": 20,
        "fields": [
            {
                "id": "Alphanumeric Text -> Logo",
                "title": "Logo",
                "isVisible": true,
                "type": "Alphanumeric Text",
                "value": "R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh/jpQaW5neSBQaW5neSBQaW5neSBQaW5neQpQSU5HWSBQSU5HWSBQSU5HWSAKUElOR1lQSU5HWVBJTkdZACH5BAkKAAEALAAAAAAgACAAAAKDjI+py+0Po5wSiIuzFtPufx0Z44GbOCbAyrauG2jLS8OxrAo1zd0pYuHpXJyQw0PMsH6Nkgn30D0vK0xE+lwaowHnprVVhEJejbYnTpXNTAR0DWK8p22U1QD/oOzo7vPG1+dwYjAGxbUQJyHodjgYluD4eJdGYSJmqUgRqbnp+QkaUAAAOw=="
            },
            {
                "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": "Directory Attribute -> User Photo Base64",
                "title": "User Photo Base64",
                "attribute": "image.href",
                "isVisible": true,
                "type": "Directory Attribute",
                "fileSupport": "BASE64_STRING",
                "required": true
            },
            {
                "id": "Directory Attribute -> User Photo",
                "title": "User Photo",
                "attribute": "image.href",
                "isVisible": true,
                "type": "Directory Attribute",
                "fileSupport": "INCLUDE_FILE",
                "required": true
            },
            {
                "id": "Directory Attribute -> User Photo Reference",
                "title": "User Photo Reference",
                "attribute": "image.href",
                "isVisible": true,
                "type": "Directory Attribute",
                "fileSupport": "REFERENCE_FILE",
                "required": true
            }
        ],
        "textColor": "#000000"
    },
    "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><text fill=\"${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"356\">${fields[4].title}: ${fields[4].value}</text></g></svg>",
    "onDelete": {
        "revokeIssuedCredentials": true
    },
    "expiration" : {
        "type" : "HARD",
        "after" : {
            "duration" : 1826,
            "timeUnit" : "DAYS"
        }
    }
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "Bearer {{accessToken}}")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```

```http
POST /v1/environments/{{envID}}/credentialTypes HTTP/1.1
Host: {{apiPath}}
Content-Type: application/json
Authorization: Bearer {{accessToken}}

{
    "title": "Wallet Developers",
    "description": "PingOne Credentials",
    "issuerName": "WalletDevInc",
    "cardType": "Driver License",
    "metadata": {
        "logoImage": "",
        "backgroundImage": "data:image/jpeg;base64,R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgABACwAAAAAIAAgAAACc4yPqcvtD6OcNIiLsxZg7o91EgiKShYA6sq27Ymm7swumsHRLgfHOXuZ8RKkn6YVHBU3pscRUIRGntDSxSJoZICfzoZBLWFjvRBJdLMtQ4d0edkkE9dJDz1bQXzyNiK/1/bXRoaRd2d4SHGHJ0gi+Ai5UAAAOw==",
        "name": "Wallet Developers",
        "description": "PingOne Credentials",
        "cardColor": "#FFFFFF",
        "bgOpacityPercent": 20,
        "fields": [
            {
                "id": "Alphanumeric Text -> Logo",
                "title": "Logo",
                "isVisible": true,
                "type": "Alphanumeric Text",
                "value": "R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh/jpQaW5neSBQaW5neSBQaW5neSBQaW5neQpQSU5HWSBQSU5HWSBQSU5HWSAKUElOR1lQSU5HWVBJTkdZACH5BAkKAAEALAAAAAAgACAAAAKDjI+py+0Po5wSiIuzFtPufx0Z44GbOCbAyrauG2jLS8OxrAo1zd0pYuHpXJyQw0PMsH6Nkgn30D0vK0xE+lwaowHnprVVhEJejbYnTpXNTAR0DWK8p22U1QD/oOzo7vPG1+dwYjAGxbUQJyHodjgYluD4eJdGYSJmqUgRqbnp+QkaUAAAOw=="
            },
            {
                "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": "Directory Attribute -> User Photo Base64",
                "title": "User Photo Base64",
                "attribute": "image.href",
                "isVisible": true,
                "type": "Directory Attribute",
                "fileSupport": "BASE64_STRING",
                "required": true
            },
            {
                "id": "Directory Attribute -> User Photo",
                "title": "User Photo",
                "attribute": "image.href",
                "isVisible": true,
                "type": "Directory Attribute",
                "fileSupport": "INCLUDE_FILE",
                "required": true
            },
            {
                "id": "Directory Attribute -> User Photo Reference",
                "title": "User Photo Reference",
                "attribute": "image.href",
                "isVisible": true,
                "type": "Directory Attribute",
                "fileSupport": "REFERENCE_FILE",
                "required": true
            }
        ],
        "textColor": "#000000"
    },
    "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><text fill=\"${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"356\">${fields[4].title}: ${fields[4].value}</text></g></svg>",
    "onDelete": {
        "revokeIssuedCredentials": true
    },
    "expiration" : {
        "type" : "HARD",
        "after" : {
            "duration" : 1826,
            "timeUnit" : "DAYS"
        }
    }
}
```

```java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n    \"title\": \"Wallet Developers\",\n    \"description\": \"PingOne Credentials\",\n    \"issuerName\": \"WalletDevInc\",\n    \"cardType\": \"Driver License\",\n    \"metadata\": {\n        \"logoImage\": \"\",\n        \"backgroundImage\": \"data:image/jpeg;base64,R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgABACwAAAAAIAAgAAACc4yPqcvtD6OcNIiLsxZg7o91EgiKShYA6sq27Ymm7swumsHRLgfHOXuZ8RKkn6YVHBU3pscRUIRGntDSxSJoZICfzoZBLWFjvRBJdLMtQ4d0edkkE9dJDz1bQXzyNiK/1/bXRoaRd2d4SHGHJ0gi+Ai5UAAAOw==\",\n        \"name\": \"Wallet Developers\",\n        \"description\": \"PingOne Credentials\",\n        \"cardColor\": \"#FFFFFF\",\n        \"bgOpacityPercent\": 20,\n        \"fields\": [\n            {\n                \"id\": \"Alphanumeric Text -> Logo\",\n                \"title\": \"Logo\",\n                \"isVisible\": true,\n                \"type\": \"Alphanumeric Text\",\n                \"value\": \"R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh/jpQaW5neSBQaW5neSBQaW5neSBQaW5neQpQSU5HWSBQSU5HWSBQSU5HWSAKUElOR1lQSU5HWVBJTkdZACH5BAkKAAEALAAAAAAgACAAAAKDjI+py+0Po5wSiIuzFtPufx0Z44GbOCbAyrauG2jLS8OxrAo1zd0pYuHpXJyQw0PMsH6Nkgn30D0vK0xE+lwaowHnprVVhEJejbYnTpXNTAR0DWK8p22U1QD/oOzo7vPG1+dwYjAGxbUQJyHodjgYluD4eJdGYSJmqUgRqbnp+QkaUAAAOw==\"\n            },\n            {\n                \"id\": \"Directory Attribute -> Street Address\",\n                \"title\": \"Street Address\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"attribute\": \"streetAddress\",\n                \"required\": true\n            },\n            {\n                \"id\": \"Directory Attribute -> City\",\n                \"title\": \"City\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"attribute\": \"locality\",\n                \"required\": true\n            },\n            {\n                \"id\": \"Directory Attribute -> State\",\n                \"title\": \"State\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"attribute\": \"region\",\n                \"required\": true\n            },\n            {\n                \"id\": \"Directory Attribute -> Zip Code\",\n                \"title\": \"Zip Code\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"attribute\": \"postalCode\",\n                \"required\": true\n            },\n            {\n                \"id\": \"Directory Attribute -> User Photo Base64\",\n                \"title\": \"User Photo Base64\",\n                \"attribute\": \"image.href\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"fileSupport\": \"BASE64_STRING\",\n                \"required\": true\n            },\n            {\n                \"id\": \"Directory Attribute -> User Photo\",\n                \"title\": \"User Photo\",\n                \"attribute\": \"image.href\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"fileSupport\": \"INCLUDE_FILE\",\n                \"required\": true\n            },\n            {\n                \"id\": \"Directory Attribute -> User Photo Reference\",\n                \"title\": \"User Photo Reference\",\n                \"attribute\": \"image.href\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"fileSupport\": \"REFERENCE_FILE\",\n                \"required\": true\n            }\n        ],\n        \"textColor\": \"#000000\"\n    },\n    \"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><text fill=\\\"${textColor}\\\" font-weight=\\\"500\\\" font-size=\\\"20\\\" x=\\\"190\\\" y=\\\"356\\\">${fields[4].title}: ${fields[4].value}</text></g></svg>\",\n    \"onDelete\": {\n        \"revokeIssuedCredentials\": true\n    },\n    \"expiration\" : {\n        \"type\" : \"HARD\",\n        \"after\" : {\n            \"duration\" : 1826,\n            \"timeUnit\" : \"DAYS\"\n        }\n    }\n}");
Request request = new Request.Builder()
  .url("{{apiPath}}/v1/environments/{{envID}}/credentialTypes")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("Authorization", "Bearer {{accessToken}}")
  .build();
Response response = client.newCall(request).execute();
```

```javascript
var settings = {
  "url": "{{apiPath}}/v1/environments/{{envID}}/credentialTypes",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {{accessToken}}"
  },
  "data": JSON.stringify({
    "title": "Wallet Developers",
    "description": "PingOne Credentials",
    "issuerName": "WalletDevInc",
    "cardType": "Driver License",
    "metadata": {
      "logoImage": "",
      "backgroundImage": "data:image/jpeg;base64,R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgABACwAAAAAIAAgAAACc4yPqcvtD6OcNIiLsxZg7o91EgiKShYA6sq27Ymm7swumsHRLgfHOXuZ8RKkn6YVHBU3pscRUIRGntDSxSJoZICfzoZBLWFjvRBJdLMtQ4d0edkkE9dJDz1bQXzyNiK/1/bXRoaRd2d4SHGHJ0gi+Ai5UAAAOw==",
      "name": "Wallet Developers",
      "description": "PingOne Credentials",
      "cardColor": "#FFFFFF",
      "bgOpacityPercent": 20,
      "fields": [
        {
          "id": "Alphanumeric Text -> Logo",
          "title": "Logo",
          "isVisible": true,
          "type": "Alphanumeric Text",
          "value": "R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh/jpQaW5neSBQaW5neSBQaW5neSBQaW5neQpQSU5HWSBQSU5HWSBQSU5HWSAKUElOR1lQSU5HWVBJTkdZACH5BAkKAAEALAAAAAAgACAAAAKDjI+py+0Po5wSiIuzFtPufx0Z44GbOCbAyrauG2jLS8OxrAo1zd0pYuHpXJyQw0PMsH6Nkgn30D0vK0xE+lwaowHnprVVhEJejbYnTpXNTAR0DWK8p22U1QD/oOzo7vPG1+dwYjAGxbUQJyHodjgYluD4eJdGYSJmqUgRqbnp+QkaUAAAOw=="
        },
        {
          "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": "Directory Attribute -> User Photo Base64",
          "title": "User Photo Base64",
          "attribute": "image.href",
          "isVisible": true,
          "type": "Directory Attribute",
          "fileSupport": "BASE64_STRING",
          "required": true
        },
        {
          "id": "Directory Attribute -> User Photo",
          "title": "User Photo",
          "attribute": "image.href",
          "isVisible": true,
          "type": "Directory Attribute",
          "fileSupport": "INCLUDE_FILE",
          "required": true
        },
        {
          "id": "Directory Attribute -> User Photo Reference",
          "title": "User Photo Reference",
          "attribute": "image.href",
          "isVisible": true,
          "type": "Directory Attribute",
          "fileSupport": "REFERENCE_FILE",
          "required": true
        }
      ],
      "textColor": "#000000"
    },
    "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><text fill=\"${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"356\">${fields[4].title}: ${fields[4].value}</text></g></svg>",
    "onDelete": {
      "revokeIssuedCredentials": true
    },
    "expiration": {
      "type": "HARD",
      "after": {
        "duration": 1826,
        "timeUnit": "DAYS"
      }
    }
  }),
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
```

```javascript
var request = require('request');
var options = {
  'method': 'POST',
  'url': '{{apiPath}}/v1/environments/{{envID}}/credentialTypes',
  'headers': {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer {{accessToken}}'
  },
  body: JSON.stringify({
    "title": "Wallet Developers",
    "description": "PingOne Credentials",
    "issuerName": "WalletDevInc",
    "cardType": "Driver License",
    "metadata": {
      "logoImage": "",
      "backgroundImage": "data:image/jpeg;base64,R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgABACwAAAAAIAAgAAACc4yPqcvtD6OcNIiLsxZg7o91EgiKShYA6sq27Ymm7swumsHRLgfHOXuZ8RKkn6YVHBU3pscRUIRGntDSxSJoZICfzoZBLWFjvRBJdLMtQ4d0edkkE9dJDz1bQXzyNiK/1/bXRoaRd2d4SHGHJ0gi+Ai5UAAAOw==",
      "name": "Wallet Developers",
      "description": "PingOne Credentials",
      "cardColor": "#FFFFFF",
      "bgOpacityPercent": 20,
      "fields": [
        {
          "id": "Alphanumeric Text -> Logo",
          "title": "Logo",
          "isVisible": true,
          "type": "Alphanumeric Text",
          "value": "R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh/jpQaW5neSBQaW5neSBQaW5neSBQaW5neQpQSU5HWSBQSU5HWSBQSU5HWSAKUElOR1lQSU5HWVBJTkdZACH5BAkKAAEALAAAAAAgACAAAAKDjI+py+0Po5wSiIuzFtPufx0Z44GbOCbAyrauG2jLS8OxrAo1zd0pYuHpXJyQw0PMsH6Nkgn30D0vK0xE+lwaowHnprVVhEJejbYnTpXNTAR0DWK8p22U1QD/oOzo7vPG1+dwYjAGxbUQJyHodjgYluD4eJdGYSJmqUgRqbnp+QkaUAAAOw=="
        },
        {
          "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": "Directory Attribute -> User Photo Base64",
          "title": "User Photo Base64",
          "attribute": "image.href",
          "isVisible": true,
          "type": "Directory Attribute",
          "fileSupport": "BASE64_STRING",
          "required": true
        },
        {
          "id": "Directory Attribute -> User Photo",
          "title": "User Photo",
          "attribute": "image.href",
          "isVisible": true,
          "type": "Directory Attribute",
          "fileSupport": "INCLUDE_FILE",
          "required": true
        },
        {
          "id": "Directory Attribute -> User Photo Reference",
          "title": "User Photo Reference",
          "attribute": "image.href",
          "isVisible": true,
          "type": "Directory Attribute",
          "fileSupport": "REFERENCE_FILE",
          "required": true
        }
      ],
      "textColor": "#000000"
    },
    "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><text fill=\"${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"356\">${fields[4].title}: ${fields[4].value}</text></g></svg>",
    "onDelete": {
      "revokeIssuedCredentials": true
    },
    "expiration": {
      "type": "HARD",
      "after": {
        "duration": 1826,
        "timeUnit": "DAYS"
      }
    }
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
```

```python
import requests
import json

url = "{{apiPath}}/v1/environments/{{envID}}/credentialTypes"

payload = json.dumps({
  "title": "Wallet Developers",
  "description": "PingOne Credentials",
  "issuerName": "WalletDevInc",
  "cardType": "Driver License",
  "metadata": {
    "logoImage": "",
    "backgroundImage": "data:image/jpeg;base64,R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgABACwAAAAAIAAgAAACc4yPqcvtD6OcNIiLsxZg7o91EgiKShYA6sq27Ymm7swumsHRLgfHOXuZ8RKkn6YVHBU3pscRUIRGntDSxSJoZICfzoZBLWFjvRBJdLMtQ4d0edkkE9dJDz1bQXzyNiK/1/bXRoaRd2d4SHGHJ0gi+Ai5UAAAOw==",
    "name": "Wallet Developers",
    "description": "PingOne Credentials",
    "cardColor": "#FFFFFF",
    "bgOpacityPercent": 20,
    "fields": [
      {
        "id": "Alphanumeric Text -> Logo",
        "title": "Logo",
        "isVisible": True,
        "type": "Alphanumeric Text",
        "value": "R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh/jpQaW5neSBQaW5neSBQaW5neSBQaW5neQpQSU5HWSBQSU5HWSBQSU5HWSAKUElOR1lQSU5HWVBJTkdZACH5BAkKAAEALAAAAAAgACAAAAKDjI+py+0Po5wSiIuzFtPufx0Z44GbOCbAyrauG2jLS8OxrAo1zd0pYuHpXJyQw0PMsH6Nkgn30D0vK0xE+lwaowHnprVVhEJejbYnTpXNTAR0DWK8p22U1QD/oOzo7vPG1+dwYjAGxbUQJyHodjgYluD4eJdGYSJmqUgRqbnp+QkaUAAAOw=="
      },
      {
        "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": "Directory Attribute -> User Photo Base64",
        "title": "User Photo Base64",
        "attribute": "image.href",
        "isVisible": True,
        "type": "Directory Attribute",
        "fileSupport": "BASE64_STRING",
        "required": True
      },
      {
        "id": "Directory Attribute -> User Photo",
        "title": "User Photo",
        "attribute": "image.href",
        "isVisible": True,
        "type": "Directory Attribute",
        "fileSupport": "INCLUDE_FILE",
        "required": True
      },
      {
        "id": "Directory Attribute -> User Photo Reference",
        "title": "User Photo Reference",
        "attribute": "image.href",
        "isVisible": True,
        "type": "Directory Attribute",
        "fileSupport": "REFERENCE_FILE",
        "required": True
      }
    ],
    "textColor": "#000000"
  },
  "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><text fill=\"${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"356\">${fields[4].title}: ${fields[4].value}</text></g></svg>",
  "onDelete": {
    "revokeIssuedCredentials": True
  },
  "expiration": {
    "type": "HARD",
    "after": {
      "duration": 1826,
      "timeUnit": "DAYS"
    }
  }
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer {{accessToken}}'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
```

```php
<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('{{apiPath}}/v1/environments/{{envID}}/credentialTypes');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json',
  'Authorization' => 'Bearer {{accessToken}}'
));
$request->setBody('{\n    "title": "Wallet Developers",\n    "description": "PingOne Credentials",\n    "issuerName": "WalletDevInc",\n    "cardType": "Driver License",\n    "metadata": {\n        "logoImage": "",\n        "backgroundImage": "data:image/jpeg;base64,R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgABACwAAAAAIAAgAAACc4yPqcvtD6OcNIiLsxZg7o91EgiKShYA6sq27Ymm7swumsHRLgfHOXuZ8RKkn6YVHBU3pscRUIRGntDSxSJoZICfzoZBLWFjvRBJdLMtQ4d0edkkE9dJDz1bQXzyNiK/1/bXRoaRd2d4SHGHJ0gi+Ai5UAAAOw==",\n        "name": "Wallet Developers",\n        "description": "PingOne Credentials",\n        "cardColor": "#FFFFFF",\n        "bgOpacityPercent": 20,\n        "fields": [\n            {\n                "id": "Alphanumeric Text -> Logo",\n                "title": "Logo",\n                "isVisible": true,\n                "type": "Alphanumeric Text",\n                "value": "R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh/jpQaW5neSBQaW5neSBQaW5neSBQaW5neQpQSU5HWSBQSU5HWSBQSU5HWSAKUElOR1lQSU5HWVBJTkdZACH5BAkKAAEALAAAAAAgACAAAAKDjI+py+0Po5wSiIuzFtPufx0Z44GbOCbAyrauG2jLS8OxrAo1zd0pYuHpXJyQw0PMsH6Nkgn30D0vK0xE+lwaowHnprVVhEJejbYnTpXNTAR0DWK8p22U1QD/oOzo7vPG1+dwYjAGxbUQJyHodjgYluD4eJdGYSJmqUgRqbnp+QkaUAAAOw=="\n            },\n            {\n                "id": "Directory Attribute -> Street Address",\n                "title": "Street Address",\n                "isVisible": true,\n                "type": "Directory Attribute",\n                "attribute": "streetAddress",\n                "required": true\n            },\n            {\n                "id": "Directory Attribute -> City",\n                "title": "City",\n                "isVisible": true,\n                "type": "Directory Attribute",\n                "attribute": "locality",\n                "required": true\n            },\n            {\n                "id": "Directory Attribute -> State",\n                "title": "State",\n                "isVisible": true,\n                "type": "Directory Attribute",\n                "attribute": "region",\n                "required": true\n            },\n            {\n                "id": "Directory Attribute -> Zip Code",\n                "title": "Zip Code",\n                "isVisible": true,\n                "type": "Directory Attribute",\n                "attribute": "postalCode",\n                "required": true\n            },\n            {\n                "id": "Directory Attribute -> User Photo Base64",\n                "title": "User Photo Base64",\n                "attribute": "image.href",\n                "isVisible": true,\n                "type": "Directory Attribute",\n                "fileSupport": "BASE64_STRING",\n                "required": true\n            },\n            {\n                "id": "Directory Attribute -> User Photo",\n                "title": "User Photo",\n                "attribute": "image.href",\n                "isVisible": true,\n                "type": "Directory Attribute",\n                "fileSupport": "INCLUDE_FILE",\n                "required": true\n            },\n            {\n                "id": "Directory Attribute -> User Photo Reference",\n                "title": "User Photo Reference",\n                "attribute": "image.href",\n                "isVisible": true,\n                "type": "Directory Attribute",\n                "fileSupport": "REFERENCE_FILE",\n                "required": true\n            }\n        ],\n        "textColor": "#000000"\n    },\n    "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><text fill=\\"${textColor}\\" font-weight=\\"500\\" font-size=\\"20\\" x=\\"190\\" y=\\"356\\">${fields[4].title}: ${fields[4].value}</text></g></svg>",\n    "onDelete": {\n        "revokeIssuedCredentials": true\n    },\n    "expiration" : {\n        "type" : "HARD",\n        "after" : {\n            "duration" : 1826,\n            "timeUnit" : "DAYS"\n        }\n    }\n}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}
```

```ruby
require "uri"
require "json"
require "net/http"

url = URI("{{apiPath}}/v1/environments/{{envID}}/credentialTypes")

http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["Authorization"] = "Bearer {{accessToken}}"
request.body = JSON.dump({
  "title": "Wallet Developers",
  "description": "PingOne Credentials",
  "issuerName": "WalletDevInc",
  "cardType": "Driver License",
  "metadata": {
    "logoImage": "",
    "backgroundImage": "data:image/jpeg;base64,R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgABACwAAAAAIAAgAAACc4yPqcvtD6OcNIiLsxZg7o91EgiKShYA6sq27Ymm7swumsHRLgfHOXuZ8RKkn6YVHBU3pscRUIRGntDSxSJoZICfzoZBLWFjvRBJdLMtQ4d0edkkE9dJDz1bQXzyNiK/1/bXRoaRd2d4SHGHJ0gi+Ai5UAAAOw==",
    "name": "Wallet Developers",
    "description": "PingOne Credentials",
    "cardColor": "\#FFFFFF",
    "bgOpacityPercent": 20,
    "fields": [
      {
        "id": "Alphanumeric Text -> Logo",
        "title": "Logo",
        "isVisible": true,
        "type": "Alphanumeric Text",
        "value": "R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh/jpQaW5neSBQaW5neSBQaW5neSBQaW5neQpQSU5HWSBQSU5HWSBQSU5HWSAKUElOR1lQSU5HWVBJTkdZACH5BAkKAAEALAAAAAAgACAAAAKDjI+py+0Po5wSiIuzFtPufx0Z44GbOCbAyrauG2jLS8OxrAo1zd0pYuHpXJyQw0PMsH6Nkgn30D0vK0xE+lwaowHnprVVhEJejbYnTpXNTAR0DWK8p22U1QD/oOzo7vPG1+dwYjAGxbUQJyHodjgYluD4eJdGYSJmqUgRqbnp+QkaUAAAOw=="
      },
      {
        "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": "Directory Attribute -> User Photo Base64",
        "title": "User Photo Base64",
        "attribute": "image.href",
        "isVisible": true,
        "type": "Directory Attribute",
        "fileSupport": "BASE64_STRING",
        "required": true
      },
      {
        "id": "Directory Attribute -> User Photo",
        "title": "User Photo",
        "attribute": "image.href",
        "isVisible": true,
        "type": "Directory Attribute",
        "fileSupport": "INCLUDE_FILE",
        "required": true
      },
      {
        "id": "Directory Attribute -> User Photo Reference",
        "title": "User Photo Reference",
        "attribute": "image.href",
        "isVisible": true,
        "type": "Directory Attribute",
        "fileSupport": "REFERENCE_FILE",
        "required": true
      }
    ],
    "textColor": "\#000000"
  },
  "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><text fill=\"\${textColor}\" font-weight=\"500\" font-size=\"20\" x=\"190\" y=\"356\">\${fields[4].title}: \${fields[4].value}</text></g></svg>",
  "onDelete": {
    "revokeIssuedCredentials": true
  },
  "expiration": {
    "type": "HARD",
    "after": {
      "duration": 1826,
      "timeUnit": "DAYS"
    }
  }
})

response = http.request(request)
puts response.read_body
```

```swift
let parameters = "{\n    \"title\": \"Wallet Developers\",\n    \"description\": \"PingOne Credentials\",\n    \"issuerName\": \"WalletDevInc\",\n    \"cardType\": \"Driver License\",\n    \"metadata\": {\n        \"logoImage\": \"\",\n        \"backgroundImage\": \"data:image/jpeg;base64,R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJCgABACwAAAAAIAAgAAACc4yPqcvtD6OcNIiLsxZg7o91EgiKShYA6sq27Ymm7swumsHRLgfHOXuZ8RKkn6YVHBU3pscRUIRGntDSxSJoZICfzoZBLWFjvRBJdLMtQ4d0edkkE9dJDz1bQXzyNiK/1/bXRoaRd2d4SHGHJ0gi+Ai5UAAAOw==\",\n        \"name\": \"Wallet Developers\",\n        \"description\": \"PingOne Credentials\",\n        \"cardColor\": \"#FFFFFF\",\n        \"bgOpacityPercent\": 20,\n        \"fields\": [\n            {\n                \"id\": \"Alphanumeric Text -> Logo\",\n                \"title\": \"Logo\",\n                \"isVisible\": true,\n                \"type\": \"Alphanumeric Text\",\n                \"value\": \"R0lGODlhIAAgAPEAAAAAAAAAM8wzMwAAACH/C05FVFNDQVBFMi4wAwEAAAAh/jpQaW5neSBQaW5neSBQaW5neSBQaW5neQpQSU5HWSBQSU5HWSBQSU5HWSAKUElOR1lQSU5HWVBJTkdZACH5BAkKAAEALAAAAAAgACAAAAKDjI+py+0Po5wSiIuzFtPufx0Z44GbOCbAyrauG2jLS8OxrAo1zd0pYuHpXJyQw0PMsH6Nkgn30D0vK0xE+lwaowHnprVVhEJejbYnTpXNTAR0DWK8p22U1QD/oOzo7vPG1+dwYjAGxbUQJyHodjgYluD4eJdGYSJmqUgRqbnp+QkaUAAAOw==\"\n            },\n            {\n                \"id\": \"Directory Attribute -> Street Address\",\n                \"title\": \"Street Address\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"attribute\": \"streetAddress\",\n                \"required\": true\n            },\n            {\n                \"id\": \"Directory Attribute -> City\",\n                \"title\": \"City\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"attribute\": \"locality\",\n                \"required\": true\n            },\n            {\n                \"id\": \"Directory Attribute -> State\",\n                \"title\": \"State\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"attribute\": \"region\",\n                \"required\": true\n            },\n            {\n                \"id\": \"Directory Attribute -> Zip Code\",\n                \"title\": \"Zip Code\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"attribute\": \"postalCode\",\n                \"required\": true\n            },\n            {\n                \"id\": \"Directory Attribute -> User Photo Base64\",\n                \"title\": \"User Photo Base64\",\n                \"attribute\": \"image.href\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"fileSupport\": \"BASE64_STRING\",\n                \"required\": true\n            },\n            {\n                \"id\": \"Directory Attribute -> User Photo\",\n                \"title\": \"User Photo\",\n                \"attribute\": \"image.href\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"fileSupport\": \"INCLUDE_FILE\",\n                \"required\": true\n            },\n            {\n                \"id\": \"Directory Attribute -> User Photo Reference\",\n                \"title\": \"User Photo Reference\",\n                \"attribute\": \"image.href\",\n                \"isVisible\": true,\n                \"type\": \"Directory Attribute\",\n                \"fileSupport\": \"REFERENCE_FILE\",\n                \"required\": true\n            }\n        ],\n        \"textColor\": \"#000000\"\n    },\n    \"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><text fill=\\\"${textColor}\\\" font-weight=\\\"500\\\" font-size=\\\"20\\\" x=\\\"190\\\" y=\\\"356\\\">${fields[4].title}: ${fields[4].value}</text></g></svg>\",\n    \"onDelete\": {\n        \"revokeIssuedCredentials\": true\n    },\n    \"expiration\" : {\n        \"type\" : \"HARD\",\n        \"after\" : {\n            \"duration\" : 1826,\n            \"timeUnit\" : \"DAYS\"\n        }\n    }\n}"
let postData = parameters.data(using: .utf8)

var request = URLRequest(url: URL(string: "{{apiPath}}/v1/environments/{{envID}}/credentialTypes")!,timeoutInterval: Double.infinity)
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.addValue("Bearer {{accessToken}}", forHTTPHeaderField: "Authorization")

request.httpMethod = "POST"
request.httpBody = postData

let task = URLSession.shared.dataTask(with: request) { data, response, error in
  guard let data = data else {
    print(String(describing: error))
    return
  }
  print(String(data: data, encoding: .utf8)!)
}

task.resume()
```

### Example Response

201 Created

```json
{
    "_links": {
        "self": {
            "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/6d031a6d-ca39-40a5-bd51-098db3774082"
        },
        "environment": {
            "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
        },
        "credentialIssuerProfile": {
            "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialIssuerProfile"
        },
        "issuanceRules": {
            "href": "https://api.pingone.com/v1/environments/abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6/credentialTypes/6d031a6d-ca39-40a5-bd51-098db3774082/issuanceRules"
        }
    },
    "id": "6d031a6d-ca39-40a5-bd51-098db3774082",
    "createdAt": "2025-02-28T20:46:59.406852884Z",
    "updatedAt": "2025-02-28T20:46:59.406852884Z",
    "environment": {
        "id": "abfba8f6-49eb-49f5-a5d9-80ad5c98f9f6"
    },
    "issuer": {
        "id": "824c722c-254a-4b2d-9b50-17e2abdf5f8a"
    },
    "management": {
        "mode": "AUTOMATED"
    },
    "title": "Title",
    "description": "Subtitle",
    "cardType": "Title",
    "uri": "https://api.pingone.com/v1/distributedid/credentialTypes/6d031a6d-ca39-40a5-bd51-098db3774082",
    "version": {
        "number": 1,
        "uri": "https://api.pingone.com/v1/distributedid/credentialTypes/6d031a6d-ca39-40a5-bd51-098db3774082/v1",
        "id": "76fecf21-313a-49d4-b4d5-ec17281bdd20"
    },
    "metadata": {
        "name": "Alphanumeric Text Example",
        "description": "Alphanumeric Text Attribute",
        "textColor": "#253746",
        "cardColor": "#9997bf",
        "backgroundImage": "",
        "logoImage": "",
        "bgOpacityPercent": 20,
        "fields": [
            {
                "id": "Alphanumeric Text -> Account",
                "title": "Account",
                "isVisible": true,
                "type": "Alphanumeric Text",
                "value": "Value",
                "required": true
            },
            {
                "id": "Alphanumeric Text -> Name",
                "title": "Name",
                "isVisible": true,
                "type": "Alphanumeric Text",
                "value": "Value",
                "required": true
            },
            {
                "id": "Alphanumeric Text -> Number",
                "title": "Number",
                "isVisible": true,
                "type": "Alphanumeric Text",
                "value": "Value",
                "required": true
            }
        ],
        "version": 4
    },
    "onDelete": {
        "revokeIssuedCredentials": true
    },
    "expiration": {
        "type": "HARD",
        "after": {
            "duration": 1826,
            "timeUnit": "DAYS"
        }
    },
    "visualizationTemplateData": {
        "showTitle": true,
        "displayFields": [
            {
                "showFieldName": false,
                "dataFieldName": "Account"
            },
            {
                "showFieldName": false,
                "dataFieldName": "Name"
            }
        ]
    }
}
```
