Import contacts from a spreadsheet
post
https://api.expiryedge.com/v1/bulkImportContactseditor or admin60/minIdempotency-KeyJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/bulkImportContacts' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"consent": true,
"contacts": [
{
"firstName": "Priya",
"lastName": "Shah",
"email": "priya.shah@northwinddental.example",
"smsPhone": "+15550123456",
"contactGroup": "Licensing"
},
{
"first_name": "Marco",
"last_name": "Diaz",
"Email Address": "marco.diaz@contosolegal.example",
"enable_notification": "no"
}
]
}'Antwort
{
"success": true,
"created": 2,
"skippedDuplicates": 0,
"skippedLimit": 0,
"totalRows": 2,
"limit": 250,
"remaining": 180,
"errors": []
}Up to 1000 rows per request (contacts, or records). Each row needs first name, last name and a valid email;
header spellings such as first_name, Email Address, phone, group are accepted. Duplicate emails are
skipped, rows beyond the plan's remaining contact slots are skipped (skippedLimit), new groups are created.
Idempotency-KeystringOptional client-generated key (1-255 characters of letters, digits,- _ : .).pattern: ^[A-Za-z0-9_\-:.]{1,255}$
contactsarray of objectsRows keyed byContactInputnames or common header spellings (first_name,First Name,surname,Email Address,phone,mobile,whatsapp,group,title,type,tz,enable_notification).max items: 1000recordsarray of objectsAlias ofcontacts.max items: 1000consentbooleanConfirms you have permission to notify these contacts (stored on each contact).
200
Import finished (possibly partially). Row problems are listed in
errors.successbooleanerrorstringPresent on 400/403.createdintegerskippedDuplicatesintegerRows whose email already exists or repeats in the file.skippedLimitintegerValid rows not imported because the plan's contact limit was reached.totalRowsintegercurrentintegerPresent on 403.limitinteger or stringPlan contact limit, orUnlimited.remaininginteger or stringSlots left after the import, orUnlimited.errorsarray of stringHuman-readable row messages, e.g.Row 3: Email is required.
400 | No rows, more than 1000 rows, or the caller has no organization. |
401 | Missing, expired or invalid bearer token. |
403 | Role is not editor/admin ( {error}), or the subscription does not allow adding contacts. |
404 | The record does not exist or is not in your organization. |
409 | A request with the same Idempotency-Key is still being processed. Retry after Retry-After seconds. |
422 | The Idempotency-Key was already used with a different request body. |
429 | Too many requests for this endpoint from your IP. Wait Retry-After seconds. |
