> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-dx-3009-array-sdk-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ARINSERT

> Append values after the array append cursor.

On a new array, appends start at index zero. [ARSET](./arset) and [ARMSET](./armset) leave the cursor unchanged, so appending after positional writes can overwrite values. Use [ARSEEK](./arseek) to choose the next append index.

## Arguments

<ParamField body="key" type="str" required>
  The array key.
</ParamField>

<ParamField body="values" type="*values: ValueT" required>
  One or more values to write. Values may be strings, integers, floats, or booleans.
</ParamField>

## Response

<ResponseField type="int" required>
  The index where the last value was written, as a string in TypeScript or an integer in Python.
</ResponseField>

<RequestExample>
  ```py Example theme={"system"}
  print(redis.arinsert("events", "boot", "ready"))  # 1
  print(redis.arinsert("events", "running"))  # 2
  print(redis.arnext("events"))  # 3
  ```
</RequestExample>

See the [server command reference](/redis/commands/array/arinsert) for protocol details.
