---
title: "Update an integration"
method: PATCH
path: "/api/v1/integrations/{integrationId}"
tags: ["Integrations"]
---

# Update an integration

`PATCH /api/v1/integrations/{integrationId}`

## Request

- Base URL: `https://app.khotan.com`
- URL: `https://app.khotan.com/api/v1/integrations/{integrationId}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Updates an integration's display name. Pass null to clear it. Tokens and the mailbox are fixed by OAuth and cannot be changed.

## Path parameters

- `integrationId` string, required

## Request body

- object
  - `name` string, nullable, required

## Response `200`

The updated integration.

- object
  - `id` string, required
  - `provider` 'google' | 'microsoft', required
  - `mailbox` string, required
  - `name` string, nullable, required
  - `status` 'active' | 'revoked' | 'error', required
  - `scopes` string[], required
  - `hasRefreshToken` boolean, required
  - `hasAccessToken` boolean, required
  - `accessTokenExpiresAt` string, nullable, required
  - `lastSyncedAt` string, nullable, required
  - `createdAt` string, required
  - `updatedAt` string, required

## Other responses

- `400`: The request was malformed or failed validation.
- `401`: Authentication is missing or invalid.
- `404`: The resource was not found.
- `429`: Too many requests; retry after the indicated delay.

---

[API](https://skmtc.dev/khotan/apis/khotan-api.md) - [All operations](https://skmtc.dev/khotan/apis/khotan-api/llms.txt) - [OpenAPI document](https://skmtc.dev/khotan/apis/khotan-api/revisions/90b512a53e42?raw)
