---
title: "Update Key"
method: PUT
path: "/tyk/keys/{keyID}"
tags: ["Keys"]
---

# Update Key

`PUT /tyk/keys/{keyID}`

You can also manually add keys to Tyk using your own key-generation algorithm. It is recommended if using this approach to ensure that the OrgID being used in the API Definition and the key data is blank so that Tyk does not try to prepend or manage the key in any way.

## Query parameters

- `suppress_reset` '1'

## Request body

- SessionState — There's a data structure that's based on this and it's used for Protocol Buffer support, make sure to update "coprocess/proto/coprocess_session_state.proto" and generate the bindings using: cd coprocess/proto && ./update_bindings.sh
  - `tags` string[]
  - `access_rights` object
  - `alias` string
  - `allowance` number, double
  - `apply_policies` string[]
  - `apply_policy_id` string
  - `basic_auth_data` object
    - `hash_type` string
    - `password` string
  - `certificate` string
  - `data_expires` integer
  - `enable_detail_recording` boolean
  - `expires` integer
  - `hmac_enabled` boolean
  - `hmac_string` string
  - `id_extractor_deadline` integer
  - `is_inactive` boolean
  - `jwt_data` object
    - `secret` string
  - `last_check` integer
  - `last_updated` string
  - `meta_data` object
  - `monitor` object
    - `trigger_limits` number[]
  - `oauth_client_id` string
  - `oauth_keys` object
  - `org_id` string
  - `per` number, double
  - `quota_max` integer
  - `quota_remaining` integer
  - `quota_renewal_rate` integer
  - `quota_renews` integer
  - `rate` number, double
  - `session_lifetime` integer
  - `throttle_interval` number, double
  - `throttle_retry_limit` integer

## Response `200`

Key updated

- ApiModifyKeySuccess — apiModifyKeySuccess represents when a Key modification was successful
  - `action` string
  - `key` string — in:body
  - `key_hash` string
  - `status` string

## Other responses

- `400` — No or incorrect Key ID specified

## Changes

- **2022-05-24** `111d8ca21864` — 20 breaking, 18 warning, 6 info
  - the request property `access_rights` became not nullable
  - the request property `access_rights/additionalProperties/allowed_urls` became not nullable
  - the request property `access_rights/additionalProperties/allowed_urls/items/methods` became not nullable
  - the request property `access_rights/additionalProperties/versions` became not nullable
  - …40 more

[Change history](https://skmtc.dev/tyktechnologies/apis/tyk-gateway-api/changes/tyk/keys/:keyID/put.md)

---

[API](https://skmtc.dev/tyktechnologies/apis/tyk-gateway-api.md) · [All operations](https://skmtc.dev/tyktechnologies/apis/tyk-gateway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tyktechnologies/apis/tyk-gateway-api/revisions/893d08bd04c2?raw)
