# API Reference (Static)

> **POST /cards**

<details>

<summary>Create a card (complete)</summary>

```
POST /cards HTTP/1.1
Host: sandbox.vgsapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 440

{
  "data": {
    "attributes": {
      "pan": "4111111111111111",
      "pan_alias": "tok_sandbox_hhyPgvvdFfFGBnyi73TfFu",
      "cvc": "123",
      "cvc_status": "active",
      "cvc_alias": "tok_sandbox_5XK62B8G2i1mTwoGR5o4tL",
      "exp_month": 4,
      "exp_year": 28,
      "cardholder": {
        "name": "<NAME>",
        "company": "A Corp, LLC",
        "address": {
          "address1": "123 Main St",
          "address2": "Suite 456",
          "address3": "Line 3",
          "address4": "Line 4",
          "city": "San Francisco",
```

</details>

<details>

<summary>Sending DPAN token and apple pay wallet</summary>

```
POST /cards HTTP/1.1
Host: sandbox.vgsapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 124

{
  "data": {
    "attributes": {
      "pan": "4111111111111111",
      "exp_month": 4,
      "exp_year": 28,
      "token_type": "dpan",
      "wallet_type": "apple_pay"
    }
  }
}
```

</details>

<details>

<summary>Sending MPAN token and apple pay wallet</summary>

```
POST /cards HTTP/1.1
Host: sandbox.vgsapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 124

{
  "data": {
    "attributes": {
      "pan": "4111111111111111",
      "exp_month": 4,
      "exp_year": 28,
      "token_type": "mpan",
      "wallet_type": "apple_pay"
    }
  }
}
```

</details>

<details>

<summary>Sending PAN token and apple pay wallet</summary>

```
POST /cards HTTP/1.1
Host: sandbox.vgsapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 124

{
  "data": {
    "attributes": {
      "pan": "4111111111111111",
      "exp_month": 4,
      "exp_year": 28,
      "token_type": "pan",
      "wallet_type": "google_pay"
    }
  }
}
```

</details>

<details>

<summary>Sending user-defined metadata</summary>

```
POST /cards HTTP/1.1
Host: sandbox.vgsapi.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 105

{
  "data": {
    "attributes": {
      "pan": "4111111111111111",
      "exp_month": 4,
      "exp_year": 28
    },
    "meta": {
      "customerID": 1234
    }
  }
}
```

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.verygoodsecurity.com/cmp/developer-resources/api/api-reference-static.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
