---
title: "Set policies for a hashed key."
method: POST
path: "/tyk/keys/policy/{keyID}"
tags: ["Keys"]
---

# Set policies for a hashed key.

`POST /tyk/keys/policy/{keyID}`

This will set policies to a hashed key.

## Path parameters

- `keyID` string, required

## Request body

- PolicyUpdateObj
  - `apply_policies` string[], nullable
  - `policy` string

## Response `200`

Updated hashed key.

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

## Other responses

- `400` — Malformed request body.
- `403` — Forbidden
- `404` — Key not found.
- `500` — Internal server error.

---

[API](https://skmtc.net/tyktechnologies/apis/tyk-gateway-api.md) · [All operations](https://skmtc.net/tyktechnologies/apis/tyk-gateway-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tyktechnologies/tyk-gateway-api/versions/4ae998d5545e/schema)
