Contact Object

All contacts belong to a device. Since a user can have many devices, each with their own local contacts and Google contact sync logins, contacts are not shared amongst user devices.

Field Type Description
identifier string Unique identifier for the contact
Example: BF4DF979-86E9-830D-BFC3-7G9F084D237B
addresses object An array of addresses for the contact
E164 string A E.164 phone number or parsed email
Example: +15626862
phone_formatted string The E164 phone number formatted for display based on the users chosen locale
Example: (562) 686-2709
type string The type of address:mobile ,work, home, other, fax work, assistant, callback, car ,company main, custom, fax home, isdn, main, other fax, pager, radio, unknown, work mobile, work pager, tty tdd, , telex
Example: Elon Musk
avatar_url string The URL of the contact's avatar
Example: https://api.yappy.im/api/avatar/YAPPY
active bool If false the contact has been deleted
Example: true
created int The time the contact was created (unix timestamp)
Example: 1448165156010
modified int The last time this contact record was modified (unix timestamp)
Example: 1448165156010
Example
{ 
   "identifier":"aeba2a2e-0364-4608-a396-005068613e2f",
   "name":"Mercedes West Covina Service",
   "avatar_url":"https://www.yappy.im/api/avatar/aeba2a2e-0364-4608-a396-005068613e2f",
   "addresses":[  
      {  
         "phone_formatted":"(877) 340-4598",
         "type":"mobile",
         "E164":"18773404598"
      }
   ],
   "active":false,
   "created":1448932025433,
   "modified":1448932025433
}

get-contacts

Get a list of contacts belonging to a device. The device must be a phone to have a contact.

Call
GET https://api.yappy.im/v1/devices/[device_identifier]/contacts

Request
Field Type Required Description Default Value
device_identifier string Yes The device_identifier of the Device object you would like contacts listed for. This must be passed in the REST URL call, not the querystring parameters.
Example: BF4DF979-86E9-830D-BFC3-7G9F084D237B
page int No The Page number to return (see Pagination)
Example: 2
1
results int No The number of results to return per page (see Pagination)
Example: 500
500
modified_after int No Return contacts modified after this date (unix timestamp)
Example: 1448165156010
active bool No If true, returns only active contacts
Example: true
False
Response
Field Type Description
contacts Contact[] Array of Contact objects
Example: Get Contacts
Request
curl --header 'Access-Token: <your_access_token_here>' \
     https://api.yappy.im/v1/devices/BF4DF979-86E9-830D-BFC3-7G9F084D237B/contacts?page=1&results=200
Response
{
    "contacts": [
        {
           "identifier":"aeba2a2e-0364-4608-a396-005068613e2f",
           "name":"Mercedes West Covina Service",
           "avatar_url":"https://www.yappy.im/api/avatar/aeba2a2e-0364-4608-a396-005068613e2f",
           "addresses":[  
               {  
                   "phone_formatted":"(877) 340-4598",
                   "type":"mobile",
                   "E164":"18773404598"
               }
           ],
           "active":false,
           "created":1448932025433,
           "modified":1448932025433
        }
    ]
}