---
title: "replace_workspace_shares"
method: PUT
path: "/v1/workspaces/{workspace_id}/shares"
tags: ["workspaces"]
---

# replace_workspace_shares

`PUT /v1/workspaces/{workspace_id}/shares`

## Request

- Base URL: `https://ndi-api.nace.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://ndi-api.nace.ai/v1/workspaces/{workspace_id}/shares`
- Auth: API key in header `X-API-Key`
- TypeScript: <https://skmtc.dev/nace/apis/ndi-service/docs/v1/workspaces/:workspace_id/shares/put.ts> (a function with typed inputs; its response is checked against the schema)

Replace the complete explicit share set in one atomic write.

## Path parameters

- `workspace_id` string, uuid, required: Workspace identifier.

## Request body

- ReplaceWorkspaceSharesRequest: The complete explicit share set that should remain after this request.
  - `user_ids` string[]: Complete set of console users who should have explicit access; send an empty list to remove every share.

## Response `200`

Successful Response

- WorkspaceShares: The owner and explicit users who may access one workspace.
  - `workspace_id` string, uuid, required: Workspace whose sharing configuration this response describes.
  - `owner_user_id` string, uuid, nullable, required: Console user who owns the workspace, or null for an organization-owned integration workspace.
  - `user_ids` string[], required: Console users with explicit access to the workspace; excludes the owner.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `402`: Payment Required
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `410`: Gone
- `413`: Request Entity Too Large
- `422`: Unprocessable Entity
- `424`: Failed Dependency
- `429`: Too Many Requests
- `500`: Internal Server Error
- `501`: Not Implemented
- `503`: Service Unavailable
- `504`: Gateway Timeout

---

[API](https://skmtc.dev/nace/apis/ndi-service.md) - [All operations](https://skmtc.dev/nace/apis/ndi-service/llms.txt) - [OpenAPI document](https://skmtc.dev/nace/apis/ndi-service/revisions/d9d1f8ec2207?raw)
