Assign role to applications

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
POST /api/roles/{id}/applications

Assign a role to a list of applications. The role must have the type Application.

Path parameters

  • id string Required

    The unique identifier of the role.

application/json

Body Required

  • applicationIds array[string] Required

    An array of application IDs to be assigned.

    Minimum length of each is 1.

Responses

  • 201 application/json

    The role was assigned to the applications successfully.

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Not Found

  • 422

    Unprocessable Content

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