KV Store

Get time-to-live for a key

Changed on
post/kv/ttl

Request

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

Request body

keystring required

The key to check TTL for

project_idinteger nullable

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

Example request

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

Response

TTL retrieved

ttlinteger required

TTL in seconds, -1 if no expiration, -2 if key doesn't exist

Example response

{
  "ttl": 3600
}

Changes