{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/creavily/json-schema/creavily-channel-account-patch-request-schema.json",
  "title": "ChannelAccountPatchRequest",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/creavily-openapi.json#/components/schemas/ChannelAccountPatchRequest",
  "type": "object",
  "properties": {
    "organizationId": {
      "type": "string",
      "minLength": 1
    },
    "brandId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "displayName": {
      "type": "string",
      "minLength": 1
    },
    "handle": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "not_connected",
        "connecting",
        "in_between_steps",
        "connected",
        "expiring",
        "refresh_needed",
        "reconnect_required",
        "disabled",
        "deleted"
      ]
    },
    "tokenExpiresAt": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ]
    },
    "additionalSettings": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "organizationId"
  ],
  "anyOf": [
    {
      "required": [
        "brandId"
      ]
    },
    {
      "required": [
        "displayName"
      ]
    },
    {
      "required": [
        "handle"
      ]
    },
    {
      "required": [
        "state"
      ]
    },
    {
      "required": [
        "tokenExpiresAt"
      ]
    },
    {
      "required": [
        "additionalSettings"
      ]
    }
  ]
}