KV Store

Increment a numeric value

Changed on
post/kv/incr

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

amountinteger nullable

Amount to increment by (default: 1)

keystring required

The key to increment

project_idinteger nullable

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

Example request

{
  "key": "counter",
  "project_id": 1
}

Response

Value incremented

valueinteger required

New value after increment

Example response

{
  "value": 42
}

Changes