Replace organization application roles

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/organizations/{id}/applications/{applicationId}/roles

Replace all roles associated with the application in the organization with the given data.

Path parameters

  • id string Required

    The unique identifier of the organization.

  • applicationId string Required

    The unique identifier of the application.

application/json

Body Required

  • organizationRoleIds array[string] Required

    An array of role IDs to replace existing roles.

    Minimum length of each is 1.

Responses

  • 204

    The roles were replaced successfully.

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 422

    The roles could not be replaced. Some of the roles may not exist.

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