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.

Responses

  • 200 application/json

    The updated role.

    Hide response attributes Show response attributes object
    • 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.

  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Not Found

  • 422

    Unprocessable Content

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