Replay events to an endpoint
Last updated:
Request
Synthetic example for the production API. Replace YOUR_API_KEY and the ids. Do not send it against a live account until you mean to.
curl -X POST "https://api.fxapis.com/v1/webhooks/ACCOUNT_ID/replay" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"since":"string"}'Queues this window's events, of the types this endpoint receives, oldest first, with their original ids. By default (include: "failed") only events it did not receive — deliveries it gave up on, and events recorded while it was switched off — so repeating a call sends nothing twice. include: "all" also re-sends what it already received: deduplicate on id first. Types follow the endpoint's events now: if you added a type later, its events recorded since the endpoint was created are sent too — never sent to it before, but older than what it has received. Up to 10,000 per call; nextSince says where to continue. Events written at one exact moment are never split across calls, so in the rare case of more than that at one moment, a call queues them all. For code that catches up by itself, read GET /v1/events?after=<last listed id> instead.
Authorization
apiKey Authorization: Bearer fx_live_<id>_<secret>.
A key is shown once, at creation. We cannot show it again or recover it for you.
Keys carry a label (live or test) in the key itself, so each configuration is easy to tell
apart. Both reach real brokers: test with a broker demo account.
Scopes are per key. A key without accounts:write can read accounts and nothing else.
In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.fxapis.com/v1/webhooks/497f6eca-6276-4993-bfeb-53cbbbba6f08/replay" \ -H "Content-Type: application/json" \ -d '{ "since": "2019-08-24T14:15:22Z" }'{ "data": { "queued": 0, "include": "failed", "since": "2019-08-24T14:15:22Z", "until": "2019-08-24T14:15:22Z", "nextSince": null }}Redeliver an event POST
Queues the event to this endpoint again, with a fresh retry schedule. Same event id, so your deduplication still works.
Rotate a webhook endpoint's secret POST
Issues a new `secret`, returned **once**. For 24 hours every delivery is signed with both the new and the old secret — two `v1=` values in `fxapis-signature` — so you can deploy the new one without missing an event.