Update API resource roles for application

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

Update API resource roles assigned to the specified application. This will replace the existing API resource roles.

Path parameters

  • applicationId string Required

    The unique identifier of the application.

application/json

Body Required

  • roleIds array[string] Required

    An array of API resource role IDs to update for the application.

    Minimum length of each is 1.

Responses

  • 200 application/json

    The API resource roles have been updated for the application successfully.

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Not Found

  • 422

    Unprocessable Content

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