---
title: "RenameByToken"
slug: "renamebytoken"
abstract: "How to rename an API key with a specific token."
---
# RenameByToken

The *RenameByToken* endpoint renames an API key that is identified by its token.

| Relative Route | `/renamebytoken` |
| --- | --- |
| HTTP Verb | `PUT` |

## Header

The following header is required:

| Name | Format | Description |
| --- | --- | --- |
| `X-GQL-Token` | string | The token of the key to be renamed. |

## Request body

The request body must contain the following fields:

| Name | Description |
| --- | --- |
| `newName` | The name of the API key. |

## Response body

The response is a boolean value indicating whether the key was renamed successfully.