> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cometly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Contacts

> Every contact created in the export window, with its identity and custom fields.

## What it is

The **Contacts** dataset is one row per contact created in your space within the window. A *contact* is a person known to your tracker (internally called a profile).

* **Grain:** one row per contact (`id`).
* **Windowed on:** `created_at` (UTC timestamp) — the contact's **original creation** time. The internal row timestamp is never exported.
* **Path segment:** `contacts`.

> [!NOTE]
>
> Contacts are mutable. Each run carries a contact's state **as of run time**, so re-runs self-heal
> updates for contacts created *inside* the window. A contact created *before* the window is not
> re-exported when it later changes — for a full refresh, run a one-time export over all history.

Contacts flagged internally as pathological (runaway identity graphs) are excluded outright.

## Columns

### Contact

| Column | Status | Description |
| - | - | - |
| `id` | Locked | Contact ID — the row grain and dedup key. |
| `created_at` | Locked | The contact's original creation time (UTC). |

### Identity

| Column | Status | Description |
| - | - | - |
| `name` | Optional | Contact name. |
| `email` | Optional | Primary email. |
| `phone` | Optional | Primary phone. |
| `location` | Optional | Location label. |

### Location & device

| Column | Status | Description |
| - | - | - |
| `city` | Optional | City. |
| `state` | Optional | State or region. |
| `country` | Optional | Country. |
| `device_type` | Optional | Most recent device type. |
| `os` | Optional | Most recent operating system. |
| `browser` | Optional | Most recent browser. |
| `language` | Optional | Most recent browser language. |

### Timestamps

| Column | Status | Description |
| - | - | - |
| `updated_at` | Optional | When the contact was last updated (UTC). |

### Company

| Column | Status | Description |
| - | - | - |
| `primary_company_id` | Optional | The contact's primary [company](https://docs.cometly.com/data-warehouse/datasets/companies.md) ID — joins to the Companies dataset's `id`. From there, join to your own account tables on `companies.external_id`, which is your `company_external_id` as stored: surrounding whitespace trimmed, case preserved, and integer values stored as their decimal string (`1234567`). The match is byte-exact and case-sensitive, so join on exact equality, not a case-insensitive one. |

### Custom fields

Your space's custom contact fields, by slot. The slot number determines its type:

| Slots | Type |
| - | - |
| `profile_field_1` – `profile_field_15` | Text |
| `profile_field_16` – `profile_field_25` | Number |
| `profile_field_26` – `profile_field_30` | Date |

All optional. The create form shows only the slots your space has configured, labeled with each field's name.

> [!NOTE]
>
> **Output naming is your choice at creation.** Custom-field columns can be named by their **stable
> slot** (`profile_field_7`) or by the field's **label** (frozen as of creation). With label naming,
> renaming a field later does not change an existing export's columns.

### Identity graph

The contact's full multi-value identity, exported as **JSON arrays**. All optional and default to off. Values inherited from contacts merged into this one are included, and the lists are **uncapped** (unlike the Public API's recent-5 token list).

| Column | Status | Description |
| - | - | - |
| `emails` | Optional | JSON array of all the contact's emails. |
| `phones` | Optional | JSON array of all the contact's phones. |
| `comet_tokens` | Optional | JSON array of all the contact's Comet tokens (browser identifiers). |
| `tracking_ids` | Optional | JSON array of every `tracking_id` ever sent on this contact's events (Create Event API `tracking_id`, webhook `tracking_id`) — your own application/customer key back to your systems. |
| `merged_profile_ids` | Optional | JSON array of the contact IDs merged into this contact — your repair kit for event rows exported before a merge. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.