---
title: "Update a policy."
method: PUT
path: "/tyk/policies/{polID}"
tags: ["Policies"]
---

# Update a policy.

`PUT /tyk/policies/{polID}`

You can update a Policy in your Tyk Instance by ID.

## Path parameters

- `polID` string, required

## Request body

- Policy
  - `_id` string
  - `access_rights` object, nullable
  - `active` boolean
  - `enable_http_signature_validation` boolean
  - `graphql_access_rights` object, nullable
  - `hmac_enabled` boolean
  - `id` string
  - `is_inactive` boolean
  - `key_expires_in` integer
  - `last_updated` string
  - `max_query_depth` integer
  - `meta_data` object, nullable
  - `name` string
  - `org_id` string
  - `partitions` PolicyPartitions
    - `acl` boolean
    - `complexity` boolean
    - `per_api` boolean
    - `quota` boolean
    - `rate_limit` boolean
  - `per` number, double
  - `post_expiry_action` 'retain' | 'delete' — Defines the action to take on a Session in Redis after it expires. Valid values are "retain" and "delete".
  - `post_expiry_grace_period` integer — Duration in seconds to retain a Session in Redis after it expires. Used with post_expiry_action "retain". Set to -1 to retain indefinitely.
  - `quota_max` integer
  - `quota_renewal_rate` integer
  - `rate` number, double
  - `smoothing` RateLimitSmoothing, nullable
    - `delay` integer
    - `enabled` boolean
    - `step` integer
    - `threshold` integer
    - `trigger` number
  - `tags` string[], nullable
  - `throttle_interval` number, double
  - `throttle_retry_limit` integer

## Response `200`

Policy updated

- ApiModifyKeySuccess
  - `action` string
  - `key` string
  - `key_hash` string
  - `status` string

## Other responses

- `400` — malformed request
- `403` — Forbidden
- `500` — Internal server error.

## Changes

- **2026-04-08** `dd3336b65081` — 2 info
  - added the new optional request property `post_expiry_action`
  - added the new optional request property `post_expiry_grace_period`
- **2025-02-07** `3d8e4f5b3dab` — 3 info
  - the request property `access_rights/additionalProperties/endpoints/items/methods/items/limit/smoothing` became nullable
  - the request property `access_rights/additionalProperties/limit/smoothing` became nullable
  - the request property `smoothing` became nullable
- **2024-09-18** `111affa17abe` — 5 breaking, 1 warning, 33 info
  - added the new path request parameter `polID`
  - the `_id` request property type changed from `object` to `string`
  - the `key_expires_in` request property type changed from `number` to `integer`
  - the `max_query_depth` request property type changed from `number` to `integer`
  - …35 more
- **2024-08-21** `31989871353c` — 1 warning, 1 info
  - removed the request property `access_rights/additionalProperties/limit/smoothing`
  - added the new optional request property `access_rights/additionalProperties/endpoints`
- **2024-06-17** `1938d97cb6b5` — 2 info
  - added the new optional request property `access_rights/additionalProperties/limit/smoothing`
  - added the new optional request property `smoothing`

[Full history](https://skmtc.dev/tyktechnologies/apis/tyk-gateway-api/changes/tyk/policies/:polID/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-service-production.skmtc.workers.dev/v1/apis/tyktechnologies/tyk-gateway-api/revisions/900d0a33ae1d/schema)
