{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lynx/json-schema/lynx-email-related-person-request-schema.json",
  "title": "EmailRelatedPersonRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lynx-relatedpersons-api-openapi.yml#/components/schemas/EmailRelatedPersonRequest",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/EmailRelatedPersonData"
    },
    "idempotency": {
      "$ref": "#/$defs/Idempotency"
    }
  },
  "required": [
    "data",
    "idempotency"
  ],
  "$defs": {
    "BaseMember": {
      "type": "object",
      "properties": {
        "clientMemberId": {
          "type": "string",
          "description": "Unique client-side identifier for the member"
        }
      },
      "required": [
        "clientMemberId"
      ]
    },
    "ClientOrgDto": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the client organization"
        }
      },
      "required": [
        "name"
      ]
    },
    "EmailDto": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Auto-generated type for the email address"
        },
        "typeDescription": {
          "type": "string",
          "description": "Client-defined description for the email address"
        },
        "emailAddress": {
          "type": "string",
          "description": "Email address - any notifications will be sent to this email address"
        },
        "primaryIndicator": {
          "type": "boolean",
          "description": "Determines whether this is a primary email address"
        }
      },
      "required": [
        "emailAddress"
      ]
    },
    "EmailRelatedPersonData": {
      "type": "object",
      "properties": {
        "clientOrg": {
          "$ref": "#/$defs/ClientOrgDto",
          "description": "The name of the client organization"
        },
        "member": {
          "$ref": "#/$defs/BaseMember",
          "description": "Unique client-side identifier for the member"
        },
        "relatedPerson": {
          "$ref": "#/$defs/RelatedPersonEmailDto",
          "description": "The related person which will be associated to the member"
        }
      },
      "required": [
        "clientOrg",
        "member",
        "relatedPerson"
      ]
    },
    "Idempotency": {
      "type": "object",
      "properties": {
        "idempotencyKey": {
          "type": "string",
          "description": "Unique identifier that represents the operation"
        }
      }
    },
    "RelatedPersonEmailDto": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier for the related person"
        },
        "emails": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmailDto"
          }
        }
      },
      "required": [
        "emails",
        "id"
      ]
    }
  }
}