---
title: "Begin connecting an account"
method: POST
path: "/v1/admin/source-connections/oauth/start"
tags: ["Source Plane"]
---

# Begin connecting an account

`POST /v1/admin/source-connections/oauth/start`

## Request

- Base URL: `https://brain.inite.ai`
- URL: `https://brain.inite.ai/v1/admin/source-connections/oauth/start`
- Auth: HTTP bearer

For a connector that runs as a connected account: the provider’s consent URL (authorization code + PKCE, the connector’s scopes, a signed `state`) to open in a popup. The provider returns the browser to the public callback, which keeps the grant and posts `{ type: "brain-source-oauth", grantId, account }` to the `origin` named here. Connected accounts (docs/source-plane.md § Connected accounts): the brain as an outbound OAuth 2.1 client for the cloud connectors (gdrive, onedrive, dropbox). Answers a bare 404 until `SOURCE_PLANE_ENABLED=1` and `SOURCE_OAUTH_CLIENT=1`; needs `SOURCE_CREDENTIAL_ENCRYPTION_KEY` — tokens are never stored in the clear.

Required scope: `brain:admin`.

## Request body

- SourceOAuthStartRequest
  - `connector` string, required
  - `origin` string, uri
  - `ownerUserId` string
  - `provider` 'google' | 'microsoft' | 'dropbox' | 'pipedrive' | 'hubspot' | 'salesforce' | 'bitrix24' | 'kommo' | 'notion' | 'atlassian' | 'slack' | 'github' | 'gitlab', required

## Response `200`

Where to send the browser.

- SourceOAuthStartResponse
  - `authorizeUrl` string, required
  - `expiresAt` string, required
  - `state` string, required

## Other responses

- `400`: Validation failed.
- `401`: Missing or unknown bearer key.
- `403`: The key lacks the required scope.
- `404`: No such resource in this tenant.

---

[API](https://skmtc.dev/inite/apis/inite-brain-platform-api.md) · [All operations](https://skmtc.dev/inite/apis/inite-brain-platform-api/llms.txt) · [OpenAPI document](https://skmtc.dev/inite/apis/inite-brain-platform-api/revisions/c7c3eb5e304b?raw)
