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

# Create Card

> This endpoint registers a new card with Thanx.

This card registration endpoint allows for direct enrollment of cards
with the Thanx platform for loyalty tracking via the credit card
networks (Visa, Mastercard, American Express). This API endpoint is
hosted by our [secure card vaulting partner](https://www.basistheory.com/security),
which allows us to proxy cards for vaulting directly with the
downstream credit card networks.

**Note that this API uses a different API URL than other Consumer API
endpoints**

* Sandbox: `https://secure.api.thanxsandbox.com/cards`
* Production: `https://secure.api.thanx.com/cards`

<Note>
  Please review proper request headers [here](/consumer/usage/headers).
</Note>

### Request Field

<ParamField body="number" type="string" required>
  The full card PAN
</ParamField>

<ParamField body="zip_code" type="string">
  The card's billing zip code
</ParamField>

### Response

<Snippet file="entities/card.mdx" />

<RequestExample>
  ```bash theme={null}
  curl https://secure.api.thanxsandbox.com/cards \
    -X POST \
    -H "Content-Type: application/json"  \
    -H "Accept-Version: v4.0" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer ${token}" \
    -H "X-ClientId: ${client_id}" 
    -d '{
      "card": {
        "number": "1234123412341234"
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response Example theme={null}
  {
    "card": {
      "id": "92b7b0dac4",
      "user_id": "weorufsdf",
      "last4": "1234",
      "type": "visa",
      "zip_code": "12345"
    }
  }
  ```
</ResponseExample>
