---
title: "Replace resource scopes for organization role"
method: PUT
path: "/api/organization-roles/{id}/resource-scopes"
tags: ["Organization roles"]
---

# Replace resource scopes for organization role

`PUT /api/organization-roles/{id}/resource-scopes`

Replace all resource scopes that are assigned to the specified organization role with the given resource scopes. This effectively removes all existing organization scope assignments and replaces them with the new ones.

## Path parameters

- `id` string, required

## Request body

- object
  - `scopeIds` string[], required — An array of resource scope IDs to replace existing scopes.

## Response `204`

Resource scopes were replaced successfully.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `422` — At least one of the IDs provided is invalid. For example, the resource scope ID does not exist.

---

[API](https://skmtc.net/logto/apis/logto-api-references.md) · [All operations](https://skmtc.net/logto/apis/logto-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/logto/logto-api-references/versions/a163dc77d842/schema)
