---
title: "Save Grant"
method: PUT
path: "/api/py/integrations/{provider}/grant"
---

# Save Grant

`PUT /api/py/integrations/{provider}/grant`

## 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}/grant`
- Auth: none declared

Save credentials validated by a trusted integration callback.

## Path parameters

- `provider` string, required

## Request body

- SaveGrantBody
  - `principal_type` 'user' | 'org', required: Who owns a credential; extensible (AUC-5797 §2).
  - `principal_id` string, required
  - `external_key` string
  - `state` 'active' | 'pending'
  - `access_token` string, required
  - `refresh_token` string, nullable
  - `expires_in` integer, nullable
  - `scope` string, nullable
  - `token_type` string, nullable
  - `metadata` object
  - `site` GrantSiteSave
    - `site` GrantSite, required
      - `id` string, required
      - `server_url` string, required
      - `access_token` string, required
      - `site_name` string, nullable
      - `user_info` object
      - `confluence_version` string, nullable
      - `created_at` string, nullable
    - `allow_duplicate_url` boolean

## Response `200`

Successful Response

- SaveGrantResponse
  - `state` 'pending' | 'active' | 'needs_reauth' | 'revoked', required
  - `provider` string, required
  - `grant_id` string, nullable
  - `grant_version` string, date-time, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-24** `91ca93f86d79`: 1 info
  - added the new optional request property `site`
- **2026-09-22** `a5de876e9fc3`: 2 info
  - added the optional property `grant_id` to the response with the `200` status
  - added the optional property `grant_version` to the response with the `200` status
- **2026-09-18** `7b53a5de46ee`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/getauctor/apis/getauctor-api/changes/api/py/integrations/:provider/grant/put.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)
