Create a Contact

Use to create and save a new contact in Engage.

Endpoint and Methods
  • POST /_rest/v2/contacts

Sample Request:

{

  “contactInfo”:

[

 {

   “phone”: “1231231234”,

   “metadata”: {

     “Firstname”: “Abby”,

     “Lastname”: “Normal”,

     “email”: “Abbynormal@mail.com”

   }

 }

]

}

Note: “contactInfo” and “phone” are required fields in the Body. Other optional contact fields can be added under “metadata”.

Response code 201 returns the new contact Id(s) for successfully created contact(s).

 
[

  {

    "location": "US",

    "_id": "5f8618c60340af3d06a56a24",

   "phone": "1231231234",

    "metadata": {

     "firstname": "Abby",

     "lastname": "Normal",

     "email": "Anormal@mail.com",

     "phone": "1231231234"

    },

    "listId": "7ec42fa6cced218bba350cef00216c5dac58ded8",

    "timezone": null,

    "deleteFlag": false,

    "createdDate": "2020-10-13T21:14:46.970Z",

    "createdBy": "ejerez",

    "customerId": "1006568"

  }

]

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

{
"message": "string",
"status": 401
}

Response code 422 returns a message that the phone field is not valid.

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

{
  "message": "Something went wrong during contact creation",
  "status": 500
}