---
title: "Update resource"
method: PATCH
path: "/zones/{zoneId}/resources/{id}"
tags: ["Resources"]
---

# Update resource

`PATCH /zones/{zoneId}/resources/{id}`

Updates a Resource's configuration and metadata

## Path parameters

- `zoneId` string, required
- `id` string, required

## Request body

- IamResourceUpdate — Schema for updating an existing resource (partial update). **Warning:** Changing the `identifier` field may break existing integrations and dependencies.
  - `name` string — Human-readable name
  - `description` string, nullable — Human-readable description
  - `scopes` string[], nullable — Scopes supported by the resource (set to null to unset)
  - `identifier` string — User specified identifier, unique within the zone
  - `credential_provider_id` string, nullable — ID of the credential provider to associate with the resource (set to null to unset)
  - `application_id` string, nullable — ID of the application that provides this resource (set to null to unset)
  - `metadata` IamMetadataUpdate, nullable — Entity metadata (set to null or {} to remove metadata)
    - `docs_url` string, uri, nullable — Documentation URL (set to null to unset)

## Response `200`

A Resource is a system that exposes protected information or functionality. It requires authentication of the requesting actor, which may be a user or application, before allowing access.

- IamResource — A Resource is a system that exposes protected information or functionality. It requires authentication of the requesting actor, which may be a user or application, before allowing access.
  - `id` string, required — Unique identifier of the resource
  - `organization_id` string, required — Organization that owns this resource
  - `zone_id` string, required — Zone this resource belongs to
  - `slug` string, required — URL-safe identifier, unique within the zone
  - `identifier` string, required — User specified identifier, unique within the zone
  - `name` string, required — Human-readable name
  - `description` string, nullable — Human-readable description
  - `scopes` string[], nullable — Scopes supported by the resource
  - `credential_provider_id` string — ID of the credential provider for this resource
  - `credential_provider` IamProvider — A Provider is a system that supplies access to Resources and allows actors (Users or Applications) to authenticate.
    - `id` string, required — Unique identifier of the provider
    - `organization_id` string, required — Organization that owns this provider
    - `zone_id` string, required — Zone this provider belongs to
    - `slug` string, required — URL-safe identifier, unique within the zone
    - `name` string, required — Human-readable name
    - `description` string, nullable — Human-readable description
    - `identifier` string, required — User specified identifier, unique within the zone
    - `type` 'external' | 'keycard-vault' | 'keycard-sts'
    - `client_id` string, nullable — OAuth 2.0 client identifier
    - `client_secret_set` boolean — Indicates whether a client secret is configured
    - `protocols` object, nullable — Protocol-specific configuration
      - `oauth2` IamProviderOAuth2Protocol, nullable — OAuth 2.0 protocol configuration
        - `authorization_endpoint` string, uri, nullable
        - `token_endpoint` string, uri, nullable
        - `registration_endpoint` string, uri, nullable
        - `jwks_uri` string, uri, nullable
        - `code_challenge_methods_supported` string[], nullable
        - `scopes_supported` string[], nullable
        - `authorization_resource_enabled` boolean, nullable — Whether to include the resource parameter in authorization requests.
        - `authorization_resource_parameter` string, nullable — The resource parameter value to include in authorization requests. Defaults to "resource" when authorization_resource_enabled is true.
      - `openid` IamProviderOpenIDProtocol, nullable — OpenID Connect protocol configuration
        - `userinfo_endpoint` string, uri, nullable
    - `metadata` object, nullable — Provider metadata
    - `created_at` string, date-time, required — Entity creation timestamp
    - `updated_at` string, date-time, required — Entity update timestamp
  - `application_id` string — ID of the application that provides this resource
  - `application` IamApplication — An Application is a software system with an associated identity that can access Resources. It may act on its own behalf (machine-to-machine) or on behalf of a user (delegated access).
    - `id` string, required — Unique identifier of the application
    - `organization_id` string, required — Organization that owns this application
    - `zone_id` string, required — Zone this application belongs to
    - `slug` string, required — URL-safe identifier, unique within the zone
    - `identifier` string, required — User specified identifier, unique within the zone
    - `name` string, required — Human-readable name
    - `description` string, nullable — Human-readable description
    - `metadata` IamMetadata — Entity metadata
      - `docs_url` string, uri — Documentation URL
    - `protocols` object, nullable — Protocol-specific configuration
      - `oauth2` IamApplicationOAuth2Protocol, nullable — OAuth 2.0 protocol configuration
        - `redirect_uris` string[], nullable — OAuth 2.0 redirect URIs for this application
        - `post_logout_redirect_uris` string[], nullable — OAuth 2.0 post-logout redirect URIs for this application
    - `dependencies_count` integer, required — Number of resource dependencies
    - `traits` IamApplicationTrait[], nullable — Traits of the application
    - `created_at` string, date-time, required — Entity creation timestamp
    - `updated_at` string, date-time, required — Entity update timestamp
  - `when_accessing` string[] — List of resource IDs that, when accessed, make this dependency available. Only present when this resource is returned as a dependency.
  - `metadata` IamMetadata — Entity metadata
    - `docs_url` string, uri — Documentation URL
  - `created_at` string, date-time, required — Entity creation timestamp
  - `updated_at` string, date-time, required — Entity update timestamp

## Other responses

- `default` — Error response

## Changes

- **2026-02-06** `edd1b760a989` — 2 warning, 2 info
  - removed the optional property `credential_provider/allOf[subschema #1: Provider]/domains` from the response with the `200` status
  - removed the optional property `credential_provider/allOf[subschema #1: Provider]/metadata/internal_claims` from the response with the `200` status
  - added the optional property `credential_provider/allOf[subschema #1: Provider]/protocols/oauth2/authorization_resource_enabled` to the response with the `200` status
  - added the optional property `credential_provider/allOf[subschema #1: Provider]/protocols/oauth2/authorization_resource_parameter` to the response with the `200` status

[Change history](https://skmtc.dev/keycardai/apis/untitled-api/changes/zones/:zoneId/resources/:id/patch.md)

---

[API](https://skmtc.dev/keycardai/apis/untitled-api.md) · [All operations](https://skmtc.dev/keycardai/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/keycardai/untitled-api/revisions/e8a19729607a/schema)
