Import contacts from a spreadsheet

posthttps://api.expiryedge.com/v1/bulkImportContacts
editor or admin60/minIdempotency-KeyAny method
Request
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"
    }
  ]
}'
Response
{
  "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.

Headers

  • Idempotency-Keystring
    Optional client-generated key (1-255 characters of letters, digits, - _ : .).
    pattern: ^[A-Za-z0-9_\-:.]{1,255}$

Body parameters

application/json
  • contactsarray of objects
    Rows keyed by ContactInput names or common header spellings (first_name, First Name, surname, Email Address, phone, mobile, whatsapp, group, title, type, tz, enable_notification).
    max items: 1000
  • recordsarray of objects
    Alias of contacts.
    max items: 1000
  • consentboolean
    Confirms you have permission to notify these contacts (stored on each contact).

Returns

200
Import finished (possibly partially). Row problems are listed in errors.
  • successboolean
  • errorstring
    Present on 400/403.
  • createdinteger
  • skippedDuplicatesinteger
    Rows whose email already exists or repeats in the file.
  • skippedLimitinteger
    Valid rows not imported because the plan's contact limit was reached.
  • totalRowsinteger
  • currentinteger
    Present on 403.
  • limitinteger or string
    Plan contact limit, or Unlimited.
  • remaininginteger or string
    Slots left after the import, or Unlimited.
  • errorsarray of string
    Human-readable row messages, e.g. Row 3: Email is required.

Errors

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.