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

{
  "id": "f-pE-W1MzAOXfiHo9t3o2",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://pci-tokenization-sandbox.checkouttools.com/v1/account-updater/token/update",
    "servers": [
      {
        "url": "https://pci-tokenization-sandbox.checkouttools.com/v1/account-updater/token/update"
      }
    ],
    "name": "Update 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": "200",
        "description": "Default Response",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "TokenUpdateResponse",
            "schema": [
              {
                "name": "success",
                "kind": "required",
                "type": "boolean",
                "description": ""
              },
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/TokenUpdateResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Default Response",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "UpdateError",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/UpdateError",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "cJ1OfQ10cZXcC9UCu-u7J",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://pci-tokenization-sandbox.checkouttools.com/v1/account-updater/token/update \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"tokenAlias\": {\n     \"key\": \"\",\n     \"value\": \"\"\n     }\n     }'"
        },
        {
          "id": "WJugzAg7ryIaqzyk7e0AY",
          "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/update\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Fit86GUoAZ8w0F3IvC6nd",
          "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/update\")\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": "N-EcpBIc_gS4dy3E1x8Sl",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://pci-tokenization-sandbox.checkouttools.com/v1/account-updater/token/update\"\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": "cJ1OfQ10cZXcC9UCu-u7J"
    },
    "results": {
      "languages": [
        {
          "id": "omAw6f8FKzoGdUEQlzO7x",
          "language": "200",
          "code": "// Default Response\n{\n  \"success\": false,\n  \"message\": \"\"\n}"
        },
        {
          "id": "VaCyspX2OZ9gsU_bR4Y_B",
          "language": "400",
          "code": "// Default Response\n{\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "omAw6f8FKzoGdUEQlzO7x"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}