Upstash Documentation

DECRBY

Decrement the integer value of a key by a given number.
1 min read

If a key does not exist, it is initialized as 0 before performing the operation. An error is returned if the key contains a value of the wrong type or contains a string that can not be represented as integer.

Arguments#

keystringrequired#

The key to decrement.

decrementByintegerrequired#

The amount to decrement by.

Response#