Skip to main content
Use APPEND to add a value to the end of the string stored at a key. If the key does not exist it is created with the given value, so the command behaves like SET on a fresh key. The reply is the length of the string after the append. Redis grows the underlying buffer with room to spare, so repeated appends stay cheap, which makes this a reasonable way to accumulate log lines or serialized events into one value; GETRANGE can then read back a slice without transferring the whole thing.

Syntax

Arguments

Response

The reply reports the result of the operation. Error replies have the same shape in RESP2 and RESP3 and are surfaced as exceptions by the SDKs below.
Client libraries often decode bulk strings, maps, sets, and numeric strings into language-native values. The table describes the Redis wire reply.

Examples

TCP examples use the TLS REDIS_URL from the Upstash console. REST examples use UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN.