Zebflow Docs
kv.entry.delete
Zebflow Docs

kv.entry.delete

Delete the entry --key from the project's key-value store (--durable for the disk-backed one)

kv.entry.delete --key TEXT [--durable] → entry

Delete the entry --key from the project's key-value store (--durable for the disk-backed one). Adds entry: { key, deleted } and keeps the rest of the payload; a key that is not there answers deleted: false. Use it to consume a one-time value — an OAuth state, a reset token — right after kv.entry.get read it, so it cannot be used twice.

Flags

  • --key (required): The entry to delete. Usually a {{ }} expression.
  • --durable: Use the disk-backed store, which survives a restart. Default: the in-memory one.

Examples

Consume a one-time state

| kv.entry.delete --key "oauth:state:{{ $trigger.query.state }}"

It answers:

json
{  "entry": {    "key": "oauth:state:3f9c",    "deleted": true  }}