---
title: "Create Protected Workspace"
method: POST
path: "/api/workspace/create_protected"
tags: ["workspace"]
---

# Create Protected Workspace

`POST /api/workspace/create_protected`

Create a new workspace with encryption and access controls.
Sets up vector storage and associates the creator as the initial workspace user.

Server generates the workspace symmetric key and wraps it with the user's public key.
The wrapped key is returned in the response for client-side storage.

Public workspaces are visible to all users and grant non-members limited access:
- Non-members can view shared documents and tags
- Non-members can create conversations and send messages
- Only members can upload documents
- Only members can see the member list

Only users with developer flag can create public workspaces.

## Request body

- WorkspaceCreateRequest
  - `name` string, required
  - `description` string, nullable
  - `is_public` boolean

## Response `200`

Successful Response

- WorkspaceResponse
  - `external_id` string, required
  - `name` string, required
  - `description` string, nullable, required
  - `is_public` boolean, required
  - `created_by_ext_id` string, required
  - `updated_by_ext_id` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `wrapped_key` string, nullable
  - `shared_conversation_count` integer
  - `private_conversation_count` integer
  - `shared_document_count` integer
  - `private_document_count` integer
  - `user_files_mb` number
  - `users` WorkspaceUserResponse[]
    - `user` UserResponse, required — Standard user representation used across all endpoints. Used for: login response, workspace users, contacts (when registered).
      - `external_id` string, required
      - `email` string, required
      - `given_name` string, required
      - `family_name` string, required
      - `picture` string, nullable
      - `encryption_public_key` string, required
    - `role` 'owner' | 'collaborator' | 'guest', required — Role of a user within a workspace.
    - `joined_at` string, date-time, required
    - `conversation_count` integer
    - `document_count` integer

## Other responses

- `422` — Validation Error

## Changes

- **2026-01-17** `b91e4b449d56` — 5 breaking, 1 warning, 5 info
  - removed the required property `users/items/email` from the response with the `200` status
  - removed the required property `users/items/encryption_public_key` from the response with the `200` status
  - removed the required property `users/items/external_id` from the response with the `200` status
  - removed the required property `users/items/family_name` from the response with the `200` status
  - …7 more
- **2025-12-25** `aa4b06f8dede` — 4 breaking, 5 info
  - the response property `updated_by_ext_id` became optional for the status `200`
  - removed the required property `users/items/last_name` from the response with the `200` status
  - removed the required property `users/items/name` from the response with the `200` status
  - removed the required property `users/items/user_ext_id` from the response with the `200` status
  - …5 more
- **2025-11-03** `d6c3e911a263` — 1 info
  - added the optional property `user_files_mb` to the response with the `200` status
- **2025-10-28** `849d5e8732f6` — 6 info
  - added the optional property `private_conversation_count` to the response with the `200` status
  - added the optional property `private_document_count` to the response with the `200` status
  - added the optional property `shared_conversation_count` to the response with the `200` status
  - added the optional property `shared_document_count` to the response with the `200` status
  - …2 more
- …earlier changes not shown

[Full history](https://skmtc.dev/arbicity/apis/arbi/changes/api/workspace/create_protected/post.md)

---

[API](https://skmtc.dev/arbicity/apis/arbi.md) · [All operations](https://skmtc.dev/arbicity/apis/arbi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/arbicity/arbi/revisions/1f956ac3d1c1/schema)
