The article describes possible actions with your contacts using the API.

List all contacts

Get the list of contacts.

  • GET /people return list of all people in your Reply account.

Example:

Request:

GET /people

Response:

200 OK
{
    "people":
[
 {
     "id": 2232,
            "email": "[email protected]",
   "firstName": "James",
   "lastName": "Smith",
   "company": "Global Tech",
   "city": "San Francisco",
   "state": "CA",
   "country": "US",
   "title": "VP of Marketing",
   "notes": "",
   "addingDate": "2015-03-24T11:00:39-05:00"
 }
        ],
    "total": 3123,
    "page": 1,
    "limit": 100,
    "pagesCount": 32,
    "next": "https://api.reply.io/v1/people?page=1&limit=100",
    "previous": "https://api.reply.io/v1/people?page=3&limit=100"
 }

Data type

  • people. array, array of people 
  • total. integer, total people count 
  • page. integer, current page 
  • limit. integer, page size. Default value is 100 
  • pagesCount. integer, total number of pages with current limit 
  • next. string, link for next page with current limit 
  • previous. string, link for previous page with current limit

Get Contacts by ID or email

  • GET /people/{id} return people by id.
  • GET /people?email={email} return people by email.

Example:

Request:

GET /people?email=[email protected]

Response:

200 OK
{
    "id": 2232,
    "email": "[email protected]",
    "firstName": "James",
    "lastName": "Smith",
    "company": "Global Tech",
    "city": "San Francisco",
    "state": "CA",
    "country": "US",
    "title": "VP of Marketing",
    "notes": "",
    "addingDate": "2015-03-24T11:00:39-05:00"
}

Data type

  • id. integer, read-only, not required 
  • email. string, read and update, required 
  • firstName. string, read and update, required 
  • lastName. string, read and update, not required 
  • company. string, read and update, not required 
  • city. string, read and update, not required 
  • state. string, read and update, not required 
  • country. string, read and update, not required 
  • title. string, read and update, not required 
  • notes. string, read and update, not required 
  • addingDate. date and time, read only, not required

Save Contacts

  • POST /people add contacts or update if they already exist.

email - contact's email address (used for searching contacts)

Example:

Request:

POST /people
{
    "email": "[email protected]",
    "firstName": "James",
    "lastName": "Smith",
    "company": "Global Tech",
    "title": "VP of Marketing",
}

Response:

If contact created:

201 Created

If contact updated:

200 OK
{
    "id": 2232,
    "email": "[email protected]",
    "firstName": "James",
    "lastName": "Smith",
    "company": "Global Tech",
    "city": "",
    "state": "",
    "country": "",
    "title": "VP of Marketing",
    "notes": "",
    "addingDate": "2015-03-24T11:00:39-05:00"
}

Add custom fields to a contact

Custom fields can be updated using the same POST /people method. This method will not add new custom fields but will update already existing ones.

Custom fields can be specified during the import contacts from CSV file. After that they are saved at the user level and can be updated via this method.

{
 "email": "[email protected]",
 "firstName": "James",
 "customFields": [
     {
         "key": "CustomFiledName1",
         "value": "customvalue1"
     },
     {
         "key": "CustomFiledName2",
         "value": "customvalue2"
     }
 ]
}

Delete contacts

  • DELETE /people/{id} delete people by id.
  • DELETE /people?email={email} delete people by email.

Will delete people by their id or email address and return 200 OK if successful.

If the user does not have access to delete people, you'll see 403 Forbidden.

Did this answer your question?