Skip to main content
POST
Import contacts from a CSV file

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
file_name
string
required

Name of the file being uploaded

Required string length: 1 - 255
Example:

"contacts.csv"

Must be true. Confirms that every contact in this file has opted in to receive marketing emails from your organization. Recorded on the import for compliance purposes.

Available options:
true
Example:

true

require_first_name
boolean
default:false

If true, skip rows that are missing a first name

Example:

false

require_last_name
boolean
default:false

If true, skip rows that are missing a last name

Example:

false

tag_name
string

Tag applied to every imported contact. Defaults to the segment name, else the file name and import time.

Required string length: 1 - 150
Example:

"Webinar attendees 2026-09-14"

segment
object

Creates a segment that selects the import tag, so the imported contacts can be targeted right away

client_token
string

Idempotency token, required when segment is provided. Calling again with the same token returns the same import with a fresh upload_url instead of creating a second import or segment.

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9._:-]+$
Example:

"01234567-89ab-cdef-0123-456789abcdef"

Response

The import and its upload URL. A repeated client_token returns the same import.

import_id
string
required

Unique import identifier

Example:

"01234567-89ab-cdef-0123-456789abcdef"

status
string
required

Current import status

Example:

"uploading"

upload_url
null | string
required

URL to PUT your CSV file to, with the content_type header. Valid for expires_in seconds (5 minutes). Null when the file for this client_token was already uploaded.

Example:

"https://uploads.example.com/contacts.csv?signature=abc123"

expires_in
null | integer
required

Seconds until upload_url expires. Null when upload_url is null.

Example:

300

content_type
string
required

The Content-Type header value required for your PUT request

Example:

"text/csv"

file_id
string
required

Unique file identifier

Example:

"01234567-89ab-cdef-0123-456789abcdef"

tag_id
null | string
required

Tag applied to the imported contacts

Example:

"01234567-89ab-cdef-0123-456789abcdef"

segment_id
null | string
required

Segment created for this import, if requested

Example:

"01234567-89ab-cdef-0123-456789abcdef"