contacts.import
Import contacts from a file.
Reference
POST/api/v1/contact-lists/{contact_list_id}/import
- Auth
- API key in
X-API-Key - Content
- multipart/form-data
- Returns
- 200 · ImportResponse
Import a CSV into a list, replacing any caller already in it. Upsert rather than append: re-uploading a corrected export is the normal way somebody fixes a list, and appending would leave both versions in place with no way to tell which the agent will match.
Arguments
| Argument | In | Type | Required | Description |
|---|---|---|---|---|
contact_list_id | path | integer | required | |
phone_column | query | string | optional | Header to read numbers from. Guessed when omitted. |
country | query | string | optional | ISO-2 country for resolving local numbers — '09876543210' becomes '+919876543210' with 'IN' and is unusable without it. Pass the country of the number this list will answer on. |
file | body | string | required |
Example request
curl -X POST "https://api.decibyl.ai/api/v1/contact-lists/<contact_list_id>/import" \
-H "X-API-Key: dcb_your_key" \
-F "file=@file"Response
{
"imported": 1,
"skipped": 1,
"problems": [
"string"
],
"phone_column": "string",
"email_column": "string",
"truncated": false
}Errors
| Status | When |
|---|---|
404 | Not found |
422 | Validation Error |