Skip to content

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

ArgumentInTypeRequiredDescription
contact_list_idpathintegerrequired
phone_columnquerystringoptionalHeader to read numbers from. Guessed when omitted.
countryquerystringoptionalISO-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.
filebodystringrequired

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

StatusWhen
404Not found
422Validation Error