---
type: api
title: Get a decrypted uninstall token
description: **Spaces method and path for this operation:**
url: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-get-fleet-uninstall-tokens-uninstalltokenid
resource: https://www.elastic.co/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/operation/operation-get-fleet-uninstall-tokens-uninstalltokenid
products:
  - Kibana
---

# Get a decrypted uninstall token

- Server: `https://{kibana_url}`

## Paths

- `GET` `/api/fleet/uninstall_tokens/{uninstallTokenId}`
- `GET` `/s/{space_id}/api/fleet/uninstall_tokens/{uninstallTokenId}`

- [Api key auth](/elastic/docs-builder/docs/4371/api/doc/kibana-serverless/authentication#apikeyauth)

#### Path Parameters

- `uninstallTokenId` (string)
  The ID of the uninstall token

## Description

Refer to [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) for more information.

Get one decrypted uninstall token by its ID.<br/><br/>[Required authorization] Route required privileges: fleet-agents-all.

## Responses

#### `200`

Successful response

`application/json`

- `item` (object)
  - `created_at` (string)
  - `id` (string)
  - `namespaces` ([] string · max: 100)
  - `policy_id` (string)
  - `policy_name` (string) — nullable
  - `token` (string)
#### `400`

Bad Request

`application/json`

- `attributes` (object)
- `error` (string)
- `errorType` (string)
- `message` (string)
- `statusCode` (number)
#### `404`

Not Found

## Code Examples

#### Console

```console
GET /api/fleet/uninstall_tokens/{uninstallTokenId}
```

#### curl

```curl
curl -X GET "https://{kibana_url}/api/fleet/uninstall_tokens/{uninstallTokenId}"
```

## Response Examples

#### Get uninstall token

Decrypted uninstall token for an agent policy

```json
{
  "item": {
    "created_at": "2024-01-01T00:00:00.000Z",
    "id": "token-id-1",
    "namespaces": [
      "default"
    ],
    "policy_id": "policy-id-1",
    "policy_name": "Default policy",
    "token": "CKHJsJcBqNwIRcRBNDaE"
  }
}
```

#### Generic error response

Example of a generic error response

```json
{
  "error": "Bad Request",
  "message": "An error message describing what went wrong",
  "statusCode": 400
}
```

#### Not found

No uninstall token was found with the given ID

```json
{
  "error": "Not Found",
  "message": "Uninstall Token not found with ID token-id-1",
  "statusCode": 404
}
```

