Skip to main content
POST
Bulk create contacts
Add up to 100 contacts in one request by sending them as a list in data. Each contact is checked and saved the same way as Create a contact, so each needs deliver_to_collect_from or company_name, and an address unless you send address_1, address_2, or address_3. When every contact is valid, the API returns 201 with the new contacts in the order you sent them. When some aren’t, the valid ones are still saved, and the API returns 422 with the code validation_failed. Its errors names each rejected contact by its index in your list, counting from 0, and its data lists the contacts that were created. Resend only the rejected contacts, or the others are saved twice. Nothing is saved, and the API returns 422, if data:
  • isn’t a list, is empty, or has an entry that isn’t an object (invalid_data)
  • has more than 100 contacts (too_many_contacts). The extra contacts aren’t skipped, as they are by Bulk create jobs, so split a longer list into several requests.
If a contact’s groups or items can’t be read, for example groups is a string instead of a list, that contact is rejected with "field": null and the code “groups or items can’t be read”, and the others are still saved. Detrack doesn’t check for duplicates, so a contact you send twice is saved twice.

Authorizations

X-API-KEY
string
header
required

Your Detrack API key, from Integrations > API Key in the dashboard.

Body

application/json
data
object[]
required

1 to 100 contacts. Send more than 100 and nothing is saved.

Required array length: 1 - 100 elements

Response

Every contact was created. They're listed in the order you sent them.

data
object[]