---
source_url: https://www.pubnub.com/docs/admin-api/get-keyset-by-id
title: Get keyset by ID
---

# Get keyset by ID

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

Retrieves a single keyset by its ID.

## Request

Example

```
{
  "name": "string",
  "type": "testing",
  "appId": "string",
  "id": "string",
  "publishKey": "string",
  "subscribeKey": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```

Example

```
{
  "statusCode": 0,
  "error": "BadRequest",
  "message": [
    "string"
  ]
}
```

Example

```
{
  "statusCode": 0,
  "error": "Unauthorized",
  "message": [
    "string"
  ]
}
```

Example

```
{
  "statusCode": 0,
  "error": "Forbidden",
  "message": [
    "string"
  ]
}
```

Example

```
{
  "statusCode": 0,
  "error": "InternalError",
  "message": [
    "string"
  ]
}
```
