Send events (HTTP API)
Same ingestion URL the SDK uses—useful for languages without a package or when you only need a thin client. Send JSON with the API key header; failures should never take down your service.
Required fields:
eventType, status, statusCode. For HTTP-shaped events, also method and endpoint.Endpoint
POST
/api/v1/ingest/eventsVersioned path: your ReplayStack host + /api/v1/….Examples
Pick one tab—the payload is the same idea in each language. For Node.js and Python, set REPLAYSTACK_ENDPOINT to your API host (same base URL as the SDK), not the full ingest path.
bash
curl -X POST https://api.replaystack.co/api/v1/ingest/events \
-H "Content-Type: application/json" \
-H "x-replaystack-api-key: tr_live_xxxxxxxxxxxxxxxxx" \
-d '{
"eventType": "api",
"method": "POST",
"endpoint": "/api/payments",
"status": "failed",
"statusCode": 402,
"requestPayload": { "orderId": "ord_123" },
"responsePayload": { "error": "Card declined" }
}'Response
Shape varies by deployment. Treat any non-2xx as “not ingested.”
Illustrative success body
{
"ok": true
}