Send audit events
POST/api/v0/events/
Index one event, or a batch, from the producer envelope. Requires a team API key with the write (or manage) scope. Send either one envelope object or {"events": [...]}; a batch answers 207 with per-item results and 202 when every item was accepted. A repeated Idempotency-Key (or envelope idempotency_key) within 24 hours returns the event already stored instead of indexing a second one.
Request
Responses
- 200
- 201
- 202
- 207
- 400
- 403
- 413
- 429
The event was already stored under the same idempotency key; the stored copy is returned.
The event was indexed. Its chain seal task runs after this response, so hash is empty.
A batch was submitted and every item was indexed (or replayed).
A batch was submitted and at least one item was rejected; the other items were indexed.
The event could not be indexed: the body is not a JSON object, the batch is empty, the Idempotency-Key header is over 255 characters, or one event was rejected (a rejected single event answers its own code).
Missing, invalid or under-scoped API key, or an event naming a trail this key may not write to.
The request body or the batch is larger than the published ceiling.
This team is over its request rate or its daily event limit.
Response Headers
Whole seconds to wait before retrying, sent on every 429.