---
title: "PATCH /api/v1/auth/token-auth/tokens/{tokenId}"
method: PATCH
path: "/api/v1/auth/token-auth/tokens/{tokenId}"
tags: ["Token Auth"]
---

# PATCH /api/v1/auth/token-auth/tokens/{tokenId}

`PATCH /api/v1/auth/token-auth/tokens/{tokenId}`

Update token for machine identity with Token Auth

## Path parameters

- `tokenId` string, required

## Request body

- object
  - `name` string — The name of the token to update to.

## Response `200`

Default Response

- object
  - `token` object, required
    - `id` string, required
    - `accessTokenTTL` number
    - `accessTokenMaxTTL` number
    - `accessTokenNumUses` number
    - `accessTokenNumUsesLimit` number
    - `accessTokenLastUsedAt` string, date-time, nullable
    - `accessTokenLastRenewedAt` string, date-time, nullable
    - `isAccessTokenRevoked` boolean
    - `identityUAClientSecretId` string, nullable
    - `identityId` string, uuid, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
    - `name` string, nullable
    - `authMethod` string, required
    - `accessTokenPeriod` number
    - `subOrganizationId` string, uuid, nullable

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response
- `422` — Default Response
- `500` — Default Response

---

[API](https://skmtc.net/infisical/apis/infisical-api.md) · [All operations](https://skmtc.net/infisical/apis/infisical-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/infisical/infisical-api/versions/885aef3e6c11/schema)
