curl --request POST \
--url http://localhost:3000/api/contact/upsert \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"primaryPhone": "+212612345678",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"primaryEmail": "john@example.com",
"address": "123 Main St",
"city": "Casablanca",
"state": "Casablanca-Settat",
"zip": "20000",
"occupation": "Engineer",
"preferredChannel": "phone",
"customAttributes": {
"age": 30,
"interests": [
"tech"
]
}
}
]
}
'Create or update multiple contacts at once. Existing contacts are matched by phone number.
curl --request POST \
--url http://localhost:3000/api/contact/upsert \
--header 'Content-Type: application/json' \
--data '
{
"data": [
{
"primaryPhone": "+212612345678",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe",
"primaryEmail": "john@example.com",
"address": "123 Main St",
"city": "Casablanca",
"state": "Casablanca-Settat",
"zip": "20000",
"occupation": "Engineer",
"preferredChannel": "phone",
"customAttributes": {
"age": 30,
"interests": [
"tech"
]
}
}
]
}
'Show child attributes
Contacts upserted successfully