---
title: "Rename user api key"
method: PATCH
path: "/api/v1/user/apikey/{id}"
tags: ["User"]
---

# Rename user api key

`PATCH /api/v1/user/apikey/{id}`

## Request

- Base URL: `https://api.intheloop.io`
- URL: `https://api.intheloop.io/api/v1/user/apikey/{id}`
- Auth: API key in header `Authorization`

## Path parameters

- `id` string, required

## Query parameters

- `name` string

## Headers

- `Authorization` string

## Response `200`

OK

- ApiKeyToken: api key token
  - `id` string: Api key id
  - `name` string: Name of api key token
  - `endOfJwtToken` string: End of jwt token
  - `validUntil` string, date-time, required: Valid until
  - `accessScopes` AccessScope[]: list of access scope
    - `id` string: Id access scope
    - `type` 'All' | 'Settings' | 'Command' | 'Self' | 'Report', required: AccessScopeType

## Other responses

- `400`: Bad request. Check fields message and error code from response body for additional information.
- `401`: Unauthorized request. Check fields message and error code from response body for additional information.
- `429`: Too many requests. Check response header Retry-After indicating how long to wait before making a new request.
- `451`: Unavailable because account is not verified.

---

[API](https://skmtc.dev/intheloop/apis/loop-api.md) - [All operations](https://skmtc.dev/intheloop/apis/loop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/intheloop/apis/loop-api/revisions/0892c5ba0787?raw)
