---
title: "Update an OAuth client"
method: PUT
path: "/admin/partners/{partner_id}/oauth-clients/{client_pk}"
tags: ["partner-admin"]
---

# Update an OAuth client

`PUT /admin/partners/{partner_id}/oauth-clients/{client_pk}`

## Path parameters

- `partner_id` integer, required
- `client_pk` integer, required

## Request body

- PartnerOAuthClientRequest
  - `allow_refresh_token` boolean
  - `allowed_scopes` string[]
  - `client_type` 'confidential' | 'public'
  - `display_name` string
  - `homepage_url` string, nullable
  - `is_active` boolean — Update only
  - `privacy_policy_url` string, nullable
  - `redirect_uris` string[] — Exact-match allowlist. No wildcards or prefix matching.

## Response `200`

Client updated

- PartnerOAuthClientResponse
  - `active_grant_count` integer
  - `allow_refresh_token` boolean
  - `allowed_scopes` string[]
  - `client_id` string
  - `client_secret` string — Returned once, at creation and at rotation only
  - `client_type` string
  - `created_time` string, date-time, nullable
  - `display_name` string
  - `has_logo` boolean — Whether an RxFood-hosted logo has been uploaded
  - `has_secret` boolean
  - `homepage_url` string, nullable
  - `id` integer
  - `is_active` boolean
  - `partner_id` integer
  - `previous_secret_expires_at` string, date-time, nullable — When the superseded secret stops being accepted
  - `privacy_policy_url` string, nullable
  - `redirect_uris` string[]
  - `require_hospital_membership` boolean
  - `secret_rotated_time` string, date-time, nullable
  - `updated_time` string, date-time, nullable

## Other responses

- `400` — Validation error
- `404` — OAuth client not found

---

[API](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server.md) · [All operations](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server/llms.txt) · [OpenAPI document](https://skmtc.dev/rxfoodapp/apis/inneranalytics-mnt-server/revisions/c17aca2782f6?raw)
