curl --request POST \
--url https://pub-api.conversion.ai/api/v2/contacts/batch \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"contacts": [
{
"email": "jane@example.com",
"subscriptionStatus": "SUBSCRIBED",
"fields": {
"first_name": "Jane",
"last_name": "Smith"
}
},
{
"email": "bob@example.com",
"subscriptionStatus": "SUBSCRIBED",
"fields": {
"first_name": "Bob",
"last_name": "Jones"
},
"companyFields": {
"company_name": "Acme Corp"
}
}
]
}
'{
"data": {
"processed": 2,
"succeeded": 2,
"failed": 0,
"results": [
{
"success": true,
"cnvContactId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"contactCreated": true
},
{
"success": true,
"cnvContactId": "f9e8d7c6-b5a4-3210-fedc-ba9876543210",
"contactCreated": false
}
]
}
}Contacts
Batch Upsert Contacts
Create or update up to 1,000 contacts in a single request, with a result for each contact. Optionally pass audienceId to add successfully upserted contacts to a static audience.
POST
/
v2
/
contacts
/
batch
curl --request POST \
--url https://pub-api.conversion.ai/api/v2/contacts/batch \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"contacts": [
{
"email": "jane@example.com",
"subscriptionStatus": "SUBSCRIBED",
"fields": {
"first_name": "Jane",
"last_name": "Smith"
}
},
{
"email": "bob@example.com",
"subscriptionStatus": "SUBSCRIBED",
"fields": {
"first_name": "Bob",
"last_name": "Jones"
},
"companyFields": {
"company_name": "Acme Corp"
}
}
]
}
'{
"data": {
"processed": 2,
"succeeded": 2,
"failed": 0,
"results": [
{
"success": true,
"cnvContactId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"contactCreated": true
},
{
"success": true,
"cnvContactId": "f9e8d7c6-b5a4-3210-fedc-ba9876543210",
"contactCreated": false
}
]
}
}Authorizations
apiKeyapiKeyQuery
Body
application/json
Was this page helpful?