{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/reddit/json-schema/reddit-components-schema-ad-account-history-schema.json",
  "title": "AdAccountHistory",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/reddit-ad-account-history-api-openapi.yml#/components/schemas/components_schema_ad_account_history",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "cause": {
      "type": "object",
      "description": "Details on the user who made the change.",
      "additionalProperties": false,
      "properties": {
        "member_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The member's member ID.",
          "pattern": "^t2_.*"
        },
        "reddit_username": {
          "type": [
            "string",
            "null"
          ],
          "description": "The member's Reddit username."
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "description": "The member's email address."
        },
        "fullname": {
          "type": [
            "string",
            "null"
          ],
          "description": "The member's full name."
        },
        "partner_business_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The name of the [partner business](https://business.reddithelp.com/s/article/partner-sharing) the user belongs to, if any."
        },
        "changed_at": {
          "type": "string",
          "description": "When the change happened.",
          "format": "date-time"
        }
      }
    },
    "change": {
      "type": "object",
      "description": "Details on the change that was made.",
      "additionalProperties": false,
      "properties": {
        "after_value": {
          "type": [
            "string",
            "null"
          ],
          "description": "The value after the change."
        },
        "before_value": {
          "type": [
            "string",
            "null"
          ],
          "description": "The value before the change."
        },
        "entity_id": {
          "type": "string",
          "description": "The changed entity's ID."
        },
        "entity_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The changed entity's name."
        },
        "entity_type": {
          "type": "string",
          "description": "The changed entity's type.",
          "enum": [
            "AD_ACCOUNT",
            "AD",
            "AD_GROUP",
            "AUDIENCE",
            "CAMPAIGN"
          ]
        },
        "field_name": {
          "type": "string",
          "description": "The changed field's name."
        }
      }
    }
  }
}