{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/getmattered/json-schema/getmattered-email-preferences-response-schema.json",
  "title": "EmailPreferencesResponse",
  "description": "Successful API response",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/getmattered-email-preferences-api-openapi.yml#/components/schemas/EmailPreferencesResponse",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/EmailPreferencesData"
    },
    "meta": {
      "$ref": "#/$defs/ResponseMetadata"
    },
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    }
  },
  "required": [
    "data",
    "success"
  ],
  "additionalProperties": false,
  "$defs": {
    "EmailPreferencesData": {
      "type": "object",
      "properties": {
        "notifyLocationFulfilled": {
          "type": "boolean",
          "description": "Receive alerts when a requested location starts showing jobs"
        },
        "notifyRoleFulfilled": {
          "type": "boolean",
          "description": "Receive alerts when a suggested role is added to the platform"
        },
        "onboarding": {
          "type": "boolean",
          "description": "Receive onboarding and tips emails"
        },
        "productUpdates": {
          "type": "boolean",
          "description": "Receive product update emails"
        },
        "reEngagement": {
          "type": "boolean",
          "description": "Receive re-engagement emails"
        },
        "unsubscribeAll": {
          "type": "boolean",
          "description": "Unsubscribe from all marketing emails"
        },
        "weeklyRecap": {
          "type": "boolean",
          "description": "Receive the weekly recap of your matches and applications"
        },
        "contactEmail": {
          "type": [
            "string",
            "null"
          ],
          "format": "email",
          "description": "Optional personal address the user added. Update mail goes here instead of an Apple private relay address."
        },
        "email": {
          "type": "string",
          "format": "email",
          "description": "User email address"
        },
        "isPrivateRelay": {
          "type": "boolean",
          "description": "True when the account email is an Apple \"Hide My Email\" relay address"
        }
      },
      "required": [
        "notifyLocationFulfilled",
        "notifyRoleFulfilled",
        "onboarding",
        "productUpdates",
        "reEngagement",
        "unsubscribeAll",
        "weeklyRecap",
        "contactEmail",
        "email",
        "isPrivateRelay"
      ],
      "additionalProperties": false
    },
    "ResponseMetadata": {
      "type": "object",
      "properties": {
        "duration": {
          "type": "number",
          "minimum": 0,
          "description": "Request duration in milliseconds"
        },
        "performance": {
          "type": "object",
          "properties": {
            "dbQueries": {
              "type": "integer",
              "minimum": 0
            },
            "totalDbTime": {
              "type": "number",
              "minimum": 0
            }
          },
          "description": "Performance metrics (preview/local only)"
        },
        "requestId": {
          "type": "string",
          "description": "Unique request identifier"
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp"
        },
        "version": {
          "type": "string",
          "description": "API version"
        }
      }
    }
  }
}