Update API resource scope

PATCH /api/resources/{resourceId}/scopes/{scopeId}

Update an API resource scope (permission) for the given resource. This method performs a partial update.

Path parameters

  • resourceId string Required

    The unique identifier of the resource.

  • scopeId string Required

    The unique identifier of the scope.

application/json

Body Required

  • name string

    The updated name of the scope. It should be unique for the resource.

    Minimum length is 1, maximum length is 256.

  • description string | null

Responses

  • 200 application/json

    The updated scope.

    Hide response attributes Show response attributes object
    • id string Required

      Minimum length is 1, maximum length is 21.

    • resourceId string Required

      Minimum length is 1, maximum length is 21.

    • name string Required

      Minimum length is 1, maximum length is 256.

    • description string | null Required
    • createdAt number Required
  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

  • 404

    Not Found

  • 422

    Unprocessable Content

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