Bitium

Languages

Admin - Contacts

retrieve the contacts within an organization

List the contacts within an organization. Includes a basic profile for each contact, including the name, email, and id.

Required Scopes

  • ORG_READ

Request Parameters

Name Type Required Description
page integer No Page of results to fetch.
Default value: 1
per_page integer No Number of results to return per page.
sort_by string No Sort the results by name, grade, or activity
Default value: name Possible values: name, grade, activity
order string No Display the results in ascending or descending order
Default value: asc Possible values: asc, desc
groups Array No An array of groups to filter the result set by
created_after string No Only retrieve users created after the given datetime
created_before string No Only retrieve users created before the given datetime
not_subscribed_to integer No The ID of installation not subscribed by the contacts

 

Endpoint Copy

GET https://www.bitium.com/api/v2/organizations/{organization_id}/admin/contacts

Example Request

curl -H "Authorization: token {token}" \
-H "X-Device-Id: {unique_id}" \
https://www.bitium.com/api/v2/organizations/{organization_id}/admin/contacts?page=1&per_page=1&sort_by=1&order=1&created_after=1&created_before=1 

Example Response

[
  {
    "status": "invited", 
    "first_name": "Don", 
    "last_name": "Cheadle", 
    "name": "Don Cheadle", 
    "created_at": "2015-05-07T14:07:05.421-07:00", 
    "id": 31216, 
    "last_activity": null, 
    "last_activity_in_seconds": null, 
    "average_password_score": null, 
    "email": "don@bitium.com"
  }, 
  {
    "status": "active", 
    "first_name": "Brad", 
    "last_name": "Pitt", 
    "name": "Brad Pitt", 
    "created_at": "2015-05-07T14:07:05.309-07:00", 
    "id": 31214, 
    "last_activity": "2015-06-24T08:45:33.792-07:00", 
    "last_activity_in_seconds": 4869282.197845197, 
    "average_password_score": {
      "grade": "F", 
      "score": 0.13
    }, 
    "email": "brad@bitium.com"
  }, 
  {
    "status": "active", 
    "first_name": "Natalie", 
    "last_name": "Portman", 
    "name": "Natalie Portman", 
    "created_at": "2015-05-07T14:07:05.377-07:00", 
    "id": 31215, 
    "last_activity": "2015-05-07T14:28:07.146-07:00", 
    "last_activity_in_seconds": 8995928.843763433, 
    "average_password_score": {
      "grade": "F", 
      "score": 0.0
    }, 
    "email": "natalie@bitium.com"
  }
]

retrieve a contact

Required Scopes

  • ORG_READ

 

Endpoint Copy

GET https://www.bitium.com/api/v2/organizations/{organization_id}/admin/contacts/{contact_id}

Example Request

curl -H "Authorization: token {token}" \
-H "X-Device-Id: {unique_id}" \
https://www.bitium.com/api/v2/organizations/{organization_id}/admin/contacts/{contact_id} 

Example Response

{
  "status": "invited", 
  "first_name": "Don", 
  "last_name": "Cheadle", 
  "name": "Don Cheadle", 
  "created_at": "2015-05-07T14:07:05.421-07:00", 
  "id": 31216, 
  "last_activity": null, 
  "last_activity_in_seconds": null, 
  "subscriptions_count": 3, 
  "average_password_score": null, 
  "groups": [
    {
      "id": 4635, 
      "name": "Engineering"
    }, 
    {
      "id": 4636, 
      "name": "Marketing"
    }
  ], 
  "email": "don@bitium.com"
}