---
title: "Revokes an API token"
method: PUT
path: "/api/v1/apitoken/{tokenId}/revoke"
tags: ["API Token"]
---

# Revokes an API token

`PUT /api/v1/apitoken/{tokenId}/revoke`

Revokes a token by its identifier.

 Returned entity contains the property `revoked`, whose value is an object representing the revoked token.

## Path parameters

- `tokenId` string, required

## Response `200`

Token revoked successfully

- ResponseEntityMapView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` object
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `400` — Bad request
- `401` — Invalid user
- `403` — Forbidden
- `404` — Token not found
- `500` — Unexpected server error

---

[API](https://skmtc.dev/jostens/apis/dotcms-rest-api.md) · [All operations](https://skmtc.dev/jostens/apis/dotcms-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jostens/dotcms-rest-api/revisions/a088fe9f515c/schema)
