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

# Card Creation Via Endpoint

You can create a new card (both **plastic and virtual**) via ia the [Create Card Endpoint](https://nextgen-docs.enfuce.com/api/cards/post-card/create-card).

## Configurations

In your endpoint request, you can specify the following configurations:

* **Program ID** (`programId`)<Badge color="red">required</Badge>: Specify the program ID that your customer onboarding manager has provided.

<Info><p>We create a card program for you, based on your business requirements. Each program is identified by a unique identifier (`programId`) — your customer onboarding manager would provide you with environment specific programs IDs; the program ID for the sandbox environment is different from the production environment.</p> <p>A program includes a set of pre-configured rules that determine a card's behaviour. For example, whether a card would be credit, debit, or prepaid card. The program comprises a set of parameters that determine the card’s features, lifecycle, and interactions with other systems.</p></Info>

* **Configuration Code** (`cardConfigurationCode`)<Badge color="red">required</Badge>: Specify the unique identifier of the Enfuce-configured card setup. Your customer onboarding manager would share with you the configuration code; an example is `GIFTCARD_SUMMAR_1`.

* **Account ID** <Badge color="red">required</Badge>: Specify the unique identifier of the account that you must associate with the card — `accountId`.

* **Cardholder ID** (`cardholderId`): Specify the unique identifier of the cardholder that you want to associate with the card.

* **Expiration Date and Time** (`expirationTime`): Specify the expiration date and time in UTC format.

* **PIN**: In the `pinStatus` parameter, you can specify any of the following:

  * `GENERATED`: Creates a random PIN for the card
  * `WAITING`: Manually set the PIN later.

  Unless the PIN is set, a card cannot be included in the embossing file for printing. Once you set the PIN, the `pinStatus` is changed to `SET`, and the card is sent to the manufacturer for printing.

* **Plastic Card**: If you want to create a **physical card**, you can specify values for the `plastic` data object. For example, you can specify the **card delivery address** (`preferredCardAddress`) and **method** (`preferredCardDeliveryTyp`).

<Note>
  <ul>
    <li>If you are creating a virtual card, **DO NOT** enter any values for the `pinStatus` parameter and the `plastic` object. </li>
    <li>You can create a plastic card without any initial cardholder association. You can add the association later, when you update the card via the [Partially Update Card Endpoint](https://nextgen-docs.enfuce.com/api/cards/patch-card/partial-update-card).</li>
    <li>This list of configurations is not exhaustive. Apart from the required parameters, you can specify additional values in the endpoint request to define the card's behaviour and appearance.</li>
    <li>The program ID includes default values for `expirationTime`, `automaticRenewal` and `plastic.manufacturerId` — while you are sending a request via the [Create Card Endpoint](https://nextgen-docs.enfuce.com/api/cards/post-card/create-card), you can override these values .</li>
  </ul>
</Note>
