{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Daisychain Data Sync Schema",
  "description": "Schema for all tables exported via Data Sync",
  "generated_at": "2026-05-25T07:47:40Z",
  "type": "object",
  "properties": {
    "actblue_contributions": {
      "type": "array",
      "description": "Donations received through ActBlue integration.",
      "x-group": "ActBlue",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "form_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The ActBlue form used for this contribution."
          },
          "person_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The matched supporter in your account."
          },
          "integration_id": {
            "type": "string"
          },
          "order_number": {
            "type": "string"
          },
          "refcodes": {
            "type": [
              "string",
              "null"
            ]
          },
          "custom_fields": {
            "type": [
              "string",
              "null"
            ]
          },
          "credit_card_expiration": {
            "type": [
              "string",
              "null"
            ]
          },
          "recurring_period": {
            "type": "string",
            "description": "Donation frequency: once, weekly, or monthly.",
            "enum": [
              "once",
              "weekly",
              "monthly"
            ]
          },
          "recurring_duration": {
            "type": [
              "integer",
              "null"
            ]
          },
          "ab_test_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "weekly_recurring_sunset": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "is_paypal": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "is_mobile": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "ab_test_variation": {
            "type": [
              "string",
              "null"
            ]
          },
          "text_message_option": {
            "type": "string"
          },
          "is_express": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "with_express_lane": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "express_signup": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "description": "Payment status: approved, pending, or declined.",
            "enum": [
              "approved",
              "pending",
              "declined"
            ]
          },
          "thanks_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "retry_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "recur_completed": {
            "type": [
              "integer",
              "null"
            ]
          },
          "recur_pledged": {
            "type": [
              "integer",
              "null"
            ]
          },
          "smart_boost_amount": {
            "type": [
              "integer",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "broadcast_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "message_content_variant_id": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "integration_id",
          "order_number",
          "recurring_period",
          "text_message_option",
          "status",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "form_id",
          "references": "actblue_forms.id",
          "type": "belongs_to"
        },
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        },
        {
          "column": "broadcast_id",
          "references": "broadcasts.id",
          "type": "belongs_to"
        },
        {
          "column": "message_content_variant_id",
          "references": "message_content_variants.id",
          "type": "belongs_to"
        }
      ]
    },
    "actblue_employers": {
      "type": "array",
      "description": "Employer information for ActBlue contributors (for FEC compliance).",
      "x-group": "ActBlue",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "contribution_id": {
            "type": "integer",
            "description": "The contribution this employer info belongs to."
          },
          "employer": {
            "type": [
              "string",
              "null"
            ]
          },
          "occupation": {
            "type": [
              "string",
              "null"
            ],
            "description": "Contributor's occupation."
          },
          "employer_addr_1": {
            "type": [
              "string",
              "null"
            ]
          },
          "employer_city": {
            "type": [
              "string",
              "null"
            ]
          },
          "employer_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "employer_country": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "contribution_id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "contribution_id",
          "references": "actblue_contributions.id",
          "type": "belongs_to"
        }
      ]
    },
    "actblue_entities": {
      "type": "array",
      "description": "Recipient entities/committees receiving ActBlue donations.",
      "x-group": "ActBlue",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "entity_id": {
            "type": "integer"
          },
          "fec_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "committee_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "entity_id",
          "created_at",
          "updated_at"
        ]
      }
    },
    "actblue_forms": {
      "type": "array",
      "description": "ActBlue donation form configurations.",
      "x-group": "ActBlue",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "integration_id": {
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Form name."
          },
          "kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "Form type: page, merchandise, event, embed, or autogenerated.",
            "enum": [
              "page",
              "merchandise",
              "event",
              "embed",
              "autogenerated"
            ]
          },
          "managing_entity_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "managing_entity_committee_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "owner_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "integration_id",
          "created_at",
          "updated_at"
        ]
      }
    },
    "actblue_line_items": {
      "type": "array",
      "description": "Individual line items within an ActBlue contribution (e.g., split donations to multiple recipients).",
      "x-group": "ActBlue",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "contribution_id": {
            "type": "integer",
            "description": "The contribution this line item belongs to."
          },
          "entity_id": {
            "type": "integer",
            "description": "The recipient entity/committee."
          },
          "lineitem_id": {
            "type": "integer"
          },
          "sequence": {
            "type": [
              "integer",
              "null"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Amount for this line item in cents."
          },
          "recurring_amount": {
            "type": [
              "integer",
              "null"
            ]
          },
          "paid_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "refunded_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "disbursed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "recovered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "contribution_id",
          "entity_id",
          "lineitem_id",
          "amount",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "contribution_id",
          "references": "actblue_contributions.id",
          "type": "belongs_to"
        },
        {
          "column": "entity_id",
          "references": "actblue_entities.id",
          "type": "belongs_to"
        }
      ]
    },
    "actions": {
      "type": "array",
      "description": "Tracked actions and events associated with people, such as donations, form submissions, and custom events.",
      "x-group": "People",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "account_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "The type of action (e.g., donation, signup, custom)."
          },
          "data": {
            "type": [
              "string",
              "null"
            ],
            "description": "Additional action data as JSON."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "person_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The person who performed this action."
          },
          "actblue_contribution_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Associated ActBlue contribution, if this action was a donation."
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        },
        {
          "column": "actblue_contribution_id",
          "references": "actblue_contributions.id",
          "type": "belongs_to"
        }
      ]
    },
    "addresses": {
      "type": "array",
      "description": "Physical/mailing addresses associated with people.",
      "x-group": "People",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "person_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The person this address belongs to."
          },
          "kind": {
            "type": "string"
          },
          "post_office_box": {
            "type": [
              "string",
              "null"
            ]
          },
          "street_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "extended_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "locality": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "postal_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "geo_projection": {
            "type": [
              "string",
              "null"
            ]
          },
          "primary": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether this is the person's primary address."
          },
          "geocode_precision": {
            "type": [
              "string",
              "null"
            ],
            "description": "Precision level of the geocoded coordinates.",
            "enum": [
              "rooftop",
              "street",
              "postal_code",
              "locality",
              "region",
              "country",
              "unknown"
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        }
      ]
    },
    "automation_executions": {
      "type": "array",
      "description": "Individual runs of an automation for a specific action/event. Tracks execution status and progress.",
      "x-group": "Automations",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "action_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The ID of the triggering action."
          },
          "current_step_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The step currently being executed."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "sidekiq_job_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "description": "Execution status (running, completed, etc.)."
          },
          "action_type": {
            "type": "string",
            "description": "The type of triggering action."
          },
          "automation_version_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The automation version being executed."
          },
          "skipped_reason_execution_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "person_id": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "status",
          "action_type"
        ]
      },
      "x-relationships": [
        {
          "column": "automation_version_id",
          "references": "automation_versions.id",
          "type": "belongs_to"
        },
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        },
        {
          "column": "current_step_id",
          "references": "automation_steps.id",
          "type": "belongs_to"
        },
        {
          "column": "skipped_reason_execution_id",
          "references": "automation_executions.id",
          "type": "belongs_to"
        }
      ]
    },
    "automation_steps": {
      "type": "array",
      "description": "Individual steps within an automation version, executed in order.",
      "x-group": "Automations",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "step_action_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The type of action this step performs."
          },
          "step_action_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The ID of the action configuration."
          },
          "position": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Order position within the automation."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "automation_version_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The automation version this step belongs to."
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "automation_version_id",
          "references": "automation_versions.id",
          "type": "belongs_to"
        }
      ]
    },
    "automation_versions": {
      "type": "array",
      "description": "Versioned snapshots of automation configurations. Only published versions are active.",
      "x-group": "Automations",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "integration_automatable_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "integration_automatable_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "version": {
            "type": "integer",
            "description": "Sequential version number."
          },
          "status": {
            "type": "string",
            "description": "Whether this version is draft or published."
          },
          "published_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "automation_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The automation this version belongs to."
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "version",
          "status"
        ]
      },
      "x-relationships": [
        {
          "column": "automation_id",
          "references": "automations.id",
          "type": "belongs_to"
        }
      ]
    },
    "automations": {
      "type": "array",
      "description": "Automated workflows triggered by events. Each automation has versions with defined trigger conditions and steps.",
      "x-group": "Automations",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "account_id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "Display name of the automation."
          },
          "managed_by_flow": {
            "type": "boolean",
            "description": "Whether this automation is managed by a flow node rather than standalone."
          },
          "current_version_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The currently active automation version."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "account_id",
          "name",
          "managed_by_flow",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "current_version_id",
          "references": "automation_versions.id",
          "type": "belongs_to"
        }
      ]
    },
    "broadcasts": {
      "type": "array",
      "description": "Mass message sends to targeted audiences. Tracks delivery status, scheduling, and A/B test configuration.",
      "x-group": "Messaging",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "account_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The team member who created the broadcast."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "delivery_status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Current delivery state of the broadcast."
          },
          "audience": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "audience_size": {
            "type": [
              "integer",
              "null"
            ]
          },
          "delivery_scheduled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "goal": {
            "type": [
              "string",
              "null"
            ]
          },
          "campaign_goal_configuration_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "campaign_goal_configuration_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "batch_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "expire_reply_batches": {
            "type": "boolean"
          },
          "conversation_flow_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "delivery_validation_errors": {
            "type": [
              "string",
              "null"
            ]
          },
          "subscriptions_opt_outs_count": {
            "type": "integer"
          },
          "audience_duplicates_size": {
            "type": [
              "integer",
              "null"
            ]
          },
          "percentage_of_audience_for_testing": {
            "type": [
              "number",
              "null"
            ]
          },
          "flow_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The flow used for this broadcast, if applicable."
          },
          "remaining_audience_size": {
            "type": [
              "integer",
              "null"
            ]
          },
          "reply_mode": {
            "type": "string"
          },
          "delivery_phone_number_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "tsvector": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "expire_reply_batches",
          "subscriptions_opt_outs_count",
          "reply_mode"
        ]
      },
      "x-relationships": [
        {
          "column": "flow_id",
          "references": "flows.id",
          "type": "belongs_to"
        }
      ]
    },
    "campaigns_actblue_contribution_goals": {
      "type": "array",
      "description": "ActBlue contribution goals linked to broadcasts. Configures donation tracking for campaign messages.",
      "x-group": "Messaging",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "refcode": {
            "type": [
              "string",
              "null"
            ],
            "description": "Custom refcode appended to the ActBlue URL for tracking."
          },
          "page_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "The ActBlue donation page URL."
          },
          "amount": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Suggested donation amount in cents, if configured."
          },
          "recurring": {
            "type": [
              "string",
              "null"
            ],
            "description": "Recurring donation frequency, if configured."
          },
          "express_lane": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether ActBlue Express Lane is enabled for one-click donations."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at"
        ]
      }
    },
    "campaigns_mobilize_attendance_goals": {
      "type": "array",
      "description": "Mobilize America attendance goals linked to broadcasts. Configures event signup tracking for campaign messages.",
      "x-group": "Messaging",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "mobilize_lookup_config_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The lookup configuration for lookup-type goals."
          },
          "mobilize_america_event_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The Mobilize America event for event-type goals."
          },
          "kind": {
            "type": [
              "string",
              "null"
            ],
            "description": "Goal type: event, lookup, or timeslot_conversation."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "mobilize_america_event_timeslot_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The specific event timeslot for timeslot_conversation-type goals."
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "mobilize_america_event_id",
          "references": "mobilize_america_events.id",
          "type": "belongs_to"
        },
        {
          "column": "mobilize_america_event_timeslot_id",
          "references": "mobilize_america_event_timeslots.id",
          "type": "belongs_to"
        }
      ]
    },
    "conversations": {
      "type": "array",
      "description": "Individual messaging threads between the account and a person.",
      "x-group": "Messaging",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "account_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "card_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "person_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The person in this conversation."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "broadcast_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The broadcast that initiated this conversation, if applicable."
          },
          "read": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "automation_execution_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "sms_opt_outs_count": {
            "type": "integer"
          },
          "archived_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the conversation was archived, if applicable."
          },
          "archived_by_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "subscriptions_opt_outs_count": {
            "type": "integer"
          },
          "last_incoming_message_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "message_content_variant_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "automation_send_message_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "sms_keyword_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The SMS keyword that initiated this conversation, if applicable."
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "sms_opt_outs_count",
          "subscriptions_opt_outs_count"
        ]
      },
      "x-relationships": [
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        },
        {
          "column": "broadcast_id",
          "references": "broadcasts.id",
          "type": "belongs_to"
        },
        {
          "column": "message_content_variant_id",
          "references": "message_content_variants.id",
          "type": "belongs_to"
        },
        {
          "column": "automation_execution_id",
          "references": "automation_executions.id",
          "type": "belongs_to"
        },
        {
          "column": "sms_keyword_id",
          "references": "sms_keywords.id",
          "type": "belongs_to"
        }
      ]
    },
    "emails": {
      "type": "array",
      "description": "Email addresses associated with people. Each person can have multiple email addresses.",
      "x-group": "People",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "person_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The person this email belongs to."
          },
          "value": {
            "type": [
              "string",
              "null"
            ]
          },
          "primary": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether this is the person's primary email address."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        }
      ]
    },
    "flow_message_followups": {
      "type": "array",
      "description": "Follow-up actions triggered after a message is sent within a flow.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "followup_target_type": {
            "type": "string",
            "description": "Type of message being followed up (Message or SimulatedMessage)."
          },
          "followup_target_id": {
            "type": "integer",
            "description": "ID of the message being followed up."
          },
          "status": {
            "type": "string",
            "enum": [
              "enqueued",
              "pending",
              "processing",
              "cancelled",
              "completed",
              "exhausted",
              "failed"
            ]
          },
          "followup_attempts": {
            "type": "integer"
          },
          "last_processed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "next_follow_up_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "resolved_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "followup_target_type",
          "followup_target_id",
          "status",
          "followup_attempts",
          "created_at",
          "updated_at"
        ]
      }
    },
    "flow_node_automation_configurations": {
      "type": "array",
      "description": "Configuration for automation type flow nodes.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "automation_id": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "automation_id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "automation_id",
          "references": "automation_versions.id",
          "type": "belongs_to"
        }
      ]
    },
    "flow_node_automations": {
      "type": "array",
      "description": "Links between flow nodes and automation versions that execute when the node is reached.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "flow_node_id": {
            "type": "integer",
            "description": "The flow node that triggers this automation."
          },
          "flow_version_id": {
            "type": "integer",
            "description": "The flow version this link belongs to."
          },
          "automation_version_id": {
            "type": "integer",
            "description": "The automation version to execute."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "flow_node_id",
          "flow_version_id",
          "automation_version_id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "flow_node_id",
          "references": "flow_nodes.id",
          "type": "belongs_to"
        },
        {
          "column": "automation_version_id",
          "references": "automation_versions.id",
          "type": "belongs_to"
        },
        {
          "column": "flow_version_id",
          "references": "flow_versions.id",
          "type": "belongs_to"
        }
      ]
    },
    "flow_node_intelligence_configurations": {
      "type": "array",
      "description": "Configuration for AI intelligence type flow nodes.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "should_send_reply": {
            "type": "boolean"
          },
          "ai_model": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "inactivity_followup_enabled": {
            "type": "boolean"
          },
          "followup_delay_minutes": {
            "type": [
              "integer",
              "null"
            ]
          },
          "max_followups": {
            "type": [
              "integer",
              "null"
            ]
          },
          "reasoning_setting": {
            "type": "string"
          },
          "legislative_lookup_config_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "instructions_content": {
            "type": [
              "string",
              "null"
            ]
          },
          "inactivity_followup_instructions": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "should_send_reply",
          "ai_model",
          "created_at",
          "updated_at",
          "inactivity_followup_enabled",
          "reasoning_setting"
        ]
      }
    },
    "flow_node_intelligence_custom_field_configurations": {
      "type": "array",
      "description": "Custom field extraction settings for AI intelligence nodes.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "intelligence_configuration_id": {
            "type": "integer",
            "description": "The intelligence node configuration this belongs to."
          },
          "field_configuration_id": {
            "type": "integer"
          },
          "overwrite_mode": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "intelligence_configuration_id",
          "field_configuration_id",
          "overwrite_mode",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "intelligence_configuration_id",
          "references": "flow_node_intelligence_configurations.id",
          "type": "belongs_to"
        }
      ]
    },
    "flow_node_send_message_configurations": {
      "type": "array",
      "description": "Configuration for send-message type flow nodes.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "body": {
            "type": "string",
            "description": "The message template text."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "body",
          "created_at",
          "updated_at"
        ]
      }
    },
    "flow_nodes": {
      "type": "array",
      "description": "Individual nodes within a flow version. Each node represents a step in the conversation (send-message, intelligence, or automation).",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "node_type": {
            "type": "string"
          },
          "is_starting_node": {
            "type": "boolean"
          },
          "flow_version_id": {
            "type": "integer",
            "description": "The flow version this node belongs to."
          },
          "node_configuration_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "The type of node (SendMessage, Intelligence, or Automation)."
          },
          "node_configuration_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The ID of the node's configuration record."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "position_x": {
            "type": "integer"
          },
          "position_y": {
            "type": "integer"
          },
          "previous_version_node_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "description": "Whether the node is pending or active.",
            "enum": [
              "pending",
              "active"
            ]
          }
        },
        "required": [
          "id",
          "node_type",
          "is_starting_node",
          "flow_version_id",
          "created_at",
          "updated_at",
          "position_x",
          "position_y",
          "status"
        ]
      },
      "x-relationships": [
        {
          "column": "flow_version_id",
          "references": "flow_versions.id",
          "type": "belongs_to"
        },
        {
          "column": "previous_version_node_id",
          "references": "flow_nodes.id",
          "type": "belongs_to"
        }
      ]
    },
    "flow_states": {
      "type": "array",
      "description": "Tracks a conversation's current position within a flow.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "flow_version_id": {
            "type": "integer",
            "description": "The flow version being traversed."
          },
          "conversation_id": {
            "type": "integer",
            "description": "The ID of the conversation traversing the flow."
          },
          "current_node_id": {
            "type": "integer",
            "description": "The flow node the conversation is currently at."
          },
          "state_data": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "conversation_type": {
            "type": "string",
            "description": "The type of conversation (Conversation or SimulatedConversation)."
          },
          "status": {
            "type": "string",
            "description": "Whether the flow state is active or completed.",
            "enum": [
              "active",
              "completed"
            ]
          }
        },
        "required": [
          "id",
          "flow_version_id",
          "conversation_id",
          "current_node_id",
          "state_data",
          "created_at",
          "updated_at",
          "conversation_type",
          "status"
        ]
      },
      "x-relationships": [
        {
          "column": "flow_version_id",
          "references": "flow_versions.id",
          "type": "belongs_to"
        },
        {
          "column": "current_node_id",
          "references": "flow_nodes.id",
          "type": "belongs_to"
        }
      ]
    },
    "flow_transitions": {
      "type": "array",
      "description": "Connections between flow nodes defining the conversation path.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "name": {
            "type": "string"
          },
          "ai_prompt": {
            "type": [
              "string",
              "null"
            ]
          },
          "order": {
            "type": "integer"
          },
          "from_node_id": {
            "type": "integer",
            "description": "The node this transition starts from."
          },
          "to_node_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The node this transition leads to."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "name",
          "order",
          "from_node_id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "from_node_id",
          "references": "flow_nodes.id",
          "type": "belongs_to"
        },
        {
          "column": "to_node_id",
          "references": "flow_nodes.id",
          "type": "belongs_to"
        }
      ]
    },
    "flow_url_guardrail_configurations": {
      "type": "array",
      "description": "URL guardrail settings that constrain AI intelligence node responses to approved URLs.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "intelligence_configuration_id": {
            "type": "integer",
            "description": "The intelligence node configuration this guardrail belongs to."
          },
          "enabled": {
            "type": "boolean"
          },
          "allowed_url_patterns": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "intelligence_configuration_id",
          "enabled",
          "allowed_url_patterns",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "intelligence_configuration_id",
          "references": "flow_node_intelligence_configurations.id",
          "type": "belongs_to"
        }
      ]
    },
    "flow_versions": {
      "type": "array",
      "description": "Versioned snapshots of flow configurations. Only published versions are active.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "flow_id": {
            "type": "integer",
            "description": "The flow this version belongs to."
          },
          "version": {
            "type": "integer",
            "description": "Sequential version number."
          },
          "status": {
            "type": "string",
            "description": "Whether this version is draft or published."
          },
          "published_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "published_version": {
            "type": [
              "integer",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "start_position_x": {
            "type": [
              "integer",
              "null"
            ]
          },
          "start_position_y": {
            "type": [
              "integer",
              "null"
            ]
          },
          "end_position_x": {
            "type": [
              "integer",
              "null"
            ]
          },
          "end_position_y": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "flow_id",
          "version",
          "status",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "flow_id",
          "references": "flows.id",
          "type": "belongs_to"
        }
      ]
    },
    "flows": {
      "type": "array",
      "description": "Conversational flows that guide interactive SMS/messaging experiences.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "name": {
            "type": "string",
            "description": "Display name of the flow."
          },
          "account_id": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "flow_states_count": {
            "type": "integer"
          }
        },
        "required": [
          "id",
          "name",
          "account_id",
          "created_at",
          "updated_at",
          "flow_states_count"
        ]
      }
    },
    "flows_custom_field_captures": {
      "type": "array",
      "description": "Custom field values captured during flow conversations.",
      "x-group": "People",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "person_id": {
            "type": "integer",
            "description": "The person whose custom field was captured."
          },
          "field_identifier": {
            "type": "string"
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "description": "The captured value."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "field_configuration_id": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "person_id",
          "field_identifier",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        }
      ]
    },
    "flows_customizable_contents": {
      "type": "array",
      "description": "Customizable content blocks within flows for personalized messaging.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "account_id": {
            "type": "integer"
          },
          "flow_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "kind": {
            "type": "string"
          },
          "content": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "account_id",
          "kind",
          "content",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "flow_id",
          "references": "flows.id",
          "type": "belongs_to"
        }
      ]
    },
    "flows_scheduled_conversation_resumptions": {
      "type": "array",
      "description": "Scheduled future resumptions of paused flow conversations.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "node_id": {
            "type": "integer",
            "description": "The flow node where the conversation will resume."
          },
          "conversation_id": {
            "type": "integer"
          },
          "resume_at": {
            "type": "string",
            "format": "date-time"
          },
          "sidekiq_jid": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "conversation_type": {
            "type": "string"
          },
          "incoming_message_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "canceled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "incoming_message_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "executed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "node_id",
          "conversation_id",
          "resume_at",
          "created_at",
          "updated_at",
          "conversation_type"
        ]
      },
      "x-relationships": [
        {
          "column": "node_id",
          "references": "flow_nodes.id",
          "type": "belongs_to"
        }
      ]
    },
    "flows_simulated_conversations": {
      "type": "array",
      "description": "Test/preview conversations for flow development and QA.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "flow_id": {
            "type": "integer",
            "description": "The flow being simulated."
          },
          "person_id": {
            "type": "integer"
          },
          "account_id": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "flow_id",
          "person_id",
          "account_id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "flow_id",
          "references": "flows.id",
          "type": "belongs_to"
        },
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        }
      ]
    },
    "flows_simulated_messages": {
      "type": "array",
      "description": "Messages within simulated flow conversations.",
      "x-group": "Flows",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "simulated_conversation_id": {
            "type": "integer",
            "description": "The simulated conversation this message belongs to."
          },
          "previous_message_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "body": {
            "type": [
              "string",
              "null"
            ],
            "description": "The message text content."
          },
          "direction": {
            "type": "string",
            "description": "Whether the message was incoming or outgoing.",
            "enum": [
              "outgoing",
              "incoming"
            ]
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "error_code": {
            "type": [
              "integer",
              "null"
            ]
          },
          "flow_node_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "needs_reply": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "simulated_conversation_id",
          "direction",
          "created_at",
          "updated_at",
          "needs_reply"
        ]
      },
      "x-relationships": [
        {
          "column": "simulated_conversation_id",
          "references": "flows_simulated_conversations.id",
          "type": "belongs_to"
        },
        {
          "column": "previous_message_id",
          "references": "flows_simulated_messages.id",
          "type": "belongs_to"
        },
        {
          "column": "flow_node_id",
          "references": "flow_nodes.id",
          "type": "belongs_to"
        }
      ]
    },
    "fundraise_up_campaigns": {
      "type": "array",
      "description": "Fundraise Up campaign configurations.",
      "x-group": "Fundraise Up",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "integration_id": {
            "type": "string"
          },
          "external_id": {
            "type": "string",
            "description": "Fundraise Up's ID for this campaign."
          },
          "code": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Campaign name."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "integration_id",
          "external_id",
          "created_at",
          "updated_at"
        ]
      }
    },
    "fundraise_up_donations": {
      "type": "array",
      "description": "Donations received through Fundraise Up integration.",
      "x-group": "Fundraise Up",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "integration_id": {
            "type": "string"
          },
          "person_id": {
            "type": "integer",
            "description": "The matched supporter in your account."
          },
          "campaign_id": {
            "type": "integer",
            "description": "The Fundraise Up campaign."
          },
          "fundraiser_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "recurring_plan_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The recurring plan, for recurring donations."
          },
          "amount": {
            "type": "integer",
            "description": "Donation amount."
          },
          "currency": {
            "type": "string"
          },
          "amount_in_default_currency": {
            "type": [
              "integer",
              "null"
            ]
          },
          "recurring_plan_installment": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "description": "Payment status (succeeded, failed, refunded, pending, etc.).",
            "enum": [
              "succeeded",
              "failed",
              "refunded",
              "pending",
              "retrying",
              "scheduled"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_medium": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_campaign": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_term": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_content": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": "string"
          },
          "external_receipt_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "external_refunded_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "external_failed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "external_succeeded_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "test_mode": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "integration_id",
          "person_id",
          "campaign_id",
          "amount",
          "currency",
          "status",
          "external_id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        },
        {
          "column": "campaign_id",
          "references": "fundraise_up_campaigns.id",
          "type": "belongs_to"
        },
        {
          "column": "fundraiser_id",
          "references": "fundraise_up_fundraisers.id",
          "type": "belongs_to"
        },
        {
          "column": "recurring_plan_id",
          "references": "fundraise_up_recurring_plans.id",
          "type": "belongs_to"
        }
      ]
    },
    "fundraise_up_fundraisers": {
      "type": "array",
      "description": "Individual fundraiser pages within Fundraise Up campaigns.",
      "x-group": "Fundraise Up",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "integration_id": {
            "type": "string"
          },
          "campaign_id": {
            "type": "integer",
            "description": "The campaign this fundraiser belongs to."
          },
          "external_id": {
            "type": "string",
            "description": "Fundraise Up's ID for this fundraiser."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fundraiser page name."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "integration_id",
          "campaign_id",
          "external_id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "campaign_id",
          "references": "fundraise_up_campaigns.id",
          "type": "belongs_to"
        }
      ]
    },
    "fundraise_up_recurring_plans": {
      "type": "array",
      "description": "Recurring donation plans set up through Fundraise Up.",
      "x-group": "Fundraise Up",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "integration_id": {
            "type": "string"
          },
          "person_id": {
            "type": "integer",
            "description": "The supporter with this recurring plan."
          },
          "campaign_id": {
            "type": "integer",
            "description": "The associated campaign."
          },
          "fundraiser_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "amount": {
            "type": "integer",
            "description": "Recurring donation amount."
          },
          "currency": {
            "type": "string"
          },
          "amount_in_default_currency": {
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "type": "string",
            "description": "Plan status (active, cancelled, etc.).",
            "enum": [
              "active",
              "scheduled",
              "paused",
              "retrying",
              "completed",
              "failed",
              "canceled"
            ]
          },
          "frequency": {
            "type": "string",
            "description": "How often the donation recurs.",
            "enum": [
              "daily",
              "weekly",
              "biweekly",
              "every4weeks",
              "monthly",
              "bimonthly",
              "quarterly",
              "semiannual",
              "annual"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_source": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_medium": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_campaign": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_term": {
            "type": [
              "string",
              "null"
            ]
          },
          "utm_content": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": "string"
          },
          "external_created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "external_next_installment_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "external_ended_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "test_mode": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "integration_id",
          "person_id",
          "campaign_id",
          "amount",
          "currency",
          "status",
          "frequency",
          "external_id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        },
        {
          "column": "campaign_id",
          "references": "fundraise_up_campaigns.id",
          "type": "belongs_to"
        },
        {
          "column": "fundraiser_id",
          "references": "fundraise_up_fundraisers.id",
          "type": "belongs_to"
        }
      ]
    },
    "legislative_area_collections": {
      "type": "array",
      "description": "Collections of geographic areas used to group legislative districts.",
      "x-group": "Legislative",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "name": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "name",
          "created_at",
          "updated_at"
        ]
      },
      "x-shared": true
    },
    "legislative_areas": {
      "type": "array",
      "description": "Geographic areas representing legislative districts and regions.",
      "x-group": "Legislative",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "area_collection_id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "abbreviation": {
            "type": "string"
          },
          "fips_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "region_fips_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "ocd_division_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "shape",
              "region"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "area_collection_id",
          "name",
          "abbreviation",
          "kind",
          "created_at",
          "updated_at"
        ]
      },
      "x-shared": true,
      "x-relationships": [
        {
          "column": "area_collection_id",
          "references": "legislative_area_collections.id",
          "type": "belongs_to"
        }
      ]
    },
    "legislative_factions": {
      "type": "array",
      "description": "Political parties and factions that legislators belong to.",
      "x-group": "Legislative",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "name": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "name",
          "created_at",
          "updated_at"
        ]
      },
      "x-shared": true
    },
    "legislative_legislatures": {
      "type": "array",
      "description": "Legislative bodies such as Congress, state legislatures, and city councils.",
      "x-group": "Legislative",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "name": {
            "type": "string"
          },
          "country": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "area_collection_id": {
            "type": "integer"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "minimum_lookup_precision": {
            "type": "string",
            "enum": [
              "region",
              "postcode",
              "coordinates"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "country",
          "slug",
          "area_collection_id",
          "created_at",
          "updated_at",
          "minimum_lookup_precision"
        ]
      },
      "x-shared": true,
      "x-relationships": [
        {
          "column": "area_collection_id",
          "references": "legislative_area_collections.id",
          "type": "belongs_to"
        }
      ]
    },
    "legislative_memberships": {
      "type": "array",
      "description": "Links between people, positions, and legislative periods representing who holds which office.",
      "x-group": "Legislative",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "person_id": {
            "type": "integer"
          },
          "legislative_period_id": {
            "type": "integer"
          },
          "faction_id": {
            "type": "integer"
          },
          "area_id": {
            "type": "integer"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "us_senate_class": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "1",
              "2",
              "3"
            ]
          },
          "us_senate_state_rank": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "junior",
              "senior"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "fax": {
            "type": [
              "string",
              "null"
            ]
          },
          "rss_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact_form_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "position_id": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "person_id",
          "legislative_period_id",
          "faction_id",
          "area_id",
          "start_date",
          "end_date",
          "created_at",
          "updated_at"
        ]
      },
      "x-shared": true,
      "x-relationships": [
        {
          "column": "legislative_period_id",
          "references": "legislative_periods.id",
          "type": "belongs_to"
        },
        {
          "column": "person_id",
          "references": "legislative_people.id",
          "type": "belongs_to"
        },
        {
          "column": "area_id",
          "references": "legislative_areas.id",
          "type": "belongs_to"
        },
        {
          "column": "faction_id",
          "references": "legislative_factions.id",
          "type": "belongs_to"
        },
        {
          "column": "position_id",
          "references": "legislative_positions.id",
          "type": "belongs_to"
        }
      ]
    },
    "legislative_offices": {
      "type": "array",
      "description": "Physical office locations for legislative representatives.",
      "x-group": "Legislative",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "membership_id": {
            "type": "integer"
          },
          "source_id": {
            "type": "string"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ]
          },
          "fax": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "hours": {
            "type": [
              "string",
              "null"
            ]
          },
          "address": {
            "type": [
              "string",
              "null"
            ]
          },
          "suite": {
            "type": [
              "string",
              "null"
            ]
          },
          "building": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "locality": {
            "type": [
              "string",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "postal_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "time_zone": {
            "type": [
              "string",
              "null"
            ]
          },
          "visitable": {
            "type": "boolean"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "membership_id",
          "source_id",
          "visitable",
          "created_at",
          "updated_at"
        ]
      },
      "x-shared": true,
      "x-relationships": [
        {
          "column": "membership_id",
          "references": "legislative_memberships.id",
          "type": "belongs_to"
        }
      ]
    },
    "legislative_people": {
      "type": "array",
      "description": "Elected officials and legislative representatives.",
      "x-group": "Legislative",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "official_full_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "first_name": {
            "type": "string"
          },
          "middle_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": "string"
          },
          "birth_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "bioguide_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "lis_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "govtrack_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "opensecrets_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "votesmart_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "wikidata_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "google_entity_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "facebook": {
            "type": [
              "string",
              "null"
            ]
          },
          "twitter": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "first_name",
          "last_name",
          "created_at",
          "updated_at"
        ]
      },
      "x-shared": true
    },
    "legislative_periods": {
      "type": "array",
      "description": "Time periods for legislative sessions (e.g. congressional terms).",
      "x-group": "Legislative",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "legislature_id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "start_date": {
            "type": "string",
            "format": "date"
          },
          "end_date": {
            "type": "string",
            "format": "date"
          },
          "slug": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "legislature_id",
          "name",
          "start_date",
          "end_date",
          "slug",
          "created_at",
          "updated_at"
        ]
      },
      "x-shared": true,
      "x-relationships": [
        {
          "column": "legislature_id",
          "references": "legislative_legislatures.id",
          "type": "belongs_to"
        }
      ]
    },
    "legislative_positions": {
      "type": "array",
      "description": "Legislative positions such as Senator or Representative for a specific district.",
      "x-group": "Legislative",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "area_id": {
            "type": "integer"
          },
          "legislature_id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "seat_class": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "sort_order": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "area_id",
          "legislature_id",
          "name",
          "created_at",
          "updated_at"
        ]
      },
      "x-shared": true,
      "x-relationships": [
        {
          "column": "area_id",
          "references": "legislative_areas.id",
          "type": "belongs_to"
        },
        {
          "column": "legislature_id",
          "references": "legislative_legislatures.id",
          "type": "belongs_to"
        }
      ]
    },
    "legislative_postcode_area_mappings": {
      "type": "array",
      "description": "Mappings between postcodes and legislative areas for representative lookup.",
      "x-group": "Legislative",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "postcode_id": {
            "type": "integer"
          },
          "area_id": {
            "type": "integer"
          },
          "legislative_period_id": {
            "type": "integer"
          },
          "overlap_area": {
            "type": [
              "integer",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "kind": {
            "type": "string",
            "enum": [
              "exact",
              "proportional"
            ]
          }
        },
        "required": [
          "id",
          "postcode_id",
          "area_id",
          "legislative_period_id",
          "created_at",
          "updated_at",
          "kind"
        ]
      },
      "x-shared": true,
      "x-relationships": [
        {
          "column": "postcode_id",
          "references": "postcodes.id",
          "type": "belongs_to"
        },
        {
          "column": "area_id",
          "references": "legislative_areas.id",
          "type": "belongs_to"
        },
        {
          "column": "legislative_period_id",
          "references": "legislative_periods.id",
          "type": "belongs_to"
        }
      ]
    },
    "message_content_variants": {
      "type": "array",
      "description": "A/B test content variants for broadcasts. Each variant has its own message body and can track separate delivery statistics.",
      "x-group": "Messaging",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "broadcast_id": {
            "type": "integer",
            "description": "The broadcast this variant belongs to."
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Display name of the variant."
          },
          "body": {
            "type": [
              "string",
              "null"
            ],
            "description": "The message text content for this variant."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "winner_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When this variant was marked as the A/B test winner, if applicable."
          },
          "sample_message_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "A representative message sent with this variant content."
          },
          "letter": {
            "type": [
              "string",
              "null"
            ],
            "description": "Single-letter identifier (A-Z) for the variant within its broadcast."
          },
          "initial_audience_size": {
            "type": "integer",
            "description": "Number of recipients initially assigned to this variant."
          },
          "subscriptions_opt_outs_count": {
            "type": "integer",
            "description": "Number of subscription opt-outs attributed to this variant."
          }
        },
        "required": [
          "id",
          "broadcast_id",
          "created_at",
          "updated_at",
          "initial_audience_size",
          "subscriptions_opt_outs_count"
        ]
      },
      "x-relationships": [
        {
          "column": "broadcast_id",
          "references": "broadcasts.id",
          "type": "belongs_to"
        },
        {
          "column": "sample_message_id",
          "references": "messages.id",
          "type": "belongs_to"
        }
      ]
    },
    "messages": {
      "type": "array",
      "description": "Individual SMS/MMS messages within conversations. Tracks direction, delivery status, and billing.",
      "x-group": "Messaging",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "conversation_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The conversation this message belongs to."
          },
          "subaccount_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "previous_message_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The team member who sent the message, for manual replies."
          },
          "direction": {
            "type": "string",
            "description": "Whether the message was incoming or outgoing.",
            "enum": [
              "outgoing",
              "incoming"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "Delivery status (pending, sent, delivered, failed, etc.).",
            "enum": [
              "pending",
              "accepted",
              "scheduled",
              "queued",
              "sending",
              "sent",
              "receiving",
              "received",
              "delivered",
              "undelivered",
              "failed",
              "canceled",
              "paused",
              "resumed"
            ]
          },
          "error_code": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Carrier error code if delivery failed."
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Message ID from the SMS provider."
          },
          "from": {
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "type": [
              "string",
              "null"
            ]
          },
          "body": {
            "type": [
              "string",
              "null"
            ],
            "description": "The message text content."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "subaccount_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "segment_count": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Number of SMS segments this message was split into."
          },
          "billing_kind": {
            "type": "string",
            "description": "Billing category (sms, mms, etc.).",
            "enum": [
              "sms",
              "mms",
              "charm"
            ]
          },
          "intent": {
            "type": [
              "string",
              "null"
            ]
          },
          "classified_intent": {
            "type": [
              "string",
              "null"
            ]
          },
          "segment_count_recalculated": {
            "type": [
              "integer",
              "null"
            ]
          },
          "opt_out": {
            "type": "boolean"
          },
          "accepted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "embedding": {
            "type": [
              "string",
              "null"
            ]
          },
          "potential_opt_out": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "flow_node_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The flow node that generated this message, if applicable."
          },
          "needs_reply": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "direction",
          "created_at",
          "updated_at",
          "billing_kind",
          "opt_out",
          "needs_reply"
        ]
      },
      "x-relationships": [
        {
          "column": "conversation_id",
          "references": "conversations.id",
          "type": "belongs_to"
        },
        {
          "column": "previous_message_id",
          "references": "messages.id",
          "type": "belongs_to"
        },
        {
          "column": "flow_node_id",
          "references": "flow_nodes.id",
          "type": "belongs_to"
        }
      ]
    },
    "mobilize_america_attendees": {
      "type": "array",
      "description": "Attendee RSVPs for Mobilize America events.",
      "x-group": "Mobilize America",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "mobilize_america_event_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The event this RSVP is for."
          },
          "mobilize_america_integration_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "mobilize_america_event_timeslot_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ],
            "description": "RSVP status: registered, cancelled, confirmed, or waitlisted.",
            "enum": [
              "registered",
              "cancelled",
              "confirmed",
              "waitlisted"
            ]
          },
          "attended": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "referrer_params": {
            "type": [
              "string",
              "null"
            ]
          },
          "custom_signup_field_values": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_date_in_mobilize": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "modified_date_in_mobilize": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "mobilize_america_event_id",
          "references": "mobilize_america_events.id",
          "type": "belongs_to"
        },
        {
          "column": "mobilize_america_event_timeslot_id",
          "references": "mobilize_america_event_timeslots.id",
          "type": "belongs_to"
        }
      ]
    },
    "mobilize_america_event_timeslots": {
      "type": "array",
      "description": "Time slots for Mobilize America events.",
      "x-group": "Mobilize America",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "mobilize_america_event_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The event this timeslot belongs to."
          },
          "external_id": {
            "type": "string",
            "description": "Mobilize America's ID for this timeslot."
          },
          "start_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "end_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "max_attendees": {
            "type": [
              "integer",
              "null"
            ]
          },
          "is_full": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "instructions": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "external_id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "mobilize_america_event_id",
          "references": "mobilize_america_events.id",
          "type": "belongs_to"
        }
      ]
    },
    "mobilize_america_events": {
      "type": "array",
      "description": "Events synced from Mobilize America.",
      "x-group": "Mobilize America",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "mobilize_america_integration_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": "string",
            "description": "Mobilize America's ID for this event."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Event title."
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Type of event (canvass, phone_bank, rally, etc.)."
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_virtual": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "country": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "locality": {
            "type": [
              "string",
              "null"
            ]
          },
          "postal_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "street_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "venue": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "featured_image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "high_priority": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "visibility": {
            "type": [
              "string",
              "null"
            ]
          },
          "address_visibility": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_by_volunteer_host": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "virtual_action_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact": {
            "type": [
              "string",
              "null"
            ]
          },
          "accessibility_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "accessibility_notes": {
            "type": [
              "string",
              "null"
            ]
          },
          "tags": {
            "type": [
              "string",
              "null"
            ]
          },
          "approval_status": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_campaign_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "instructions": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_date_in_mobilize": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "modified_date_in_mobilize": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "tsvector": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "external_id",
          "created_at",
          "updated_at"
        ]
      }
    },
    "notes": {
      "type": "array",
      "description": "User-created notes attached to people.",
      "x-group": "People",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "person_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The person this note is about."
          },
          "card_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "user_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The team member who created the note."
          },
          "content": {
            "type": [
              "string",
              "null"
            ],
            "description": "The note text content."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        }
      ]
    },
    "people": {
      "type": "array",
      "description": "Core supporter/contact records belonging to your account.",
      "x-group": "People",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "account_id": {
            "type": "integer"
          },
          "first_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "properties": {
            "type": [
              "string",
              "null"
            ],
            "description": "Custom field values as JSON. Keys match fields configured in Settings > People > Fields."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "assigned_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The team member (user) assigned to this person."
          },
          "last_conversation_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The most recent conversation with this person."
          }
        },
        "required": [
          "id",
          "account_id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "last_conversation_id",
          "references": "conversations.id",
          "type": "belongs_to"
        }
      ]
    },
    "person_taggings": {
      "type": "array",
      "description": "Join records linking tags to people. Each record represents one tag applied to one person.",
      "x-group": "People",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "tag_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The tag that was applied."
          },
          "person_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The person the tag was applied to."
          },
          "created_by_user_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The team member who applied the tag, if done manually."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "tag_id",
          "references": "tags.id",
          "type": "belongs_to"
        },
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        }
      ]
    },
    "phones": {
      "type": "array",
      "description": "Phone numbers associated with people. Each person can have multiple phone numbers.",
      "x-group": "People",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "person_id": {
            "type": "integer",
            "description": "The person this phone number belongs to."
          },
          "value": {
            "type": [
              "string",
              "null"
            ]
          },
          "primary": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Whether this is the person's primary phone number."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "phone_data_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "sms_opt_out_id": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "person_id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        },
        {
          "column": "sms_opt_out_id",
          "references": "sms_opt_outs.id",
          "type": "belongs_to"
        }
      ]
    },
    "postcodes": {
      "type": "array",
      "description": "Postal codes with geographic coordinates for address resolution.",
      "x-group": "Legislative",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "country": {
            "type": "string"
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "type": "string"
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "country",
          "code",
          "created_at",
          "updated_at"
        ]
      },
      "x-shared": true
    },
    "questions_answers": {
      "type": "array",
      "description": "Predefined answer options for multiple choice and dropdown questions.",
      "x-group": "Questions",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "question_id": {
            "type": "integer",
            "description": "The question this answer option belongs to."
          },
          "value": {
            "type": "string"
          },
          "position": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Display order position."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "question_id",
          "value",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "question_id",
          "references": "questions_questions.id",
          "type": "belongs_to"
        }
      ]
    },
    "questions_folders": {
      "type": "array",
      "description": "Folder hierarchy for organizing questions.",
      "x-group": "Questions",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "account_id": {
            "type": "integer"
          },
          "parent_folder_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The parent folder for nested organization."
          },
          "name": {
            "type": "string",
            "description": "Folder display name."
          },
          "identifier": {
            "type": "string"
          },
          "position": {
            "type": [
              "integer",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "account_id",
          "name",
          "identifier",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "parent_folder_id",
          "references": "questions_folders.id",
          "type": "belongs_to"
        }
      ]
    },
    "questions_groups": {
      "type": "array",
      "description": "Groups for organizing related questions together.",
      "x-group": "Questions",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "account_id": {
            "type": "integer"
          },
          "name": {
            "type": "string",
            "description": "Group display name."
          },
          "identifier": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "position": {
            "type": [
              "integer",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "account_id",
          "name",
          "identifier",
          "created_at",
          "updated_at"
        ]
      }
    },
    "questions_person_responses": {
      "type": "array",
      "description": "Individual responses from people to survey questions.",
      "x-group": "Questions",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "person_id": {
            "type": "integer",
            "description": "The person who responded."
          },
          "question_id": {
            "type": "integer",
            "description": "The question being answered."
          },
          "answer_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The selected answer option, for multiple choice/dropdown."
          },
          "value": {
            "type": [
              "string",
              "null"
            ],
            "description": "Free-text response value, for text/number/date questions."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "created_by_account_membership_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "resolved": {
            "type": "boolean"
          },
          "survey_response_id": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "person_id",
          "question_id",
          "created_at",
          "updated_at",
          "resolved"
        ]
      },
      "x-relationships": [
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        },
        {
          "column": "question_id",
          "references": "questions_questions.id",
          "type": "belongs_to"
        },
        {
          "column": "answer_id",
          "references": "questions_answers.id",
          "type": "belongs_to"
        }
      ]
    },
    "questions_questions": {
      "type": "array",
      "description": "Survey/question definitions for collecting structured data from people.",
      "x-group": "Questions",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "account_id": {
            "type": "integer"
          },
          "folder_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The folder this question is organized in."
          },
          "group_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The question group this belongs to."
          },
          "name": {
            "type": "string"
          },
          "identifier": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "type": "string",
            "description": "Question type: multiple_choice, dropdown, boolean, long_text, short_text, number, or date.",
            "enum": [
              "multiple_choice",
              "dropdown",
              "boolean",
              "long_text",
              "short_text",
              "number",
              "date"
            ]
          },
          "position": {
            "type": [
              "integer",
              "null"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "question_text": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "account_id",
          "name",
          "identifier",
          "kind",
          "required",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "folder_id",
          "references": "questions_folders.id",
          "type": "belongs_to"
        },
        {
          "column": "group_id",
          "references": "questions_groups.id",
          "type": "belongs_to"
        }
      ]
    },
    "sms_keyword_terms": {
      "type": "array",
      "description": "Individual terms/words that trigger an SMS keyword.",
      "x-group": "Messaging",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "sms_keyword_id": {
            "type": "integer",
            "description": "The SMS keyword this term belongs to."
          },
          "term": {
            "type": "string",
            "description": "The word or phrase that triggers the keyword."
          },
          "account_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "delivery_phone_number_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          }
        },
        "required": [
          "id",
          "sms_keyword_id",
          "term",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "sms_keyword_id",
          "references": "sms_keywords.id",
          "type": "belongs_to"
        }
      ]
    },
    "sms_keywords": {
      "type": "array",
      "description": "SMS keywords that trigger automated responses or flows when texted to your number.",
      "x-group": "Messaging",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "account_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "delivery_phone_number_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "response_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "The auto-reply message sent when this keyword is received."
          },
          "triggers_opt_in": {
            "type": "boolean"
          },
          "starts_new_conversation": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "flow_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The flow triggered by this keyword, if applicable."
          }
        },
        "required": [
          "id",
          "triggers_opt_in",
          "starts_new_conversation",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "flow_id",
          "references": "flows.id",
          "type": "belongs_to"
        }
      ]
    },
    "sms_opt_outs": {
      "type": "array",
      "description": "Account-level SMS opt-out records. When a phone number opts out, it applies across the account.",
      "x-group": "People",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "account_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "phone_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "The phone number that opted out."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "source_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Type of record that triggered the opt-out."
          },
          "source_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "ID of the record that triggered the opt-out."
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reason for the opt-out (e.g., keyword reply, manual, carrier)."
          },
          "message_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The message that triggered the opt-out, if applicable."
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "message_id",
          "references": "messages.id",
          "type": "belongs_to"
        }
      ]
    },
    "subscriptions": {
      "type": "array",
      "description": "Communication channel opt-in/opt-out status for each person (email, SMS, voice, postal).",
      "x-group": "People",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "person_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The person this subscription belongs to."
          },
          "subscribed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "opt_out_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "source_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "source_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "source_kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "opt_out_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reason for opt-out, if applicable."
          },
          "channel": {
            "type": "string",
            "description": "Communication channel: email, sms, voice, or postal.",
            "enum": [
              "email",
              "sms",
              "number",
              "postal"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "opt_out_source_type": {
            "type": [
              "string",
              "null"
            ]
          },
          "opt_out_source_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "phone_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "email_id": {
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "channel",
          "created_at",
          "updated_at"
        ]
      },
      "x-relationships": [
        {
          "column": "person_id",
          "references": "people.id",
          "type": "belongs_to"
        },
        {
          "column": "phone_id",
          "references": "phones.id",
          "type": "belongs_to"
        },
        {
          "column": "email_id",
          "references": "emails.id",
          "type": "belongs_to"
        }
      ]
    },
    "tags": {
      "type": "array",
      "description": "Tags/labels that can be applied to people for segmentation and organization.",
      "x-group": "People",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "description": "Primary key"
          },
          "account_id": {
            "type": [
              "integer",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "The display name of the tag."
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Record last update timestamp"
          },
          "kind": {
            "type": "string",
            "description": "The type of record this tag applies to."
          }
        },
        "required": [
          "id",
          "created_at",
          "updated_at",
          "kind"
        ]
      }
    }
  }
}