---
title: "Set a model's sharing config"
method: PUT
path: "/v2/models/{model_id}/sharing"
tags: ["Model Sharing"]
---

# Set a model's sharing config

`PUT /v2/models/{model_id}/sharing`

Persists the project sharing config for a workspace model. Exactly one sharing mode must be set (all_projects / selected).

## Path parameters

- `model_id` string, required

## Request body

- Sharing — Sharing controls where a workspace-owned entity is visible and what consuming projects may do with it. Entities adopt it as one branch of a `oneof scope { string project_id; Sharing sharing; }` union: project-owned entities carry project_id, workspace-owned entities carry sharing. Reads for project-scoped callers include entities shared with their projects; mutation of workspace-owned entities is reserved for management keys / workspace admins.
  - `all_projects` SharingAllProjects
  - `selected` SharingSelectedProjects
    - `project_ids` string[] — An empty list is valid and means "shared with no project" — the model stays in the workspace catalog but no project-scoped caller can use it (admins/workspace-wide callers still can). The UI surfaces this as "Custom" with every project toggled off.
  - `allow_version_pin` boolean — Consuming projects may pin a specific version instead of tracking latest. Enforcement lives with the consuming reference.
  - `allow_fork` boolean — Projects may duplicate this entity into a detached project-owned copy.
  - `auto_grant_new_projects` boolean — New projects created after this sharing config is applied should receive access automatically. Enforcement lives with project creation and entity-specific adoption code.

## Response `200`

OK

- SetModelSharingResponse
  - `model_id` string
  - `sharing` Sharing — Sharing controls where a workspace-owned entity is visible and what consuming projects may do with it. Entities adopt it as one branch of a `oneof scope { string project_id; Sharing sharing; }` union: project-owned entities carry project_id, workspace-owned entities carry sharing. Reads for project-scoped callers include entities shared with their projects; mutation of workspace-owned entities is reserved for management keys / workspace admins.
    - `all_projects` SharingAllProjects
    - `selected` SharingSelectedProjects
      - `project_ids` string[] — An empty list is valid and means "shared with no project" — the model stays in the workspace catalog but no project-scoped caller can use it (admins/workspace-wide callers still can). The UI surfaces this as "Custom" with every project toggled off.
    - `allow_version_pin` boolean — Consuming projects may pin a specific version instead of tracking latest. Enforcement lives with the consuming reference.
    - `allow_fork` boolean — Projects may duplicate this entity into a detached project-owned copy.
    - `auto_grant_new_projects` boolean — New projects created after this sharing config is applied should receive access automatically. Enforcement lives with project creation and entity-specific adoption code.

## Changes

> 201 revisions in range; 67 not diffed.

- **2026-07-17** `2f27caf6888c` — 1 info
  - endpoint added
- **2026-07-16** `bee257c5b248` — 1 breaking
  - api path removed without deprecation
- **2026-07-16** `801f61a5a056` — 1 info
  - endpoint added
- **2026-07-16** `42d5d2062527` — 1 breaking
  - api path removed without deprecation
- **2026-07-10** `8ecb8a66eb1d` — 1 info
  - endpoint added

[Full history](https://skmtc.dev/orq-ai/apis/orq-ai-api/changes/v2/models/:model_id/sharing/put.md)

---

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