{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/athenahq-ai/json-schema/athenahq-ai-update-group-request-schema.json",
  "title": "UpdateGroupRequest",
  "description": "Request body for updating a group. At least one field must be provided.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/athenahq-ai-groups-api-openapi.yml#/components/schemas/UpdateGroupRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "description": "New name for the group."
    },
    "add_website_ids": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "description": "Website IDs to add to the group. Must belong to your organization. Websites already in the group are silently ignored."
    },
    "remove_website_ids": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "description": "Website IDs to remove from the group. IDs not currently in the group are silently ignored."
    },
    "external_id": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "description": "**Partner-only.** Partner-supplied identifier to attach to this group. Pass a non-empty string to set or replace the mapping, or `null` to clear an existing mapping. Accepted only when authenticating with an API key for an organization flagged as a partner. Sending this field as a direct customer returns `403 Forbidden`. Must be unique per resource type within your organization — setting a value already used by another group returns `409` with the existing resource in the payload."
    },
    "billing_enabled": {
      "type": "boolean",
      "description": "Set to `true` to enable billing for this group. This provisions a billing entity in the upstream billing provider, which is a prerequisite for setting credits on the group (a partner-only operation). Idempotent — safe to call on groups whose entity was never created or whose initial provisioning failed silently. Set to `false` to disable the flag without destroying existing billing state; credit balances and usage history are preserved. Returns `502` if the upstream billing provider fails to provision the entity — in that case the database is not modified, so the request can be retried cleanly."
    }
  }
}