{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aura-historia-com/json-schema/aura-historia-com-patch-access-token-data-schema.json",
  "title": "PatchAccessTokenData",
  "description": "Request body for updating access-token metadata.\nOmitted fields remain unchanged. `expires: null` clears the expiry; `name` and `scopes`\nreject null, and `scopes: []` replaces the scope set with an empty set.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aura-historia-com-user-account-api-openapi.yml#/components/schemas/PatchAccessTokenData",
  "type": "object",
  "required": [
    "accessTokenId"
  ],
  "properties": {
    "accessTokenId": {
      "type": "string",
      "description": "Unique identifier of the access token to update."
    },
    "name": {
      "type": "string",
      "maxLength": 128,
      "description": "Omit to leave unchanged. Null is invalid."
    },
    "scopes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AccessTokenScopeData"
      },
      "uniqueItems": true,
      "description": "Omit to leave unchanged. Send `[]` to empty the set; null is invalid. Aura Historia access tokens may only send a subset of the current scopes."
    },
    "expires": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Omit to leave unchanged. Send null to clear the expiration timestamp. Aura Historia access tokens cannot clear or extend an existing expiry."
    }
  },
  "$defs": {
    "AccessTokenScopeData": {
      "type": "string",
      "enum": [
        "auctions:read",
        "auctions:write",
        "listing-sources:read",
        "parties:read",
        "parties:write",
        "partnership-applications:read",
        "partnership-applications:write",
        "partnerships:read",
        "partnerships:write",
        "admin-overview:read",
        "search-filters:read",
        "notifications:read",
        "notifications:write",
        "product-listings:read",
        "product-listings:write",
        "listing-sources:write",
        "users:read",
        "users:write",
        "access-tokens:read",
        "access-tokens:write",
        "search-filters:write",
        "watchlist:read",
        "watchlist:write"
      ],
      "description": "Aura Historia access-token and OAuth scope string.\nThe value is one of the capabilities supported by the canonical access-token and OAuth flows.\n"
    }
  }
}