> For the complete documentation index, see [llms.txt](https://firstoken.gitbook.io/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://firstoken.gitbook.io/api-docs/guides/quick-start-tokenize-a-card-via-api.md).

# Quick Start: Tokenize a Card via API

This guide walks through the minimum steps required to tokenize a credit card using the Firstoken API.

***

### Step 1: Create an API Key

1. Log in to the Sandbox Firstoken Console.
2. Navigate to **Keys** and click **Add API Key**.
3. Complete the following fields:

| Field        | Value                                             |
| ------------ | ------------------------------------------------- |
| Name         | Any identifying name (e.g., `my-first-key`).      |
| Permissions  | Select **Tokenize card(s)**.                      |
| IP Whitelist | Click **Add IP**, enter `0.0.0.0/0`, and confirm. |

4. Click **Create**. A modal displays your **API Key ID**.

> **Important:** The API Key ID is shown only once. Copy and store it immediately — it cannot be retrieved after closing this modal.

***

### Step 2: Tokenize a card

Make a `POST` request to the Simple Tokenization endpoint using your API Key ID in the `x-api-key` header.

**Endpoint**

```
POST https://api.firstoken-staging.co/v1/tokenization/simple
```

**Headers**

```
x-api-key: YOUR_API_KEY
Content-Type: application/json
```

**Request body**

```json
{
    "chd": [
        {
            "card": "4242424242424242",
            "name": "Steve Jobs",
            "exp": "01/27"
        }
    ],
    "tags": [],
    "scheme": "7"
}
```

**Response**

```json
{
    "status_code": 200,
    "status": "success",
    "desc": "Success",
    "data": {
        "tokens": [
            {
                "card": "424242******4242",
                "token": "f9f87a88-488e-4a84-b887-730b792c79f7",
                "tags": [],
                "scheme": 7,
                "created_by": {
                    "name": "API"
                },
                "status": 1,
                "createdAt": "2020-02-07T14:22:58.015Z"
            }
        ]
    }
}
```

The `token` value in the response is your permanent token. The original card number is never returned.

***

### Next steps

* View and manage your tokens from the Firstoken Console under **Tokens**.
* For the full API reference, see [Simple Tokenization](/api-docs/api-reference/permanent-tokenization/create-a-permanent-token.md).
* To transmit card data to a third party using the token, see [Proxy API](/api-docs/api-reference/proxy.md).
