---
title: "Start connecting an integration"
method: POST
path: "/api/v1/integrations"
tags: ["Integrations"]
---

# Start connecting an integration

`POST /api/v1/integrations`

## Request

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

Begins a Gmail (`google`) or Outlook (`microsoft`) mailbox connection and returns a connect URL. The provider defaults to `google`. OAuth consent happens in a browser, so a human must open the returned URL to authorize; the connection appears in the list once approved. Returns 503 provider_not_configured when the requested provider is not configured in this environment.

## Request body

- object
  - `provider` 'google' | 'microsoft'

## Response `200`

A connect URL for the requested provider.

- object
  - `provider` 'google' | 'microsoft', required
  - `connectUrl` 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.
- `503`: Response.

---

[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)
