# Contact Created Webhook

Webhook event triggered when a new contact is created in iClosed.io.

## Overview

The Contact Created webhook is triggered whenever a new contact is created in your iClosed.io account. This event provides comprehensive information about the newly created contact, including their personal details, event information, tracking data, and any associated calls.

## Event Details

| Property | Value |
|  --- | --- |
| **Event Type** | `newContactCreated` |
| **Trigger** | When a contact is created through any channel (form submission, manual creation, API, etc.) |
| **Payload** | Complete contact object with all associated data |


## Webhook Payload

The HTTP body is a single JSON object (not an array). It contains the full contact object with the following structure:

```json
{
  "id": 239,
  "accountId": 4,
  "firstName": null,
  "lastName": null,
  "email": "morgan.lee@example.com",
  "phoneNumber": "+1 415 555 0192",
  "secondary_email": null,
  "secondary_phoneNumber": null,
  "status": "POTENTIAL",
  "createdAt": "2026-04-09T09:13:03.507Z",
  "previewId": "contact_We1Ztdhvcii0",
  "timeZone": "Asia/Karachi",
  "joinedTime": "2026-04-09T09:13:03.506Z",
  "country": "PK",
  "ipAddress": "::1",
  "updatedAt": "2026-04-09T09:13:03.507Z",
  "questionsAndAnswers": {},
  "contactFields": {},
  "updatedAttributes": [],
  "event": {
    "id": 2,
    "name": "Strategy intro call",
    "color": "#0099FF",
    "linkPrefix": "acme/strategy-call",
    "eventType": "STRATEGY_EVENT"
  },
  "tracking": {
    "first_utm_term": "strategy consultation",
    "first_utm_source": "google",
    "first_utm_medium": "cpc",
    "first_utm_content": "hero_cta_variant_b",
    "first_utm_campaign": "q2_2026_demo_requests",
    "utm_term": "sales scheduling software",
    "utm_source": "linkedin",
    "utm_medium": "paid_social",
    "utm_content": "carousel_ad_3",
    "utm_campaign": "b2b_outbound_apr",
    "utmKey_0": "gclid",
    "utmValue_0": "EAIaIQobChMIexampleValue123",
    "utmKey_1": "li_fat_id",
    "utmValue_1": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "utmKey_2": "referrer_domain",
    "utmValue_2": "newsletter.partner.io",
    "utmKey_3": "landing_path",
    "utmValue_3": "/events/strategy-call",
    "utmKey_4": "experiment_id",
    "utmValue_4": "exp_booking_flow_v2"
  },
  "Referrer_Url_Embed": "https://app.iclosed.io/e/acme/strategy-call",
  "previewUrl": "https://app.iclosed.io/app/global-data/contacts?preview=contact_We1Ztdhvcii0",
  "latestCall": null,
  "disqualifyingGroup": [],
  "dataIntelligence": {
    "credit": {
      "scoreLabel": null
    },
    "debtToIncome": {
      "dtiLabel": null
    },
    "qualification": {
      "leadType": null
    },
    "emailValidation": {
      "isValid": null
    },
    "phoneValidation": {
      "isValid": null,
      "country_code": null
    }
  },
  "hookType": "Contact created"
}
```

## Key Fields Explained

### Basic Contact Information

| Field | Description |
|  --- | --- |
| `id` | Unique contact identifier |
| `firstName`, `lastName` | Contact's name |
| `email` | Primary email address |
| `phoneNumber` | Primary phone number |
| `secondary_email`, `secondary_phoneNumber` | Additional contact methods |
| `status` | Contact qualification status (e.g., `"POTENTIAL"`, `"STRATEGY_CALL_BOOKED"`) |


### Event Information

The `event` object contains details about the event the contact was created from:

| Field | Description |
|  --- | --- |
| `id` | Event identifier |
| `name` | Event name |
| `linkPrefix` | Event URL prefix |
| `color` | Event color code |
| `eventType` | Type of event (e.g., `"STRATEGY_EVENT"`) |


### Questions and Answers

The `questionsAndAnswers` object contains all form responses from the contact. It includes both a numbered format (`1_question`, `1_response`, etc.) and direct key-value pairs for each question. All custom fields and form questions are included.

### Tracking Data

The `tracking` object contains UTM parameters and tracking information:

| Field | Description |
|  --- | --- |
| `utm_source`, `utm_medium`, `utm_campaign` | Marketing attribution parameters |
| `first_utm_*` | Original (first-touch) UTM parameters |
| `utmKey_*`, `utmValue_*` | Custom tracking parameters |


### Call information

`latestCall` is either an object describing the contact’s most recent scheduled call, or `null` when none exists yet.

| Field | Description |
|  --- | --- |
| `dateTime` | Scheduled call time |
| `duration` | Call duration in minutes |
| `user` | Call host information |


### Custom contact fields

`contactFields` holds custom field values keyed by field slug (shape depends on your workspace configuration).

### Data intelligence

`dataIntelligence` groups optional enrichment outputs (credit, DTI, qualification, email/phone validation). Fields are often `null` until those features are enabled and populated.

### Disqualification logic

`disqualifyingGroup` lists disqualification rule evaluations that apply to the contact. It is often an empty array on create when no rules have fired yet.

## Use Cases

This webhook is useful for:

- **CRM Integration** – Automatically create contacts in your CRM system
- **Email Marketing** – Add new contacts to email campaigns
- **Analytics** – Track contact creation sources and patterns
- **Lead Scoring** – Evaluate contact quality based on responses
- **Workflow Automation** – Trigger follow-up actions for new contacts


## Response Requirements

Your webhook endpoint should:

- Return a `2xx` status code to acknowledge receipt
- Respond within **5 seconds** to avoid retries
- Handle duplicate events (idempotency)
- Log the contact `id` for debugging purposes