{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/thanks-io/json-schema/thanks-io-recipient-schema.json",
  "title": "recipient",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/thanks-io-openapi.json#/components/schemas/recipient",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "readOnly": true
    },
    "mailing_list_id": {
      "type": "integer"
    },
    "name": {
      "type": "string"
    },
    "company": {
      "type": "string"
    },
    "address": {
      "type": "string"
    },
    "address2": {
      "type": "string"
    },
    "city": {
      "type": "string"
    },
    "province": {
      "type": "string",
      "description": "State or Province"
    },
    "postal_code": {
      "type": "string"
    },
    "country": {
      "type": "string"
    },
    "dob": {
      "type": "string",
      "description": "Date of Birth in ISO 8601 format (YYYY-MM-DD) or null if not set. If provided as MM/DD/YYYY in requests, it will be converted to ISO 8601 format."
    },
    "anniversary": {
      "type": "string",
      "description": "Can be used for house purchase anniversaries, move-in dates, or any recurring annual milestone.  Anniversary date in ISO 8601 format (YYYY-MM-DD) or null if not set. If provided as MM/DD/YYYY in requests, it will be converted to ISO 8601 format."
    },
    "email": {
      "type": "string"
    },
    "phone": {
      "type": "string"
    },
    "custom1": {
      "type": "string",
      "description": "Custom field for additional information about the recipient"
    },
    "custom2": {
      "type": "string",
      "description": "Custom field for additional information about the recipient"
    },
    "custom3": {
      "type": "string",
      "description": "Custom field for additional information about the recipient"
    },
    "custom4": {
      "type": "string",
      "description": "Custom field for additional information about the recipient"
    },
    "custom5": {
      "type": "string",
      "description": "Custom field for additional information about the recipient"
    },
    "custom6": {
      "type": "string",
      "description": "Custom field for additional information about the recipient"
    },
    "custom7": {
      "type": "string",
      "description": "Custom field for additional information about the recipient"
    },
    "custom8": {
      "type": "string",
      "description": "Custom field for additional information about the recipient"
    },
    "custom9": {
      "type": "string",
      "description": "Custom field for additional information about the recipient"
    },
    "custom10": {
      "type": "string",
      "description": "Custom field for additional information about the recipient"
    },
    "absentee_address": {
      "type": [
        "string",
        "null"
      ],
      "description": "The property (absentee) address the absentee image template and message variables use, or null when none is set. Mail is delivered to `address`, not here."
    },
    "mailing-list": {
      "readOnly": true,
      "allOf": [
        {
          "$ref": "#/$defs/mailing-list"
        }
      ],
      "description": "The mailing list this recipient belongs to"
    },
    "created_at": {
      "readOnly": true,
      "type": "string"
    },
    "updated_at": {
      "readOnly": true,
      "type": "string"
    }
  },
  "$defs": {
    "mailing-list": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer"
        },
        "user_id": {
          "type": "integer"
        },
        "sub_account_id": {
          "type": [
            "integer",
            "null"
          ]
        },
        "type": {
          "type": "string",
          "enum": [
            "csv",
            "manual",
            "map",
            "friends",
            "retarget",
            "leads",
            "zapier",
            "radius",
            "highlevel",
            "qrscans"
          ]
        },
        "description": {
          "type": "string"
        },
        "qrcode_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "total_recipients": {
          "type": "integer"
        },
        "processed": {
          "type": "boolean"
        },
        "is_suppression_list": {
          "type": "boolean"
        },
        "total_scans": {
          "type": "integer"
        },
        "unique_scans": {
          "type": "integer"
        },
        "last_scan": {
          "type": [
            "string",
            "null"
          ]
        },
        "total_sends": {
          "type": "integer"
        },
        "last_send": {
          "type": [
            "string",
            "null"
          ]
        },
        "api_key": {
          "type": "string",
          "description": "API key that can be used to add recipients to this mailing list with thanks.io Webhooks"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "created_at_diff": {
          "type": "string",
          "description": "Human-friendly relative time since creation"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      }
    }
  }
}