{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Writes up to 10,000 key-value pairs to the specified Workers KV namespace from a JSON array, with optional metadata and expiration settings for each pair. Existing values and expirations are overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence. The entire request must be 100 megabytes or less. The result reports the number of successful writes and any keys that failed and should be retried.","properties":{"path":{"type":"object","properties":{"namespace_id":{"$ref":"#/definitions/workers-kv_namespace_identifier"},"account_id":{"$ref":"#/definitions/workers-kv_identifier"}},"required":["namespace_id","account_id"],"additionalProperties":false},"body":{"$ref":"#/definitions/workers-kv_bulk_write"}},"required":["path","body"],"additionalProperties":false,"definitions":{"workers-kv_namespace_identifier":{"description":"ID of the Workers KV namespace.","type":"string","maxLength":32,"examples":["0f2ac74b498b48028cb68387c421e279"]},"workers-kv_identifier":{"description":"ID of the Cloudflare account that owns the Workers KV namespaces.","type":"string","maxLength":32,"examples":["023e105f4ecef8ad9ca31a8372d0c353"]},"workers-kv_bulk_write":{"type":"array","items":{"properties":{"base64":{"description":"Indicates whether or not the server should base64 decode the value before storing it. Useful for writing values that wouldn't otherwise be valid JSON strings, such as images.","type":"boolean","default":false},"expiration":{"$ref":"#/definitions/workers-kv_expiration"},"expiration_ttl":{"$ref":"#/definitions/workers-kv_expiration_ttl"},"key":{"$ref":"#/definitions/workers-kv_key_name_bulk"},"metadata":{"$ref":"#/definitions/workers-kv_list_metadata"},"value":{"description":"A UTF-8 encoded string to be stored, up to 25 MiB in length.","type":"string","maxLength":26214400,"examples":["Some string"]}},"required":["key","value"],"type":"object"},"maxItems":10000},"workers-kv_expiration":{"description":"Expires the key at a certain time, measured in number of seconds since the UNIX epoch.","type":"number","examples":[1578435000]},"workers-kv_expiration_ttl":{"description":"Number of seconds until the key expires. Must be at least 60. Takes precedence over `expiration` when both are specified.","type":"number","minimum":60,"examples":[300]},"workers-kv_key_name_bulk":{"description":"A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid.","type":"string","maxLength":512,"examples":["My-Key"]},"workers-kv_list_metadata":{"description":"Arbitrary JSON that is associated with a key.","allOf":[{"$ref":"#/definitions/workers-kv_any"}],"examples":[{"someMetadataKey":"someMetadataValue"}]},"workers-kv_any":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"integer"},{"type":"boolean"},{"additionalProperties":true,"type":["object","null"]},{"items":{"$ref":"#/definitions/workers-kv_any"},"type":"array"}]}}},"name":"Write multiple key-value pairs","id":"cloudflare.workers-kv-namespace-write-multiple-key-value-pairs","example":{"path":{"namespace_id":"0f2ac74b498b48028cb68387c421e279","account_id":"023e105f4ecef8ad9ca31a8372d0c353"},"body":[]},"maxRequests":1,"summary":false}}