---
title: "Enable or disable API key (enableApiKey)"
method: PUT
path: "/api/apiKey/{id}/enabled/{enabledValue}"
tags: ["api-key-controller"]
---

# Enable or disable API key (enableApiKey)

`PUT /api/apiKey/{id}/enabled/{enabledValue}`

Updates api key with enabled = true/false. 

Available for any authorized user.

## Path parameters

- `id` string, uuid, required
- `enabledValue` boolean, required

## Response `200`

OK

- ApiKeyInfo — A JSON value representing the Api Key token.
  - `id` ApiKeyId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'API_KEY', required — string
  - `createdTime` integer — Entity creation timestamp in milliseconds since Unix epoch
  - `tenantId` TenantId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT', required — string
  - `userId` UserId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'USER', required — string
  - `expirationTime` integer — Expiration time of the API key.
  - `description` string, required — API Key description.
  - `enabled` boolean — Enabled/disabled API key.
  - `expired` boolean — Indicates if the API key is expired based on current time. Returns false if expirationTime is 0 (no expiry).

---

[API](https://skmtc.net/thingsboard/apis/thingsboard-rest-api.md) · [All operations](https://skmtc.net/thingsboard/apis/thingsboard-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thingsboard/thingsboard-rest-api/revisions/40169ccdec5c/schema)
