---
title: "Get workspace protected access for an account"
method: POST
path: "/api/workspaces/{workspaceId}/enterprise/protected-access/accounts/{userId}"
tags: ["workspaces"]
---

# Get workspace protected access for an account

`POST /api/workspaces/{workspaceId}/enterprise/protected-access/accounts/{userId}`

## Request

- Base URL: `https://rstream.io`
- URL: `https://rstream.io/api/workspaces/{workspaceId}/enterprise/protected-access/accounts/{userId}`
- Auth: HTTP bearer

## Path parameters

- `workspaceId` string, required
- `userId` string, required

## Request body

- WorkspaceProtectedAccessAccountDetailsParams
  - `deviceKeyId` string, required
  - `challenge` string, required
  - `signedAt` string, date-time, required
  - `signature` string, required
  - `userId` string, required

## Response `200`

Successful response.

- WorkspaceProtectedAccessAccountDetails
  - `account` object, required
    - `userId` string, required
    - `name` string, nullable, required
    - `email` string, email, nullable, required
    - `role` 'owner' | 'admin' | 'member' | 'viewer', required
    - `activeDeviceCount` integer, required
    - `pendingDeviceCount` integer, required
    - `lastTrustedAt` string, date-time, nullable, required
    - `lastRequestedAt` string, date-time, nullable, required
  - `devices` object[], required
    - `id` string, required
    - `userId` string, required
    - `kind` 'browser' | 'cli' | 'agent' | 'service', required
    - `status` 'pending' | 'active' | 'revoked' | 'lost', required
    - `label` string, nullable, required
    - `browserId` string, nullable, required
    - `publicEncryptionKey` string, required
    - `publicSigningKey` string, nullable, required
    - `webttyPublicKey` string, nullable, required
    - `webttyKeyId` string, nullable, required
    - `webttyKeyAlgorithm` 'webtty-x25519-hpke-v1' | 'webtty-p256-hkdf-sha256-aes-256-gcm-random-nonce-v1', nullable, required
    - `fingerprint` string, required
    - `approvedAt` string, date-time, nullable, required
    - `revokedAt` string, date-time, nullable, required
    - `lostAt` string, date-time, nullable, required
    - `lastUsedAt` string, date-time, nullable, required
    - `createdAt` string, date-time, required

## Other responses

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