---
title: "Request a workspace device key"
method: POST
path: "/api/workspaces/{workspaceId}/enterprise/devices"
tags: ["workspaces"]
---

# Request a workspace device key

`POST /api/workspaces/{workspaceId}/enterprise/devices`

## Request

- Base URL: `https://rstream.io`
- URL: `https://rstream.io/api/workspaces/{workspaceId}/enterprise/devices`
- Auth: HTTP bearer

## Path parameters

- `workspaceId` string, required

## Request body

- CreateWorkspaceDeviceKeyParams
  - `kind` 'browser' | 'cli' | 'agent' | 'service', required
  - `label` string
  - `browserId` string
  - `publicEncryptionKey` string, required
  - `publicSigningKey` string, required
  - `webttyPublicKey` string
  - `webttyKeyId` string
  - `webttyKeyAlgorithm` 'webtty-x25519-hpke-v1' | 'webtty-p256-hkdf-sha256-aes-256-gcm-random-nonce-v1'
  - `fingerprint` string, required
  - `proofSignature` string, required

## Response `201`

Successful response.

- CreateWorkspaceDeviceKeyResponse
  - `deviceKeyId` string, required
  - `status` 'pending' | 'active' | 'revoked' | 'lost', required

## Other responses

- `400`: Request validation failed.
- `401`: Authentication is required.
- `403`: The token is not authorized.
- `404`: Workspace not found.

---

[API](https://skmtc.dev/rstream/apis/rstream-api.md) · [All operations](https://skmtc.dev/rstream/apis/rstream-api/llms.txt) · [OpenAPI document](https://skmtc.dev/rstream/apis/rstream-api/revisions/a840a2c91f22?raw)
