---
title: "PUT /key-value-stores/{KvsARN}/keys/{Key}#If-Match"
method: PUT
path: "/key-value-stores/{KvsARN}/keys/{Key}#If-Match"
---

# PUT /key-value-stores/{KvsARN}/keys/{Key}#If-Match

`PUT /key-value-stores/{KvsARN}/keys/{Key}#If-Match`

Creates a new key value pair or replaces the value of an existing key.

## Path parameters

- `Key` string, required
- `KvsARN` string, required

## Headers

- `If-Match` string, required

## Request body

- object
  - `Value` string, password, required — The value to put.

## Response `200`

Success

- PutKeyResponse — Metadata information about a Key Value Store.
  - `ItemCount` integer, required — Number of key value pairs in the Key Value Store after the successful put.
  - `TotalSizeInBytes` integer, required — Total size of the Key Value Store after the successful put, in bytes.

## Other responses

- `480` — ConflictException
- `481` — ValidationException
- `482` — InternalServerException
- `483` — ServiceQuotaExceededException
- `484` — ResourceNotFoundException
- `485` — AccessDeniedException

---

[API](https://skmtc.net/aws/apis/cloudfront-keyvaluestore.md) · [All operations](https://skmtc.net/aws/apis/cloudfront-keyvaluestore/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/cloudfront-keyvaluestore/versions/81b65599e9cc/schema)
