---
title: "Change a member policy assignment"
method: PUT
path: "/guardrails/policies/assignments/members/{member_id}"
tags: ["Guardrail Policies"]
---

# Change a member policy assignment

`PUT /guardrails/policies/assignments/members/{member_id}`

## Request

- Base URL: `https://openrouter.ai/api/v1`
- URL: `https://openrouter.ai/api/v1/guardrails/policies/assignments/members/{member_id}`
- Auth: HTTP bearer

Assign or unassign one policy for a member. Fails with 409 when `expected_assignment` no longer matches the stored state. [Management key](/docs/guides/overview/auth/management-api-keys) required.

## Path parameters

- `member_id` string, required: Organization member user ID

## Request body

- ChangeGuardrailPolicyAssignmentRequest
  - `assigned` boolean, required: `true` assigns the policy to the subject, `false` removes it
  - `expected_assignment` intersection, required: The assignment state last read for the subject. The request fails with 409 if it changed since.
    - [`GuardrailPolicyAssignmentState`](https://skmtc.dev/openrouterteam/apis/openrouter-api/revisions/f797e38f23b4/schema?at=%2Fcomponents%2Fschemas%2FGuardrailPolicyAssignmentState)
  - `policy_id` string, uuid, required: Policy ID
  - `policy_type` 'budget' | 'model_availability' | 'moderation' | 'rate_limit', required: Policy type the assignment is read or changed for
  - `workspace_id` string, uuid: Workspace the policy belongs to. Required for an organization management key; a workspace-scoped key defaults to its own workspace and gets 403 for any other.

## Response `200`

Assignment changed

- ChangeGuardrailPolicyAssignmentResponse
  - `data` boolean, required: Whether the assignment changed

## Other responses

- `400`: Bad Request - Invalid request parameters or malformed input
- `401`: Unauthorized - Authentication required or invalid credentials
- `403`: Forbidden - Authentication successful but insufficient permissions
- `404`: Not Found - Resource does not exist
- `409`: Conflict - Resource conflict or concurrent modification
- `500`: Internal Server Error - Unexpected server error

## Changes

- **2026-11-11** `5aee117d1dca`: 1 info
  - the request property `workspace_id` became optional
- **2026-11-06** `02121928ccaf`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openrouterteam/apis/openrouter-api/changes/guardrails/policies/assignments/members/:member_id/put.md)

---

[API](https://skmtc.dev/openrouterteam/apis/openrouter-api.md) - [All operations](https://skmtc.dev/openrouterteam/apis/openrouter-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openrouterteam/apis/openrouter-api/revisions/f797e38f23b4?raw)
