Skip to content
This repository has been archived by the owner on Sep 26, 2024. It is now read-only.

Developer Documentation for #6538 #120

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions source/includes/_api_endpoint_contacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,36 @@ channel|Channel of DNC. For example 'email', 'sms'... Default is email.

Same as [Get Contact](#get-contact).

### Import Contacts from CSV file
```php
<?php

$contactApi->importCsv($mapping, $config, $file);
```
Import contacts from a CSV file

#### HTTP Request

To add contacts from a CSV file:

`POST /contacts/importCsv`

**Data Parameters**
Name|Description
----|-----------
mapping| JSON mapping of CSV columns in format: {"csv_column": "mautic_field", ...}
config| Import configuration JSON object in format: {'delimiter': ',','enclosure': '"','escape': '\\','batchlimit':'200'}
file| Multipart-encoded CSV file

#### Response

`Expected Response Code: 200`
```json
{
"success": true
}
```

### Add UTM Tags
```php
<?php
Expand Down