Update role

PATCH /api/roles/{id}

Update role details. This method performs a partial update.

Path parameters

  • id string Required

    The unique identifier of the role.

application/json

Body Required

  • name string

    The name of the role. It should be unique within the tenant.

    Minimum length is 1, maximum length is 128.

  • Minimum length is 1, maximum length is 128.

  • isDefault boolean

Responses

  • 200 application/json

    The updated role.

    Hide response attributes Show response attributes object
    • tenantId string Required

      Maximum length is 21.

    • id string Required

      Minimum length is 1, maximum length is 21.

    • name string Required

      Minimum length is 1, maximum length is 128.

    • description string Required

      Minimum length is 1, maximum length is 128.

    • type string Required

      Values are User or MachineToMachine.

    • isDefault boolean Required
  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

  • Unprocessable Content

PATCH /api/roles/{id}
curl \
 -X PATCH https://[tenant_id].logto.app/api/roles/{id} \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"name":"string","description":"string","isDefault":true}'
Request examples
{
  "name": "string",
  "description": "string",
  "isDefault": true
}
Response examples (200)
{
  "tenantId": "string",
  "id": "string",
  "name": "string",
  "description": "string",
  "type": "User",
  "isDefault": true
}