---
title: "PUT /tyk/keys/{keyId}"
method: PUT
path: "/tyk/keys/{keyId}"
---

# PUT /tyk/keys/{keyId}

`PUT /tyk/keys/{keyId}`

Update an *API token* with the *session object* defined in the body, this operatin overwrites the existing object

## Path parameters

- `keyId` string, required

## Query parameters

- `suppress_reset` number
- `api_id` string, string, required

## Headers

- `x-tyk-authorization` string, string, required

## Request body

- SessionObject
  - `allowance` number
  - `rate` number
  - `per` number
  - `expires` number
  - `quota_max` number
  - `quota_renews` number
  - `quota_remaining` number
  - `quota_renewal_rate` string
  - `access_rights` object
  - `org_id` string
  - `meta_data` object
  - `oauth_client_id` string
  - `basic_auth_data` object
    - `password` string
    - `hash_type` '' | 'bcrypt'
  - `jwt_data` object
    - `secret` string
  - `hmac_enabled` boolean
  - `hmac_string` string
  - `is_inactive` boolean
  - `apply_policy_id` string
  - `monitor` object
    - `trigger_limits` string[]
  - `tags` string[]

## Response `200`

Key Updated Response

## Changes

- **2016-02-19** `f48fc3ed1f02` — 1 breaking
  - added the new required `header` request parameter `x-tyk-authorization`
- **2016-02-19** `46e2c53ea40f` — 1 warning
  - deleted the `header` request parameter `x-tyk-authorization`

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

---

[API](https://skmtc.dev/tyktechnologies/apis/gateway-rest-api.md) · [All operations](https://skmtc.dev/tyktechnologies/apis/gateway-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/tyktechnologies/gateway-rest-api/revisions/de93b47616b5/schema)
