---
title: Enroll token
slug: reference/enroll-token
docTags: 
createdAt: 2026-08-23T06:01:06.452Z
---

{
  "id": "17bOpUGz3XWytGOMTAKG0",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://pci-tokenization-sandbox.checkouttools.com/v1/account-updater/token/enroll",
    "servers": [
      {
        "url": "https://pci-tokenization-sandbox.checkouttools.com/v1/account-updater/token/enroll"
      }
    ],
    "name": "Enroll token",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "customType": "TokenOrAliasPayload",
          "schema": [
            {
              "name": "token",
              "kind": "optional",
              "type": "string",
              "description": ""
            },
            {
              "name": "tokenAlias",
              "kind": "optional",
              "type": "object",
              "description": "",
              "example": "",
              "schema": [
                {
                  "name": "key",
                  "kind": "required",
                  "type": "string",
                  "description": ""
                },
                {
                  "name": "value",
                  "kind": "required",
                  "type": "string",
                  "description": ""
                }
              ]
            }
          ],
          "modelRef": "#/components/schemas/TokenOrAliasPayload",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "http",
          "name": "http",
          "kind": "optional",
          "type": "http",
          "description": "<p>site_id</p><div></div><p></p>",
          "scheme": "basic"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "204",
        "description": "Default Response",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "schema": [],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Default Response",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "AccountUpdaterError",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/AccountUpdaterError",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "v7KKzMcBx6OBjrFiaenIG",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://pci-tokenization-sandbox.checkouttools.com/v1/account-updater/token/enroll \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"tokenAlias\": {\n     \"key\": \"\",\n     \"value\": \"\"\n     }\n     }'"
        },
        {
          "id": "nJ5aXn1dpZeLeIoLO5Ho3",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"tokenAlias\": {\n      \"key\": \"\",\n      \"value\": \"\"\n   }\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://pci-tokenization-sandbox.checkouttools.com/v1/account-updater/token/enroll\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "wGfiQUGFkUHVsPelrXlnh",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://pci-tokenization-sandbox.checkouttools.com/v1/account-updater/token/enroll\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"tokenAlias\": {\n      \"key\": \"\",\n      \"value\": \"\"\n   }\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "luYQlapoFZFgrChhRVnpm",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://pci-tokenization-sandbox.checkouttools.com/v1/account-updater/token/enroll\"\n\npayload = json.dumps({\n   \"tokenAlias\": {\n      \"key\": \"\",\n      \"value\": \"\"\n   }\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "v7KKzMcBx6OBjrFiaenIG"
    },
    "results": {
      "languages": [
        {
          "id": "glHsI3Rhuv0Q42WqmWBkG",
          "language": "204",
          "code": "// Default Response\n{}"
        },
        {
          "id": "IYHqAKNpkInbTHzySYVOF",
          "language": "400",
          "code": "// Default Response\n{\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "glHsI3Rhuv0Q42WqmWBkG"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}