---
title: "Append an event"
method: POST
path: "/v1/events"
---

# Append an event

`POST /v1/events`

## Request

- Base URL: `https://store.example.com`
- URL: `https://store.example.com/v1/events`
- Auth: HTTP bearer

Requires writer. Send the root read just before the write as expected_root, and a stable Idempotency-Key per logical operation. A retry with the same key and the same type, entity_id, command and payload replays the original event.

## Headers

- `Idempotency-Key` string, required

## Request body

- AppendRequest
  - `type` string, required
  - `entity_id` string
  - `command` string, required
  - `payload` unknown, required
  - `expected_root` string, required: Root read just before this write; "" only for the first event.

## Response `200`

Replayed an earlier identical request

- AppendResult
  - `hash` string
  - `root` string
  - `replayed` boolean

## Other responses

- `201`: Committed
- `400`: Error
- `401`: Error
- `403`: Error
- `409`: Error
- `413`: Error
- `415`: Error
- `429`: Error
- `503`: Error

---

[API](https://skmtc.dev/aviansuite/apis/stellar-jay-http-api.md) · [All operations](https://skmtc.dev/aviansuite/apis/stellar-jay-http-api/llms.txt) · [OpenAPI document](https://skmtc.dev/aviansuite/apis/stellar-jay-http-api/revisions/1da9767d0a43?raw)
