---
title: "Update a Client Key"
url: https://docs.sentry.io/api/projects/update-a-client-key/
---

# Update a Client Key | Sentry Docs

PUT /api/0/projects/{organization\_id\_or\_slug}/{project\_id\_or\_slug}/keys/{key\_id}/

Update various settings for a client key.

### Path Parameters

* `organization_id_or_slug` *(string)*

  REQUIRED

  The ID or slug of the organization the resource belongs to.

* `project_id_or_slug` *(string)*

  REQUIRED

  The ID or slug of the project the resource belongs to. Project slugs are unique within each organization.

* `key_id` *(string)*

  REQUIRED

  The ID of the key to update.

### Body Parameters

* `name` *(string)*

  The name for the client key

* `isActive` *(boolean)*

  Activate or deactivate the client key.

* `rateLimit` *(object)*

  Applies a rate limit to cap the number of errors accepted during a given time window. To disable entirely set `rateLimit` to null.

  ```json
  {
      "rateLimit": {
          "window": 7200, // time in seconds
          "count": 1000 // error cap
      }
  }
  ```

* `browserSdkVersion` *(string)*

  The Sentry Javascript SDK version to use. The currently supported options are:

  * `latest` - Most recent version
  * `7.x` - Version 7 releases

* `dynamicSdkLoaderOptions` *(object)*

  Configures multiple options for the Javascript Loader Script.

  * `Performance Monitoring`
  * `Debug Bundles & Logging`
  * `Session Replay` - Note that the loader will load the ES6 bundle instead of the ES5 bundle.
  * `User Feedback` - Note that the loader will load the ES6 bundle instead of the ES5 bundle.
  * `Logs and Metrics` - Note that the loader will load the ES6 bundle instead of the ES5 bundle. Requires SDK >= 10.0.0.

  ```json
  {
      "dynamicSdkLoaderOptions": {
          "hasReplay": true,
          "hasPerformance": true,
          "hasDebug": true,
          "hasFeedback": true,
          "hasLogsAndMetrics": true
      }
  }
  ```

### Scopes

You need to [authenticate via bearer auth token.](https://docs.sentry.io/api/auth.md)

`<auth_token>` requires one of the following scopes:

* `project:admin`
* `project:write`

```
curl https://sentry.io/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/keys/{key_id}/ \
 -H 'Authorization: Bearer <auth_token>' \
 -X PUT \
 -H 'Content-Type: application/json' \
 -d '{}'
```

RESPONSESCHEMA

```
Copied
{
  "id": "60120449b6b1d5e45f75561e6dabd80b",
  "name": "Liked Pegasus",
  "label": "Liked Pegasus",
  "public": "60120449b6b1d5e45f75561e6dabd80b",
  "secret": "189485c3b8ccf582bf5e12c530ef8858",
  "projectId": 4505281256090153,
  "isActive": true,
  "rateLimit": {
    "window": 7200,
    "count": 1000
  },
  "dsn": {
    "secret": "https://a785682ddda742d7a8a4088810e67701:bcd99b3790b3441c85ce4b1eaa854f66@o4504765715316736.ingest.sentry.io/4505281256090153",
    "public": "https://a785682ddda742d7a8a4088810e67791@o4504765715316736.ingest.sentry.io/4505281256090153",
    "csp": "https://o4504765715316736.ingest.sentry.io/api/4505281256090153/csp-report/?sentry_key=a785682ddda719b7a8a4011110d75598",
    "security": "https://o4504765715316736.ingest.sentry.io/api/4505281256090153/security/?sentry_key=a785682ddda719b7a8a4011110d75598",
    "minidump": "https://o4504765715316736.ingest.sentry.io/api/4505281256090153/minidump/?sentry_key=a785682ddda719b7a8a4011110d75598",
    "playstation": "https://o4504765715316736.ingest.sentry.io/api/4505281256090153/playstation/?sentry_key=a785682ddda719b7a8a4011110d75598",
    "integration": "https://o4504765715316736.ingest.sentry.io/api/4505281256090153/integration/",
    "otlp_traces": "https://o4504765715316736.ingest.sentry.io/api/4505281256090153/integration/otlp/v1/traces",
    "otlp_logs": "https://o4504765715316736.ingest.sentry.io/api/4505281256090153/integration/otlp/v1/logs",
    "nel": "https://o4504765715316736.ingest.sentry.io/api/4505281256090153/nel/?sentry_key=a785682ddda719b7a8a4011110d75598",
    "unreal": "https://o4504765715316736.ingest.sentry.io/api/4505281256090153/unreal/a785682ddda719b7a8a4011110d75598/",
    "cdn": "https://js.sentry-cdn.com/a785682ddda719b7a8a4011110d75598.min.js",
    "crons": "https://o4504765715316736.ingest.sentry.io/api/4505281256090153/crons/___MONITOR_SLUG___/a785682ddda719b7a8a4011110d75598/"
  },
  "browserSdkVersion": "7.x",
  "browserSdk": {
    "choices": [
      [
        "latest",
        "latest"
      ],
      [
        "7.x",
        "7.x"
      ]
    ]
  },
  "dateCreated": "2023-06-21T19:50:26.036254Z",
  "dynamicSdkLoaderOptions": {
    "hasReplay": true,
    "hasPerformance": true,
    "hasDebug": true,
    "hasFeedback": false,
    "hasLogsAndMetrics": false
  }
}
```

---

Find other pages: [Sitemap](https://docs.sentry.io/sitemap.md) lists every page with a one-line summary, and [llms.txt](https://docs.sentry.io/llms.txt) gives an overview with guidance for agents.
