List Contacts

Prev Next
Get
/api/v1/contacts.list
Premium tag

List the authenticated user's personal contacts. Returns local contacts created in Rocket.Chat. When the workspace license includes the outlook-calendar module, the response also includes contacts imported by the Microsoft Exchange server-to-server sync and reports their count in syncedTotal.

Without the outlook-calendar module, Outlook-synced contacts are omitted and syncedTotal is 0.

Sortable fields: displayName, emails.address, phones.raw, categories, companyName, officeLocation, favorite.

Changelog

Version Description
9.1.0 Added
Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Query parameters
offset
integer

Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.

Example50
count
integer

The number of items to return. Refer to the official documentation to learn more.

Example50
sort

List of fields to order by, and in which direction. This is a JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, {"value": -1, "_id": 1}. Refer to the official documentation to learn more.

text
string

Filter contacts by free-text search.

favorite
boolean

When true, return only favorite contacts. When false, return only contacts that are not favorites.

Responses
200

OK

Example 1
{
  "items": [
    {
      "_id": "690c2b2d4e7e8bcf6985b3d8",
      "source": "local",
      "displayName": "John Doe",
      "givenName": "John",
      "surname": "Doe",
      "emails": [
        {
          "address": "john.doe@example.com",
          "label": "work"
        }
      ],
      "phones": [
        {
          "raw": "+1 555 0100",
          "e164": "+15550100",
          "label": "mobile"
        }
      ],
      "favorite": true,
      "_updatedAt": "2025-11-05T07:53:43.420Z"
    }
  ],
  "count": 1,
  "offset": 0,
  "total": 1,
  "syncedTotal": 0,
  "success": true
}
Expand All
object
items
Array of object (Contact)
object

A personal contact returned by the Contacts API. Sync-only fields (uid, externalId, folderId, lastSyncAt) are never included.

_id
string
source
string

local for contacts created in Rocket.Chat. outlook for contacts imported by Microsoft Exchange server-to-server sync.

Valid values[ "local", "outlook" ]
displayName
string
givenName
string
surname
string
companyName
string
officeLocation
string
emails
Array of object
object
address
string
label
string

Present on local contacts. Exchange imports may omit it.

phones
Array of object
object
raw
string
e164
string

E.164 form when raw includes a resolvable country code.

label
string
categories
Array of string
string
favorite
boolean
syncProvider
string

Set on Outlook-synced contacts. Either ews or graph.

Valid values[ "ews", "graph" ]
_updatedAt
string
count
integer
offset
integer
total
integer
syncedTotal
integer

Number of Outlook-synced contacts owned by the caller. 0 without the outlook-calendar license.

success
boolean
400

Bad Request

Invalid Sort Keys
{
  "success": false,
  "error": "error-invalid-sort-keys"
}
object
success
boolean
error
string
401

Unauthorized

Authorization Error
{
  "success": false,
  "error": "You must be logged in to do this."
}
object
success
boolean
error
string
403

Forbidden

Permission Error
{
  "success": false,
  "error": "User does not have the permissions required for this action",
  "errorType": "error-forbidden"
}
object
success
boolean
error
string
errorType
string