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

# Approve a pending workspace device key

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

## Request

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

## Path parameters

- `workspaceId` string, required
- `deviceKeyId` string, required

## Request body

- ApproveWorkspaceDeviceKeyParams
  - `approverDeviceKeyId` string, required
  - `keysetId` string, required
  - `envelope` object, required
    - `recipientKind` 'device', required
    - `recipientId` string, required
    - `ciphertext` string, required
    - `crypto` object, required
      - `suite` 'p256-hkdf-sha256-aes-256-gcm', required
      - `keyId` string
      - `encapsulatedKey` string
      - `context` Schema0 (unresolved $ref)
  - `actorSignature` string, required
  - `keysetSignature` string, required

## Response `200`

Successful response.

- ApproveWorkspaceDeviceKeyResponse
  - `ok` true, required

## Other responses

- `400`: Request validation failed.
- `401`: Authentication is required.
- `403`: The token is not authorized.
- `404`: Workspace or device 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)
