> ## Documentation Index > Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Sync My Exchange Contacts >
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 | ## OpenAPI ````json POST /api/v1/exchange.syncMyContacts { "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Miscellaneous" }, "servers": [ { "url": "https://apiexplorer.support.rocket.chat" } ], "tags": [ { "name": "Commands" }, { "name": "Email Inbox" }, { "name": "Licenses" }, { "name": "Mailer" }, { "name": "Calendar Events" }, { "name": "Exchange" }, { "name": "Contacts" }, { "name": "WhatsApp" }, { "name": "Rasa App" }, { "name": "Jitsi App" } ], "paths": { "/api/v1/exchange.syncMyContacts": { "post": { "summary": "Sync My Exchange Contacts", "tags": [ "Exchange" ], "operationId": "post-api-v1-exchange.syncMyContacts", "description": "
\"Premium
\n\nSync the authenticated user's Outlook contacts into Rocket.Chat through the Microsoft Exchange server-to-server integration.\n\nRequires 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.\n\n### Changelog\n| Version | Description |\n| ------- | ----------- |\n| 9.1.0 | Added |", "parameters": [ { "$ref": "#/components/parameters/Auth-Token" }, { "$ref": "#/components/parameters/UserId" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "folders": { "type": "integer" }, "upserted": { "type": "integer" }, "modified": { "type": "integer" }, "deleted": { "type": "integer" }, "pruned": { "type": "integer" }, "success": { "type": "boolean" } } }, "examples": { "Example 1": { "value": { "folders": 1, "upserted": 12, "modified": 3, "deleted": 1, "pruned": 0, "success": true } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Server Sync Disabled": { "value": { "success": false, "error": "Exchange_Server_Sync_Disabled" } }, "Contacts Sync Disabled": { "value": { "success": false, "error": "Exchange_Contacts_Sync_Disabled" } }, "Email Not Verified": { "value": { "success": false, "error": "Exchange_Sync_email_not_verified" } }, "Sync In Progress": { "value": { "success": false, "error": "Exchange_Sync_in_progress" } }, "License Required": { "value": { "success": false, "error": "This is an enterprise feature [error-action-not-allowed]", "errorType": "error-action-not-allowed" } } } } } }, "401": { "$ref": "#/components/responses/authorizationError" }, "403": { "$ref": "#/components/responses/forbiddenError" }, "500": { "description": "Internal Server Error", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Sync Failed": { "value": { "success": false, "error": "Outlook_contact_sync_failed" } } } } } } } } } }, "components": { "parameters": { "Auth-Token": { "name": "X-Auth-Token", "in": "header", "description": "The `authToken` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f" }, "UserId": { "name": "X-User-Id", "in": "header", "description": "The `userId` of the authenticated user.", "required": true, "schema": { "type": "string" }, "example": "rbAXPnMktTFbNpwtJ" } }, "responses": { "authorizationError": { "description": "Unauthorized", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" } } }, "examples": { "Authorization Error": { "value": { "success": false, "error": "You must be logged in to do this." } } } } } }, "forbiddenError": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "error": { "type": "string" }, "errorType": { "type": "string" } } }, "examples": { "Permission Error": { "value": { "success": false, "error": "User does not have the permissions required for this action", "errorType": "error-forbidden" } } } } } } } } } ````