Sync My Exchange Contacts

Prev Next
Post
/api/v1/exchange.syncMyContacts
Premium tag

Sync the authenticated user's Outlook contacts into Rocket.Chat through the Microsoft Exchange server-to-server integration.

Requires the outlook-calendar license module. Server-to-server sync and contact sync must both be enabled (Exchange_Contacts_Sync_Enabled). Rate limited to 3 requests per minute per user.

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
Responses
200

OK

Example 1
{
  "folders": 1,
  "upserted": 12,
  "modified": 3,
  "deleted": 1,
  "pruned": 0,
  "success": true
}
object
folders
integer
upserted
integer
modified
integer
deleted
integer
pruned
integer
success
boolean
400

Bad Request

Server Sync Disabled
{
  "success": false,
  "error": "Exchange_Server_Sync_Disabled"
}
Contacts Sync Disabled
{
  "success": false,
  "error": "Exchange_Contacts_Sync_Disabled"
}
Email Not Verified
{
  "success": false,
  "error": "Exchange_Sync_email_not_verified"
}
Sync In Progress
{
  "success": false,
  "error": "Exchange_Sync_in_progress"
}
License Required
{
  "success": false,
  "error": "This is an enterprise feature [error-action-not-allowed]",
  "errorType": "error-action-not-allowed"
}
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
500

Internal Server Error

Sync Failed
{
  "success": false,
  "error": "Outlook_contact_sync_failed"
}
object
success
boolean
error
string