{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://developers.impel.ai/specs/partner-data-share/v1/consumer_created.schema.json",
  "title": "consumer_created event",
  "description": "Announces a consumer the first time they appear in a dealer's shared conversations. Sent once per dealer and consumer, ahead of the messages Impel knows about for that consumer.",
  "type": "object",
  "required": [
    "event_type",
    "event_timestamp",
    "event_id",
    "client_key",
    "consumer_key",
    "consumer",
    "metadata"
  ],
  "properties": {
    "event_type": {
      "description": "Always `consumer_created` for this event.",
      "type": "string",
      "const": "consumer_created"
    },
    "event_timestamp": {
      "description": "One second before the consumer's earliest message in the share, in UTC with second precision. It is not when the consumer record was created in Impel.",
      "type": "string",
      "format": "date-time",
      "examples": [
        "2026-09-14T15:02:10Z"
      ]
    },
    "event_id": {
      "description": "Stable identifier for this event. It never changes across retries or the history file, so use it to deduplicate.",
      "type": "string",
      "format": "uuid",
      "examples": [
        "0dac927e-21ac-57a6-ae5f-450f9e9904d7"
      ]
    },
    "client_key": {
      "description": "Impel's identifier for the dealer.",
      "type": "string",
      "examples": [
        "EXAMPLEDEALER"
      ]
    },
    "consumer_key": {
      "description": "Impel's identifier for the consumer. Unique within a dealer only, so key consumers on `client_key` plus `consumer_key`.",
      "type": "string",
      "examples": [
        "CONSUMER-001"
      ]
    },
    "consumer": {
      "description": "Name and contact details. Names come from the consumer record; email, phone and address come from the lead behind the consumer's first message, so they reflect that point in time. Any of them can be absent.",
      "type": "object",
      "properties": {
        "first_name": {
          "description": "First name.",
          "type": "string",
          "examples": [
            "Jane"
          ]
        },
        "last_name": {
          "description": "Last name.",
          "type": "string",
          "examples": [
            "Doe"
          ]
        },
        "email_address": {
          "description": "Email address.",
          "type": "string",
          "examples": [
            "jane.doe@example.com"
          ]
        },
        "phone_number": {
          "description": "Phone number, as captured on the lead.",
          "type": "string",
          "examples": [
            "+15555550123"
          ]
        },
        "address_line_1": {
          "description": "Street address.",
          "type": "string",
          "examples": [
            "123 Example St"
          ]
        },
        "address_line_2": {
          "description": "Apartment, suite or unit.",
          "type": "string",
          "examples": [
            "Unit 1"
          ]
        },
        "city": {
          "description": "City.",
          "type": "string",
          "examples": [
            "Anytown"
          ]
        },
        "state": {
          "description": "State or province.",
          "type": "string",
          "examples": [
            "IL"
          ]
        },
        "postal_code": {
          "description": "Postal or ZIP code.",
          "type": "string",
          "examples": [
            "12345"
          ]
        },
        "country": {
          "description": "Country.",
          "type": "string",
          "examples": [
            "US"
          ]
        }
      }
    },
    "metadata": {
      "description": "Identifiers on your side.",
      "type": "object",
      "required": [
        "source_client_key"
      ],
      "properties": {
        "source_client_key": {
          "description": "Your dealer code for this dealer, as registered with Impel during onboarding.",
          "type": "string",
          "examples": [
            "DEALER-001"
          ]
        }
      }
    }
  }
}
