---
title: "Import Contacts using a CSV File"
method: POST
path: "/activities/contacts_file_import"
tags: ["Bulk Activities"]
---

# Import Contacts using a CSV File

`POST /activities/contacts_file_import`

This multipart method creates an asynchronous background job that adds or updates contacts by importing a CSV file containing contact information. Do not use a Content-Type header value with this method.

Importing a new contact email address automatically sets the contact's `permission_to_send` property as `implicit` and the `opt_in_source` property as `Account`. Importing an existing contact only updates the contact properties you include in the request.
Importing contacts with `sms_number`s requires using the `sms_permission_to_send` parameter  to specify permissions for all contacts being imported. Set to `explicit` to specify that all contacts either provided explicit permission. Set to `not_set` if permission was not provided. If `explicit`, you must also include the `sms_consent_date` as a column header to include the date the contact consented to receiving SMS messages.
Contacts must have either an email address or an SMS number defined.
 
The CSV file has a maximum of 40,000 lines including the header row (39,999 contacts) and a maximum file size of 4 megabytes (MB).  Lines above the 40,000 line maximum are not processed. If the request body exceeds 4 MB, only the contacts contained in the first 4 MB are imported and the remaining data is dropped.

## Response `201`

Request successful. Activity queued for processing.

- ActivityImport — Activity status for contacts_json_import and contacts_file_import activities
  - `activity_id` string, uuid — Unique ID for the activity.
  - `state` string — The state of the request: <p><ul> <li>initialized - request has been received</li> <li>processing - request is being processed</li> <li>completed - job completed</li> <li>cancelled - request was cancelled</li> <li>failed - job failed to complete</li> <li>timed_out - the request timed out before completing"</li> </ul> </p>
  - `started_at` string, date-time — Timestamp showing when we began processing the activity request, in ISO-8601 format.
  - `completed_at` string, date-time — Timestamp showing when we completed processing the activity, in ISO-8601 format.
  - `created_at` string, date-time — Timestamp showing when we created the activity, in ISO-8601 format.
  - `updated_at` string, date-time — Timestamp showing when we last updated the activity, in ISO-8601 format.
  - `source_file_name` string — Name of the file used for an file_import activity.
  - `percent_done` integer — Shows the percent done for an activity that we are still processing.
  - `activity_errors` string[] — Array of messages describing the errors that occurred.
  - `status` object
    - `items_total_count` integer — The total number of rows, including the header row, in the import file.
    - `person_count` integer — The total number of contacts in the import file.
    - `error_count` integer — The number of non-correctable errors encountered during the file import.
    - `correctable_count` integer — The number of correctable errors. Correctable errors are: invalid email address format, birthday or anniversary format error, or does not have minimal contact information (no name or email address). Correctable errors are available in the product UI to correct.
    - `cannot_add_to_list_count` integer — The number of previously unsubscribed contacts in the import - they cannot be added to a list.
  - `_links` ActivityStatusLink
    - `self` object — HATEOS-style link to the activity status (this object).
      - `href` string

## Other responses

- `400` — Bad request. Either the JSON was malformed or there was a data validation error.
- `401` — The Access Token used is invalid.
- `403` — Forbidden request. You lack the necessary scopes, you lack the necessary user privileges, or the application is deactivated.
- `404` — The requested resource was not found.
- `415` — 1. This endpoint requires that Content-Type be unspecified 2. Wrong file format, upload file must be of type .csv
- `429` — Too many requests. You exceeded 1,000 queued activities for this user account.
- `500` — There was a problem with our internal service.
- `503` — Our internal service is temporarily unavailable.

---

[API](https://skmtc.net/cc/apis/appconnect-v3.md) · [All operations](https://skmtc.net/cc/apis/appconnect-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cc/appconnect-v3/versions/4b4a534c818d/schema)
