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

# Import and export contacts, messages, templates, labels, and opt-outs

> Bulk import and export contacts, messages, message templates, labels, and opt-outs by CSV, then search, filter, and export your full message history from Data & Integrations.

# Data & Integrations

**Data & Integrations** is your hub for managing workspace data in MessageDesk. It has three tabs:

* **Import:** upload CSVs of contacts, messages, message templates, labels, and opted-out phone numbers, map fields, and monitor progress.
* **Export:** run a full CSV export of your workspace's contacts, message templates, labels, or opt-outs.
* **Message History:** search, filter, and export every message sent or received in your workspace.

> [!NOTE]
>
> **Data & Integrations is now Data & Integrations.** Earlier versions of MessageDesk called this page **Data & Integrations**. The tabs and features are the same.

### What you can import and export

| Data type | Import card | Export card |
| - | - | - |
| Contacts | **Import Contacts** (create or update) | **Export Contacts** |
| Messages | **Import New Messages** (create only) | Use [Message History](#message-history) |
| Message templates | **Import Message Templates** (create or update) | **Export Message Templates** |
| Labels | **Import Labels** (create or update) | **Export Labels** |
| Opt-outs | **Import New Opted Out Phone Numbers** (create only) | **Export Opt Outs** |

> [!TIP]
>
> Looking to **view or export existing messages**? Jump to [Message History](#message-history). To **export contacts, templates, labels, or opt-outs**, jump to [Export](#export). To export a **single conversation** directly from the Inbox toolbar, see [Export a conversation](https://docs.messagedesk.com/inbox/export-conversation.md).

> [!NOTE]
>
> Message History exports, Export tab exports, and per-conversation exports all run through the same **universal export system**. Each one processes asynchronously in the background. MessageDesk delivers the file through the **Export Available** button in the top nav, plus an **export completed email** to the user who triggered it.
>
> Imports work the same way. When a contact, message, message template, label, or opt-out import finishes, MessageDesk sends an **import completed email** to the user who started it with a summary of the run.

***

## Access Data & Integrations

Go to **Account → Settings → Data & Integrations** (under **Workspace Settings**), then choose the **Import**, **Export**, or **Message History** tab.

Each data type has its own card on the **Import** and **Export** tabs. Click **Start Import** or **Start Export** on the card for the data you want.

> [!NOTE]
>
> **Don't see Data & Integrations?** Your role may not include access. Ask an Admin or Manager to adjust your permissions.

![Data Import](https://mintcdn.com/messagedesk/9hEYDuzKn-Pqraxm/images/data-import.png?fit=max\&auto=format\&n=9hEYDuzKn-Pqraxm\&q=85\&s=d0e7591339e8b13c7af6490c05ab108a)

***

## How to import contacts

Build your contact list quickly by uploading a **CSV** and mapping it to MessageDesk fields.

### Start an import

1. Open **Settings → Data & Integrations → Import**.
2. On the **Import Contacts** card, click **Start Import**.
3. Choose your **.csv** file and upload.

![Import Contacts](https://mintcdn.com/messagedesk/-9iksRepNUJETM6k/images/import-contacts.png?fit=max\&auto=format\&n=-9iksRepNUJETM6k\&q=85\&s=d2d33e188d5da6dfebb51cf2fbfa02f7)

### Map your columns

* Columns that match MessageDesk field names **auto-map**.
* Adjust mapping manually as needed.
* You can map [custom fields](https://docs.messagedesk.com/settings/workspace-settings/custom-fields.md). Make sure the CSV data type matches the field type.
* A single contact can carry **multiple phones, emails, and addresses**. Map each column (for example, `mobile`, `work_phone`, `email_home`, `email_work`, `address_billing`, `address_shipping`) to its own field. They all attach to the same contact record.

### Review duplicates and errors

* MessageDesk **updates duplicates** (matched by **email** or **phone**) with the values in your import. Only mapped columns with a value get updated. Empty cells leave existing fields unchanged.
* The importer flags **invalid data** (for example, bad phone or email format) so you can fix it and re-upload.
* Processing **skips** problem rows.

### Monitor progress

After you start the import, you'll see the real-time status. When complete, a summary shows total **processed**, **imported**, **skipped**, and any **error reasons**.

> [!NOTE]
>
> See [**Create and Import Contacts**](https://docs.messagedesk.com/contacts/create-import.md) for a step-by-step walkthrough.

***

## How to import messages

The **Import New Messages** card creates messages in bulk. Use it to import **past SMS** from any platform or service into MessageDesk so you keep the full conversation context.

### Start a message import

1. Open **Settings → Data & Integrations → Import**.
2. On the **Import New Messages** card, click **Start Import**.
3. Upload your **.csv** file.

![Import Messages](https://mintcdn.com/messagedesk/-9iksRepNUJETM6k/images/import-messages.png?fit=max\&auto=format\&n=-9iksRepNUJETM6k\&q=85\&s=a01394f901960ffda6e170d80eb3d248)

### Map your data

* Map CSV columns to MessageDesk **message fields** (timestamp, direction, phone number, text, channel/line).
* Review and confirm the mapping for accuracy.

### Validate, review, and import

* Preview parsed messages and fix any errors the validator surfaces.
* Click **Import** to start processing. A bottom banner flags pre-import issues (if any).

### Supported message types

* **Outbound (sent)** messages.
* **Inbound (received)** messages.
* **1-on-1** conversations.
* **Group** conversations.

> [!WARNING]
>
> **Not supported for message import.** Media attachments (images, videos, files) and internal comments.

### How message import works

* **Automatic conversation creation:** If a conversation doesn't exist for a row, MessageDesk creates it.
* **Existing conversations:** Rows match into existing threads when possible.
* **Channel requirement:** You can only import messages into **outbound channels that already exist** in your workspace.

***

## How to import message templates, labels, and opt-outs

Bulk-load your workspace's shared **message templates**, **labels**, or **opt-out list** from CSV. Each importer runs from the same **Import** tab as contacts and messages, and delivers an **import completed email** when it finishes.

### Import message templates

Migrate a template library from another platform or seed a new workspace.

1. Open **Settings → Data & Integrations → Import**.
2. On the **Import Message Templates** card, click **Start Import** and upload your **.csv** of templates.
3. Map columns to template fields (name, body, tags, and any media URL).
4. Review the preview, then click **Import**.

The importer updates templates that match an existing template by **name** in place. New names create new templates. See [Message Templates](https://docs.messagedesk.com/settings/workspace-settings/message-templates.md) for how the library is managed after import.

### Import labels

Recreate a label library in bulk instead of adding labels one at a time.

1. Open **Settings → Data & Integrations → Import**.
2. On the **Import Labels** card, click **Start Import** and upload your **.csv** of labels.
3. Map columns for **name**, **color**, and **icon**.
4. Click **Import**.

The importer updates any label that matches an existing label by **name** with the imported color and icon. See [Labels](https://docs.messagedesk.com/settings/workspace-settings/labels.md) for how the shared label library works.

### Import opt-outs

Move an existing opt-out list into MessageDesk so MessageDesk blocks those numbers from all outbound sends in the workspace.

1. Open **Settings → Data & Integrations → Import**.
2. On the **Import New Opted Out Phone Numbers** card, click **Start Import** and upload your **.csv** of opt-outs.
3. Map the **phone** column (E.164 format).
4. Click **Import**.

> [!WARNING]
>
> Opt-out imports are **workspace-scoped**. MessageDesk blocks each imported number from every phone line in this workspace. If your tenant has multiple workspaces, run the import in each one that needs the block.

MessageDesk skips phone numbers already on the workspace opt-out list as duplicates. See [Anonymous, opted-out, and blocked contacts](https://docs.messagedesk.com/contacts/anonymous-opt-out-blocked.md) for what opting out means for a contact.

***

## File requirements and limits

**Format**

* **CSV only** (`.csv`).
* **UTF-8** encoding preferred. MessageDesk strips a byte order mark (BOM) and other invalid bytes automatically.
* Include a **header row**.
* Each row must have the **same number of columns** as the header.

**Required data**

* For **contacts**: **phone**. Email and name columns are optional
* For **messages**: Required fields typically include **timestamp**, **direction** (inbound/outbound), **phone number(s)**, **message text**, and **channel/line identifier**

**Validation**

* Emails must be a valid email format.
* Phone numbers must be valid **E.164** (`+15551234567`).
* [Custom fields](https://docs.messagedesk.com/settings/workspace-settings/custom-fields.md) must match their **defined type**.
* Duplicate detection runs on **email** and **phone** (contact imports).

**Limits**

* **Max rows per file:** **5,000**
* **Max file size:** **10 MB**
* **Platform:** **Web only** (imports aren't supported on mobile or desktop apps)

If a limit is exceeded, you'll see errors like **"CSV file is too large"** or **"Imports are only supported on web."**

***

## What gets imported

* **Contacts**
* [**Custom fields**](https://docs.messagedesk.com/settings/workspace-settings/custom-fields.md) (when mapped)
* **Messages** (text content only. No media or internal comments.)
* **Message templates** (name, body, tags, and any media references from the source template)
* **Labels** (name, color, icon)
* **Opt-outs** (phone numbers that should be blocked from receiving messages in this workspace)

***

## Message History

The **Message History** tab is a searchable, filterable archive of every message in your workspace. Use it to audit conversations, build reports, or export filtered slices to **CSV** or **PDF**.

### Access message history

Go to **Settings → Data & Integrations → Message History**.

![Message History](https://mintcdn.com/messagedesk/-9iksRepNUJETM6k/images/message-history.png?fit=max\&auto=format\&n=-9iksRepNUJETM6k\&q=85\&s=3ff30c7af2cdd1a97a944039a5df0924)

### Filter your messages

Narrow the list using the filter controls at the top of the tab. Available filters:

* **Phone Numbers:** scope results to one, several, or **all** phone lines in the workspace (see [Scope by phone number](#scope-by-phone-number))
* **Date range:** limit results to a specific window. Setting the same date for start and end returns the full day's messages (00:00 – 23:59 in your workspace time zone).
* **Direction:** inbound or outbound
* **Message Type:** filter by message type
* **Contact:** messages tied to a specific contact
* **Label:** conversations carrying a given [label](https://docs.messagedesk.com/inbox/labels.md)
* **User/agent:** messages sent by a specific teammate
* **Status:** delivery state (e.g., delivered, failed)

### Scope by phone number

Use the **Phone Numbers** filter to control which phone lines are included in the view and any export.

![Data & Integrations Export By Phone Number](https://mintcdn.com/messagedesk/6x6LTU5z1XNqwC8F/images/data-center-export-by-phone-number.png?fit=max\&auto=format\&n=6x6LTU5z1XNqwC8F\&q=85\&s=ae37c7d5132cd314f737d3642e567c42)

* **All Phone Numbers.** Leave every line checked to include the **entire workspace's Message History across all phone lines** in a single export.
* **A single phone number.** Uncheck the others to scope Message History (and the resulting export) to **just that line**. For example, only your Front Desk or only your Sales Line.
* **A subset of lines.** Check any combination of lines to export just those.

> [!WARNING]
>
> **Tenant-level exports aren't supported.** Message History exports are scoped to a **single workspace**. If your tenant has multiple workspaces, run the export in each workspace separately. There's no concurrent export across all workspaces on a tenant.

### Search within results

Use the **search bar** to run a free-text search across the messages currently shown. Search runs **on top of your active filters**, so you can drill into a filtered slice rather than the entire archive.

### Export your text message history to CSV or PDF

![Export Csv Pdf](https://mintcdn.com/messagedesk/-9iksRepNUJETM6k/images/export-csv-pdf.png?fit=max\&auto=format\&n=-9iksRepNUJETM6k\&q=85\&s=d64ea18d18b5be459db66b1fa38a6ac6)

Click **Export** to download a CSV of the current view. Use CSV exports for **data analysis, reporting, and bulk archiving**. For a shareable, human-readable record, use **PDF** instead.

You can export at two levels of scope:

* **All phone lines in a workspace.** Leave every line checked in the **Phone Numbers** filter to export the workspace's full Message History in one file.
* **A single phone number.** Uncheck the other lines in the **Phone Numbers** filter to export Message History for just that line.

> [!WARNING]
>
> Exports include **only the messages that match your active filters and search**. Adjust filters before exporting if you need a broader set.

> [!NOTE]
>
> **Export is disabled when the current view has zero results.** If your filters, date range, or search return no messages, the **Export** button is greyed out. Adjust filters to widen the result set before exporting.

> [!NOTE]
>
> **Tenant-level exports aren't supported.** If your tenant has more than one workspace, Message History exports run **per workspace**. There's no way to export across all workspaces on a tenant in a single file.

> [!NOTE]
>
> When your export finishes processing, you'll get it two ways:
>
> * An in-app **"Export Available"** button in the top nav. Click it to download your `.csv` or `.pdf` file.
> * An **export completed email** with a download link, sent to the user who triggered the export.
>
> See [Notification Preferences](https://docs.messagedesk.com/settings/my-settings/notification-preferences.md) to manage push and browser notifications for the same event.

> [!NOTE]
>
> **CSV timestamps are in UTC.** Message timestamps in the exported `.csv` are recorded in **UTC**, not your workspace time zone, so they won't match the times shown in the MessageDesk inbox. Convert the column to your local time zone in Google Sheets or Excel to reconcile it. PDF exports render timestamps as shown in-app.

Use PDF exports to create **shareable, human-readable records** of a conversation or a filtered slice of message history. Useful for audits, compliance reviews, or sharing context with stakeholders.

* **From a conversation.** Open the conversation in the Inbox, click the **⋯ More Options** menu in the conversation toolbar, and choose **Export → PDF**. See [Export a conversation](https://docs.messagedesk.com/inbox/export-conversation.md) for the full per-conversation flow.
* **From Message History.** Apply your filters in **Settings → Data & Integrations → Message History**, then choose **Export to PDF**.

PDF exports include the full message thread with timestamps, participants, direction, and inline previews of supported media.

**Media handling**

* The PDF embeds **renderable media** (images and other formats supported in PDF) inline.
* For **non-renderable media** (videos and other unsupported file types), the PDF shows a direct **S3 link to the file** alongside the note **"Could not load preview."** The attachment stays accessible through the link.

### Permissions

Roles with Data & Integrations access (typically **Admin** and **Manager**) can use Message History. Ask an Admin to adjust your role if you don't see the tab.

***

## Export

The **Export** tab runs full CSV exports of your workspace's **contacts**, **message templates**, **labels**, and **opt-out list**. Use it when you need a complete backup of a list for archiving, reporting, or moving data to another system.

### Access the Export tab

Go to **Settings → Data & Integrations → Export**.

### Export your contacts to CSV

1. Open the **Export** tab.
2. On the **Export Contacts** card, click **Start Export**.
3. The export runs asynchronously in the background. Keep working in MessageDesk while it's preparing.

> [!NOTE]
>
> **Contact exports are a full workspace dump.** The CSV includes every contact in the workspace. Filtered contact exports (by label, custom field, saved filter, and so on) aren't supported in this version.

> [!NOTE]
>
> **Tenant-level exports aren't supported.** Contact exports are scoped to a **single workspace**. If your tenant has multiple workspaces, run the export in each one separately.

### What's included in a contact export

Each row in the CSV contains a contact's standard fields (name, phone numbers, email, address, and so on) plus **every custom property** defined in your workspace.

* **Standard fields.** First and last name, all phone numbers, all emails, all addresses, and other built-in contact properties.
* **Custom properties.** Each [custom field](https://docs.messagedesk.com/settings/workspace-settings/custom-fields.md) on the workspace becomes its own column. Contacts without a value for a given custom property leave that cell blank.

### When your export is ready

Contact exports run through the same **universal export system** as Message History and per-conversation exports. When the file is ready, you'll get it two ways:

* The **Export Available** button appears in the top nav. Click it to download the CSV.
* An **export completed email** with a download link, sent to the user who triggered the export.

Notifications only go to the **user who triggered the export**, not to your whole team. See [Notification Preferences](https://docs.messagedesk.com/settings/my-settings/notification-preferences.md) to manage push and browser notifications for the same event.

### Export message templates, labels, and opt-outs

The Export tab also runs full workspace exports of your shared **message templates**, **labels**, and **opt-out list**.

1. Open the **Export** tab.
2. On the **Export Message Templates**, **Export Labels**, or **Export Opt Outs** card, click **Start Export**.
3. Each export runs asynchronously and delivers through the same **Export Available** button and **export completed email** as contact exports.

Each export is a full workspace dump. Filtered exports aren't supported.

### Permissions

Roles with Data & Integrations access (typically **Admin** and **Manager**) can use the Export tab. Ask an Admin to adjust your role if you don't see it.

## Frequently asked data import and export questions

### What file types can I upload?

**CSV only.** Export Excel files (`.xlsx`) to CSV first.

### Do contacts need both email and phone?

No. Each row must include **at least one**: **email** or **phone** (you can include both).

### How are duplicates handled on contact import?

MessageDesk checks **email** and **phone**. When a row matches an existing contact, MessageDesk **updates** that contact with the values from the import. Updates only apply to columns you mapped, and only when the mapped column has a value. Empty cells leave existing fields unchanged. Updates apply to standard fields (name, email, phone, address, and so on) and custom fields.

### Why did some rows fail?

Common reasons: invalid email/phone format, missing required fields, custom field type mismatch, or a channel that doesn't exist (for message imports). Fix and re-upload.

### Can I import more than 5,000 rows?

Split your data into multiple CSV files. Each file can hold **up to 5,000 rows** and **≤ 10 MB**.

### Can I import from mobile?

No. Imports are **web-only**. Use a desktop browser.

**What's the difference between Inbox search and Message History?**\
The [Inbox](https://docs.messagedesk.com/inbox/filter-search-sort.md) is for working live conversations. **Message History** is the workspace-wide archive built for audit, reporting, and bulk export.

**What format are exports in?**\
**CSV** for data and reporting, or **PDF** for shareable conversation records.

**Can I export Message History across every phone line at once?**\
Yes. In **Settings → Data & Integrations → Message History**, leave every line checked in the **Phone Numbers** filter and click **Export**. That produces a single file covering the entire workspace. To export just one line, uncheck the others before exporting.

**Can I export Message History across all workspaces on my tenant?**\
No. Message History exports are scoped to a **single workspace**. If your tenant has multiple workspaces, run the export in each workspace separately.

**Can I export my contacts?**\
Yes. Open **Settings → Data & Integrations → [Export](#export)** and click **Start Export** on the **Export Contacts** card to run a full CSV dump of every contact in the workspace. Filtered contact exports (by label, custom field, saved filter, and so on) aren't supported yet.

**How do I know when an export is ready?**\
Every export delivers two ways: an **Export Available** button in the top nav, and an **export completed email** with a download link to the user who triggered it. Contact, Message History, and per-conversation exports all share the same in-app notification because they all run through the universal export system.

**Are media attachments included in exports?**\


* **CSV exports.** No. CSV files contain message text and metadata only.
* **PDF exports.** The PDF embeds renderable media (images) inline. For non-renderable media (videos and other unsupported types), the PDF shows a direct S3 link and a **"Could not load preview"** note.

***

## Best practices

* **Normalize phone numbers** to **E.164** before upload.
* **Clean your data.** Dedupe and validate emails to cut skips.
* **Test with a small CSV** (10–20 rows) to confirm mapping and validation.
* **Keep a backup** of your source CSV and **import results** for audit.


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