cf_kv_set
Writes a key/value pair into a Cloudflare Workers KV namespace, with optional TTL, metadata, and JSON validation before storing.
Instructions
Write one key/value pair into a Workers KV namespace. Optional ttl in seconds (max 604800) and JSON metadata; set is_json when the value is a JSON document that should be validated before write.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | ||
| ttl | No | ||
| value | Yes | ||
| is_json | No | ||
| namespace | Yes | ||
| metadata_json | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| error | No | ||
| result | No |