---
title: "Exchange Connector Code"
method: POST
path: "/connectors/{provider_id}/exchange"
tags: ["connectors"]
---

# Exchange Connector Code

`POST /connectors/{provider_id}/exchange`

## Request

- Base URL: `https://studio-api.meganova.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://studio-api.meganova.ai/connectors/{provider_id}/exchange`
- Auth: OAuth 2
  - Password
  - Token URL: `auth/token`

Exchange OAuth authorization code for tokens and create the connection.

## Path parameters

- `provider_id` string, required

## Request body

- OAuthExchangeRequest
  - `code` string, required
  - `space_id` string, uuid, required
  - `domain` string, nullable

## Response `200`

Successful Response

- SpaceConnectorResponse: A connected connector for a space.
  - `id` string, uuid, required
  - `provider_id` string, required
  - `provider_name` string, required
  - `provider_icon_url` string, nullable
  - `is_active` boolean, required
  - `connected_account` ConnectedAccountInfo
    - `email` string, nullable
    - `name` string, nullable
  - `last_tested_at` string, date-time, nullable
  - `last_test_success` boolean, nullable
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

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