---
search:
  tags:
    - OAuth applications
    - PATCH
seo:
  description: >-
    Renames an application, or replaces its scopes or… Reference for the PATCH
    /organizations/{organizationId}/oauth-clients/{clientId} endpoint in the
    Auth API.
sidebar:
  label: Update an OAuth application
  badge: PATCH
title: Update an OAuth application
type: openapi-operation
---
Renames an application, or replaces its scopes or Roles. Requires organization:update; adding or removing a Role that grants organization:delete also requires organization:delete. A revoked application cannot change (409).

`PATCH /organizations/{organizationId}/oauth-clients/{clientId}`

**Request body** (`application/json`, required)

- `name` (string)
- `scopes` (string[]) — Replaces the allowed scopes. Tokens already issued keep theirs until they expire.
- `roles` (string[]) — Replaces the Roles the client holds.

Request body example:

```json
{
  "name": "string",
  "scopes": [
    "string"
  ],
  "roles": [
    "string"
  ]
}
```

**Responses**

- `200` — The updated client.
- `default` — The request failed.

Response example, 200:

```json
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "client_id": "string",
  "name": "string",
  "scopes": [
    "string"
  ],
  "roles": [
    "string"
  ],
  "keys": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "kid": "string",
      "jwk": {},
      "created_at": "2019-08-24T14:15:22Z",
      "revoked_at": "2019-08-24T14:15:22Z"
    }
  ],
  "secrets": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "secret": "string",
      "hint": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "expires_at": "2019-08-24T14:15:22Z",
      "revoked_at": "2019-08-24T14:15:22Z"
    }
  ],
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "revoked_at": "2019-08-24T14:15:22Z"
}
```
