---
title: "Credentials"
method: POST
path: "/api/py/integrations/{provider}/credentials"
---

# Credentials

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

## Path parameters

- `provider` string, required

## Request body

- CredentialsBody
  - `principal_type` 'user' | 'org', required — Who owns a credential; extensible (AUC-5797 §2).
  - `principal_id` string, required
  - `external_key` string
  - `credentials` object, required

## Response `200`

Successful Response

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

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/getauctor/apis/fastapi.md) · [All operations](https://skmtc.dev/getauctor/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getauctor/fastapi/revisions/aeb6faa3b8f0/schema)
