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

# import / export

> Bulk import data from files and export data to CSV or JSON.

Import and export let you move data in and out of MossDesk in bulk. Use `import template` to get the right CSV format, `import create` to upload, and `export create` to download your data.

## Import Commands

### moss import template

Generate a CSV template with the correct headers and an example row. Use this to prepare your import file.

```bash theme={null}
moss import template --entity-type contacts
moss import template --entity-type companies
moss import template --entity-type deals
```

| Option                 | Required | Description                                      |
| ---------------------- | -------- | ------------------------------------------------ |
| `--entity-type <type>` | Yes      | Entity type: `contacts`, `companies`, or `deals` |

Example output for contacts:

```
first_name,last_name,email,phone,title,linkedin_url,notes
Jane,Smith,jane@acme.com,+1-555-0100,CTO,https://linkedin.com/in/janesmith,Met at SaaStr 2026
```

<Tip>
  Run `moss import template --entity-type contacts > contacts.csv`, fill in your data, then upload it.
</Tip>

### moss import create

Start a data import job. The file must be accessible via URL.

```bash theme={null}
moss import create \
  --entity-type contacts \
  --file-url "https://storage.example.com/contacts.csv"
```

| Option                 | Required | Description                                      |
| ---------------------- | -------- | ------------------------------------------------ |
| `--entity-type <type>` | Yes      | Entity type: `contacts`, `companies`, or `deals` |
| `--file-url <url>`     | Yes      | URL of the file to import                        |

Returns a job ID that you can use to check status.

### moss import status

Check the status of an import job.

```bash theme={null}
moss import status --id job_abc123
```

| Option      | Required | Description   |
| ----------- | -------- | ------------- |
| `--id <id>` | Yes      | Import job ID |

```bash theme={null}
moss import status --id job_abc123 --json
```

```json theme={null}
{
  "data": {
    "id": "job_abc123",
    "entity_type": "contacts",
    "status": "completed",
    "total_rows": 150,
    "imported_rows": 148,
    "failed_rows": 2,
    "created_at": "2026-02-08T12:00:00Z",
    "completed_at": "2026-02-08T12:01:30Z"
  }
}
```

***

## Export Commands

### moss export create

Start a data export job.

```bash theme={null}
moss export create --entity-type contacts --format csv
```

| Option                 | Required | Description                                      |
| ---------------------- | -------- | ------------------------------------------------ |
| `--entity-type <type>` | Yes      | Entity type: `contacts`, `companies`, or `deals` |
| `--format <format>`    | No       | Export format: `csv` (default) or `json`         |

Returns a job ID that you can use to check status and download the file.

### moss export status

Check the status of an export job.

```bash theme={null}
moss export status --id job_def456
```

| Option      | Required | Description   |
| ----------- | -------- | ------------- |
| `--id <id>` | Yes      | Export job ID |

```bash theme={null}
moss export status --id job_def456 --json
```

```json theme={null}
{
  "data": {
    "id": "job_def456",
    "entity_type": "contacts",
    "format": "csv",
    "status": "completed",
    "download_url": "https://storage.mossdesk.com/exports/job_def456.csv",
    "created_at": "2026-02-08T12:00:00Z",
    "completed_at": "2026-02-08T12:00:45Z"
  }
}
```
