Replace resource scopes for organization role

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://openapi.logto.io/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"Logto API references MCP server": {
  "url": "https://openapi.logto.io/mcp"
}
Close
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

    The unique identifier of the organization role.

application/json

Body Required

  • scopeIds array[string] Required

    An array of resource scope IDs to replace existing scopes.

    Minimum length of each is 1.

Responses

  • 204

    Resource scopes were replaced successfully.

  • 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.

PUT /api/organization-roles/{id}/resource-scopes
curl \
 --request PUT 'https://[tenant_id].logto.app/api/organization-roles/{id}/resource-scopes' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"scopeIds":["string"]}'
Request examples
{
  "scopeIds": [
    "string"
  ]
}