KV Store

Set expiration on a key

post/kv/expire

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/kv/expire
  • Auth: HTTP bearer

Request body

keystring required

The key to set expiration on

project_idinteger nullable

Project ID (required for API key/session auth, optional for deployment tokens)

secondsinteger required

Expiration time in seconds

Example request

{
  "key": "session:abc",
  "project_id": 1,
  "seconds": 3600
}

Response

Expiration set

successboolean required

True if expiration was set, false if key doesn't exist

Changes

No recorded changes to this operation across all 53 revisions of this API.