Add multiple contacts to a contact list in a single request using the AutoSend API.
curl --request POST \
--url https://api.autosend.com/v1/contact-lists/contacts/bulk-add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"contactListId": "60d5ec49f1b2c72d9c8b4567",
"emails": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}'
{
"success": true,
"data": {
"added": 2,
"created": 1,
"alreadyInList": 0,
"errors": [],
"validation": {
"valid": [
{ "email": "[email protected]", "status": "valid" },
{ "email": "[email protected]", "status": "valid" },
{ "email": "[email protected]", "status": "valid" }
],
"invalid": [],
"suppressed": []
},
"totalContactsInList": 343
}
}
curl --request POST \
--url https://api.autosend.com/v1/contact-lists/contacts/bulk-add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"contactListId": "60d5ec49f1b2c72d9c8b4567",
"emails": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}'
{
"success": true,
"data": {
"added": 2,
"created": 1,
"alreadyInList": 0,
"errors": [],
"validation": {
"valid": [
{ "email": "[email protected]", "status": "valid" },
{ "email": "[email protected]", "status": "valid" },
{ "email": "[email protected]", "status": "valid" }
],
"invalid": [],
"suppressed": []
},
"totalContactsInList": 343
}
}
<token>, where <token> is your auth token.emails or contactIds, not both.
"60d5ec49f1b2c72d9c8b4567"emails or contactIds, not both.emails or contactIds, not both.["60d5ec49f1b2c72d9c8b1111", "60d5ec49f1b2c72d9c8b2222"]
trueShow child attributes
210Show child attributes
343curl --request POST \
--url https://api.autosend.com/v1/contact-lists/contacts/bulk-add \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"contactListId": "60d5ec49f1b2c72d9c8b4567",
"emails": [
"[email protected]",
"[email protected]",
"[email protected]"
]
}'
{
"success": true,
"data": {
"added": 2,
"created": 1,
"alreadyInList": 0,
"errors": [],
"validation": {
"valid": [
{ "email": "[email protected]", "status": "valid" },
{ "email": "[email protected]", "status": "valid" },
{ "email": "[email protected]", "status": "valid" }
],
"invalid": [],
"suppressed": []
},
"totalContactsInList": 343
}
}