Events
4 operations under events. Examples read $API and $KEY from your shell.
GET /v1/events
Parameters
limitinteger optional in querystarting_afterstring optional in queryending_beforestring optional in querytypestring optional in query
Responses
200 Default Response
object
dataarray requiredEach item:
idstring requiredtypestring requiredcreatedstring requireddataobject requiredobjectobject required
has_moreboolean required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/events" \
-H "authorization: Bearer $KEY"SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/events");GET /v1/events/{id}
Parameters
idstring required in path
Responses
200 Default Response
object
idstring requiredtypestring requiredcreatedstring requireddataobject requiredobjectobject required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/events/$ID" \
-H "authorization: Bearer $KEY"SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/events/{id}", {
params: { path: { id: "<id>" } },
});POST /v1/events/{id}/redeliver
Send an Idempotency-Key header on every POST so a retry never repeats the request.
Parameters
idstring required in path
Request body
application/json, required
object
Responses
202 Default Response
object
idstring requiredstatusstring required one ofqueued
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
-X POST \
"$API/v1/events/$ID/redeliver" \
-H "authorization: Bearer $KEY" \
-H "idempotency-key: $(uuidgen)" \
-H "content-type: application/json" \
-d '{}'SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key and an Idempotency-Key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.POST("/v1/events/{id}/redeliver", {
params: { path: { id: "<id>" } },
body: {},
});GET /v1/events/{id}/deliveries
Parameters
limitinteger required in querystarting_afterstring optional in queryidstring required in path
Responses
200 Default Response
object
dataarray requiredEach item:
idstring requiredendpoint_idstring requiredevent_idstring requiredevent_typestring requiredkindstring required one ofevent,redeliverystatusstring required one ofpending,succeeded,failed,canceledattemptsinteger requiredmax_attemptsinteger requiredfirst_attempt_atstring required (nullable)last_attempt_atstring required (nullable)last_status_codeinteger required (nullable)last_errorstring required (nullable)next_attempt_atstring required (nullable)created_atstring requiredupdated_atstring required
has_moreboolean required
Errors are RFC 9457 problem documents (application/problem+json).
curl
curl -s \
"$API/v1/events/$ID/deliveries?limit=1" \
-H "authorization: Bearer $KEY"SDK
import { createScrClient } from "@scr/sdk";
// The client sends the API key for you.
const client = createScrClient({ baseUrl: process.env.API!, apiKey: process.env.KEY! });
const { data, error } = await client.GET("/v1/events/{id}/deliveries", {
params: { path: { id: "<id>" }, query: { limit: 1 } },
});