Add New Contacts

Use this endpoint to add one or more contacts to an existing list in Engage.

Endpoint and Methods

PUT /_rest/v2/lists/:id/uploadcontacts

Parameters

  • List Id

Body

Required fields:

  • contactInfo

  • phone

Optional fields:

  • Other contact fields can also be added under "metadata" (e.g., firstname, email)

Sample Request

Copy
{
  “contactInfo”:
[
 {
   “phone”: “1231231234”,
   “metadata”: {
     “Firstname”: “Abby”,
     “Lastname”: “Normal”,
     “email”: “Abbynormal@mail.com”
   }
 }
 {
   “phone”: “2342342345”
   “metadata”: {
     “Firstname”: “Tad”,
     “Lastname”: “Normal”,
     “email”: “Tadnormal@mail.com”
   }
 }
]
}

Sample Responses

Code 201 Response

Response code 201 returns a list with newly created contactIds under “contactRel”.

Copy
{
"headerInfo": {
"headers": [
"firstname",
"lastname",
"email",
"phone",
"message"
],
"moc": "phone"
},
"campaignRel": [],
"contactRel": [
"5f77af2494a706550d339a37",
"5f77af2494a706550d339a38",
"5f7b4c73877b145c2ba09302",
"5f7b4c73877b145c2ba09303",
"5f7b7f79b854df0ac6b8bb13",
"5f7b7f79b854df0ac6b8bb14",
"5f7f3ab921bcd17dc2df1d73",
"5f7f3ab921bcd17dc2df1d74"
],
"location": "US",
"_id": "5f77af24877b145c2ba092ef",
"listName": "JC Add a User via API",
"listId": "",
"description": "test",
"state": 0,
"modifiedDate": "2020-10-02T22:52:20.054Z",
"modifiedBY": "jcarlin",
"createdDate": "2020-10-02T22:52:20.054Z",
"createdBy": "jcarlin",

Code 401 Response

Response code 401 returns an error that the authorization token is invalid.

Code 422 Response

Response code 422 returns a message that the listId is invalid or does not exist.

Code 500 Response

Response code 500 returns an error when an unknown internal error occurs.