> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Credential Templates

> Create Verifiable Credential templates with a single API call

A Verifiable Credential template is equivalent to an NFT collection. Similar to how a NFT collection groups NFTs together, a Verifiable Credential template references the credential type and additional credential configurations that credentials adhere to. Every Verifiable Credential must belong to a template.

When defining a template, the issuer initially specifies a **credentials** object. Within that the following needs to be provided:

* **type** (required): A credential's private data schema is referred to as "type". Types act as a protective measure, preventing the addition of unauthorized fields and, as a result, the tampering of the Verifiable Credential. You can [define your own](/minting/verifiable-credentials/integrate/create-credential-types).

* **encryption** (required): The method chosen to protect the credential's private data. If set to `none` the credential's private data will be stored in plain text. To encrypt and protect the credential's private data, read about the supported [encryption modalities](/minting/verifiable-credentials/integrate/encrypt-credentials).

* **storage** (required): The location where credentials defined by this template will be stored. Such storage can be on Crossmint, another company's database, or decentralized storage. Read about the supported [storage modalities](/minting/verifiable-credentials/integrate/store-credentials).

The template issuer must then specify the template's public metadata:

* **metadata** (required): A template's public name, description and imageUrl. Name is required, while the other attributes are optional.

Finally, the issuer provides information on:

* **chain** (required): The blockchain where the credential's contract and associated NFTs will be registered. Verifiable Credentials supports all EVM chains. Interested in launching your verifiable credentials on a specific blockchain? [Get in touch](https://www.crossmint.com/contact/sales).

* **delegatedSignature** (optional): A non-custodial wallet of choice to be used for signing credential issuance. By default, the issuer's Crossmint-managed custodial wallet will be used. Read more about delegated signatures [here](/minting/verifiable-credentials/integrate/delegated-signatures).

## 1. Create a Credential Template

To issue a Verifiable Credential you have to first create the template that this credential will adhere to. You can do so via a single API call (requires the API key scope `templates.create`):

```javascript createTemplate.js theme={null}
const myApiKey = "<YOUR_API_KEY>"; // Replace with key from step 2

const templateParams = {
    credentials: {
        type: "crossmint:5fe6040e-07a1-48bb-97a3-b588a7e927d2:CourseCompletionCertificate",
        encryption: "none",
        storage: "crossmint",
    },
    metadata: {
        name: "Satoshi University Credentials",
        description: "Credentials accredited by Satoshi University",
        imageUrl: "https://picsum.photos/400",
    },
    chain: "polygon-amoy",
};

const options = {
    method: "POST",
    headers: {
        "X-API-KEY": myApiKey,
        "Content-Type": "application/json",
    },
    body: JSON.stringify(templateParams),
};

fetch("https://staging.crossmint.com/api/v1-alpha1/credentials/templates/", options)
    .then((response) => response.json())
    .then((response) => console.log(JSON.stringify(response)))
    .catch((err) => console.error(err));
```

The template's metadata will be used by default for the NFT metadata, unless explicitly set when issuing a new credential.

## 2. Check the status of your template

It takes a few seconds (up to a minute, depending on the blockchain and how congested it is) to deploy a template.

To check the template's status, you will need the `nfts.create` API scope and run the following code.

```typescript checkTemplateStatus.js theme={null}
const templateId = "<YOUR_TEMPLATE_ID>";
const options = { method: "GET", headers: { "X-API-KEY": "<YOUR_API_KEY>" } };

fetch(`https://staging.crossmint.com/api/2022-06-09/actions/${templateId}`, options)
    .then((response) => response.json())
    .then((response) => console.log(response))
    .catch((err) => console.error(err));
```

<CardGroup cols={2}>
  <Card title="API Reference" icon="terminal" color="#B56710" href="/api-reference/verifiable-credentials/templates/create-template">
    Test any API in seconds directly from the docs.
  </Card>

  <Card title="Talk to an expert" icon="message" iconType="duotone" color="#ADD8E6" href="https://www.crossmint.com/contact/sales">
    Contact our sales team for support.
  </Card>
</CardGroup>
