---
title: "Generates a new access key for a server and invalidates the old one."
method: PUT
path: "/servers/{server_id}/access-key"
tags: ["CS2 Servers"]
---

# Generates a new access key for a server and invalidates the old one.

`PUT /servers/{server_id}/access-key`

A successful request to this endpoint will also terminate the server's open WebSocket
connection, if any.

## Path parameters

- `server_id` integer, required

## Response `201`

- CreatedAccessKey
  - `access_key` string, ulid, required — an opaque access key

## Other responses

- `401`
- `404`

---

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