Update API resource

PATCH /api/resources/{id}

Update an API resource details by ID with the given data. This method performs a partial update.

Path parameters

  • id string Required

    The unique identifier of the resource.

application/json

Body Required

  • tenantId string

    Maximum length is 21.

  • name string

    The updated name of the resource.

    Minimum length is 1.

  • The updated access token TTL in seconds.

Responses

  • 200 application/json

    The updated resource.

    Hide response attributes Show response attributes object
  • Bad Request

  • Unauthorized

  • Forbidden

  • Not Found

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