Ingest
Send a batch of events
POST
The body is an ingest envelope, sent as text/plain so browsers skip the preflight, or as application/json from a server. Each event in events is a WireEvent and is checked on its own: a bad event is reported by index in rejected while the rest are stored.
X-Project-Key<token>
A project's public key (pk_...) for browser ingest, from an allowed origin; ?key= works too.
In: header
Request Body
text/plain
Each event is a WireEvent, checked on its own and rejected by index.
TypeScript Definitions
Use the request body type in TypeScript.
Each event is a WireEvent, checked on its own and rejected by index.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v2/events" \ -H "Content-Type: text/plain" \ -d '<v>1</v> <sentAt>2019-08-24T14:15:22Z</sentAt> <events/>'{ "accepted": 1, "duplicates": 0, "rejected": [ { "index": 1, "code": "VALIDATION_FAILED", "message": "events[1].name must be 1 to 64 characters" } ]}