---
title: "Attach one policy bundle version to the principal default workspace scope"
method: PUT
path: "/v1/policy/attachments/workspace"
tags: ["governance"]
---

# Attach one policy bundle version to the principal default workspace scope

`PUT /v1/policy/attachments/workspace`

## Request

- Base URL: `https://api.runx.ai`
- URL: `https://api.runx.ai/v1/policy/attachments/workspace`
- Auth: HTTP bearer

## Headers

- `If-Match` string

## Request body

- PutPolicyAttachmentRequest
  - `bundle_id` string, required
  - `bundle_version` string, required

## Response `200`

Stored policy attachment.

- PolicyAttachmentEnvelope
  - `status` 'success' | 'deleted', required
  - `attachment` PolicyAttachmentSummary, required
    - `principal_id` string, required
    - `scope_kind` 'workspace_default' | 'skill', required
    - `scope_ref` string
    - `bundle_id` string, required
    - `bundle_version` string, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required

## Other responses

- `400`: Validation error.
- `401`: Unauthorized.
- `404`: Referenced policy bundle not found.
- `412`: Revision precondition failed.
- `428`: Revision precondition required.

---

[API](https://skmtc.dev/runx/apis/runx-hosted-api.md) · [All operations](https://skmtc.dev/runx/apis/runx-hosted-api/llms.txt) · [OpenAPI document](https://skmtc.dev/runx/apis/runx-hosted-api/revisions/6c940d8edacc?raw)
