Using
Permanently removes a key from the domain. The operation is idempotent; deleting a non-existent key still returns 204. `If-Match` makes the delete conditional on the version read.
applies to v0.5.1DELETE
/store-api/kv/{domain}/keys/{key}
const url = 'https://example.com/store-api/kv/example/keys/example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/store-api/kv/example/keys/example \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”domain
required
string
Domain name
key
required
string
Key (valid UTF-8, max 256 bytes)
Header Parameters
Section titled “Header Parameters”If-Match
string | null
ETag from a prior read: delete only if it is still the key’s current version, else 412
If-None-Match
string | null
Only *: delete only if the key does not exist, else 412. Evaluated after If-Match
Responses
Section titled “Responses”Key deleted
Invalid key, or invalid If-Match / If-None-Match header
Media typetext/plain
string
Domain is being deleted
Media typetext/plain
string
If-Match or If-None-Match does not hold; nothing was deleted
Media typetext/plain
string
Headers
Section titled “Headers”ETag
string
ETag of the key’s current version; absent when the key does not exist
The domain requires conditional writes and neither If-Match nor If-None-Match is set
Media typetext/plain
string
Headers
Section titled “Headers”Cache-Control
string
No-store
Rate limit exceeded
Media typetext/plain
string
Headers
Section titled “Headers”Retry-After
integer format: int64
Insufficient Storage — disk space or memory runs short; the write was not applied. Reads go on; retry after the seconds in Retry-After.
Media typetext/plain
string
Headers
Section titled “Headers”Retry-After
integer