---
title: "Update sync settings for MS Graph account."
method: PUT
path: "/api/v1/settings/microsoft"
tags: ["Settings"]
---

# Update sync settings for MS Graph account.

`PUT /api/v1/settings/microsoft`

## Request

- Base URL: `https://api.intheloop.io`
- URL: `https://api.intheloop.io/api/v1/settings/microsoft`
- Auth: API key in header `Authorization`

## Headers

- `Authorization` string

## Request body

- SyncSettingsMicrosoft: Sync settings Microsoft resource (only applicable for Microsoft Graph users)
  - `id` string: Resource id
  - `name` string: Resource name or title
  - `revision` string: Resource revision
  - `clientId` string: Resource client id
  - `$type` string, required
  - `isEnabled` boolean: Sync is enabled
  - `isPaused` boolean: Sync is paused (only contact sync is performed, no emails are imported)
  - `importDayRange` integer: Email import day range for the past
  - `threadingMode` 'Recipient' | 'Standard': Threading mode for syncing
  - `authCode` string: Authentication code
  - `redirectUri` string: Redirect URI used when obtaining authorization code
  - `codeVerifier` string: The same code_verifier that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request.
  - `refreshToken` string: Microsoft refresh token

## Response `200`

OK

- SyncSettingsMicrosoft: Sync settings Microsoft resource (only applicable for Microsoft Graph users)
  - `id` string: Resource id
  - `name` string: Resource name or title
  - `revision` string: Resource revision
  - `clientId` string: Resource client id
  - `$type` string, required
  - `isEnabled` boolean: Sync is enabled
  - `isPaused` boolean: Sync is paused (only contact sync is performed, no emails are imported)
  - `importDayRange` integer: Email import day range for the past
  - `threadingMode` 'Recipient' | 'Standard': Threading mode for syncing
  - `authCode` string: Authentication code
  - `redirectUri` string: Redirect URI used when obtaining authorization code
  - `codeVerifier` string: The same code_verifier that was used to obtain the authorization_code. Required if PKCE was used in the authorization code grant request.
  - `refreshToken` string: Microsoft refresh token

## Other responses

- `400`: Bad request. Check fields message and error code from response body for additional information.
- `401`: Unauthorized request. Check fields message and error code from response body for additional information.
- `429`: Too many requests. Check response header Retry-After indicating how long to wait before making a new request.
- `451`: Unavailable because account is not verified.

---

[API](https://skmtc.dev/intheloop/apis/loop-api.md) - [All operations](https://skmtc.dev/intheloop/apis/loop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/intheloop/apis/loop-api/revisions/0892c5ba0787?raw)
