accounts/contacts

Supported methods

List methods:GET

Instance methods:GET

Sub-resources

files messages threads

Contacts list

GET: Listing contacts in an account

GET https://api.context.io/2.0/accounts/id/contactstest it
idUnique id of an account accessible through your API key

List filters

nametypedescription
optional:
searchstringString identifying the name or the email address of the contact(s) you are looking for.
active_beforeinteger
(Unix timestamp)
Only include contacts included in at least one email dated before a given time. This parameter should be a standard Unix timestamp
active_afterinteger
(Unix timestamp)
Only include contacts included in at least one email dated after a given time. This parameter should be a standard Unix timestamp
sort_bystringThe field by which to sort the returned results. Possible values are email, count, received_count and sent_count
sort_orderstringThe sort order of the returned results. Possible values are asc and desc
limitintegerThe maximum number of results to return. The maximum limit is 100.
offsetintegerStart the list at this offset (zero-based).

Response body

{
  "query": {
    "limit": numberMaximum number of results returned,
    "offset": numberOffset requested in query (zero based),
    "active_after": numberResults include contacts in at least one email dated after a given time,
    "active_before": numberResults include contacts in at least one email dated before a given time,
    "search": stringResults included contacts whose name of address match this search term
  },
  "matches": [
    {
      "email": stringemail address of contact,
      "count": numbernumber of messages that include this contact,
      "sent_count": numbernumber of messages that include the contact in To, CC, or BCC,
      "received_count": numbernumber of messages that include the contact in From,
      "sent_from_account_count": numbernumber of messages that include the contact in To, CC, or BCC and an email from this account in From,
      "name": stringname associated with contact,
      "thumbnail": stringURL pointing to Gravatar image associated to contact's email address, if applicable
    },
    ...
  ]
}

Contact instance

GET: Information about a given contact

GET https://api.context.io/2.0/accounts/id/contacts/emailtest it
idUnique id of an account accessible through your API key
emailEmail address of a contact

Response body

{
  "count": numbernumber of messages that include this contact,
  "sent_count": numbernumber of messages that include the contact in To, CC, or BCC,
  "received_count": numbernumber of messages that include the contact in From,
  "sent_from_account_count": numbernumber of messages that include the contact in To, CC, or BCC and an email from this account in From,
  "name": stringFull name of contact,
  "thumbnail": stringURL pointing to Gravatar image associated to contact's email address, if applicable,
  "last_received": numberUnix timestamp of date the last message was received,
  "last_sent": numberUnix timestamp of date the last message was sent,
  "emails": ArrayArray of email addresses for this contact
}