PUT /accounts/{account_id}/storage/kv/namespaces/{namespace_id}/bulk

Write multiple keys and values at once. Body should be an array of up to 10,000 key-value pairs to be stored, along with optional expiration information. Existing values and expirations will be overwritten. If neither expiration nor expiration_ttl is specified, the key-value pair will never expire. If both are set, expiration_ttl is used and expiration is ignored. The entire request size must be 100 megabytes or less.

Servers

Path parameters

Name Type Required Description
account_id String Yes
namespace_id String Yes

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
[] Array Yes
[].expiration Number No

Expires the key at a certain time, measured in number of seconds since the UNIX epoch.

[].base64 Boolean No

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.

Default value: false

[].key String Yes

A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid.

[].value String Yes

A UTF-8 encoded string to be stored, up to 25 MiB in length.

[].expiration_ttl Number No

Expires the key after a number of seconds. Must be at least 60.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.