---
title: "Exchange"
method: POST
path: "/api/py/integrations/{provider}/exchange"
---

# Exchange

`POST /api/py/integrations/{provider}/exchange`

## Request

- Base URL: `https://api.getauctor.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getauctor.com/api/py/integrations/{provider}/exchange`
- Auth: none declared

## Path parameters

- `provider` string, required

## Request body

- ExchangeBody
  - `principal_type` 'user' | 'org', required: Who owns a credential; extensible (AUC-5797 §2).
  - `principal_id` string, required
  - `external_key` string
  - `state` string, required
  - `code` string, required

## Response `200`

Successful Response

- ExchangeResponse
  - `state` 'pending' | 'active' | 'needs_reauth' | 'revoked', required
  - `provider` string, required
  - `context` object

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-01** `aeb6faa3b8f0`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/getauctor/apis/getauctor-api/changes/api/py/integrations/:provider/exchange/post.md)

---

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