Black Friday30% off your first year on annual plansSee the offer
Docs
Webhooks

Send a test event

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/test" \
  -H "Authorization: Bearer YOUR_API_KEY"
POST
/v1/webhooks/{id}/test

Sends a webhook.test event to this endpoint only, within a few seconds. Check the delivery log for the result.

Authorization

apiKey
AuthorizationBearer <token>

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

id*string
Formatuuid

Response Body

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/test"
{  "data": {    "eventId": "d6703cc8-9e79-415d-ac03-a4dc7f6ab43c"  }}

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.

List events GET

Everything that happened in this workspace while its plan included webhooks, exactly as webhooks deliver it, kept 7, 30 or 90 days by plan — whether or not a webhook endpoint was listening. Events from a time the plan did not include webhooks are not recorded, so they are not listed. An event appears in the list a few seconds after it happens, and only once every earlier event has, so a page never moves past one that has not appeared yet — except an event stuck more than 15 minutes before it could be prepared for sending (rare; we alert on it), which stops holding the list back and so, once it does appear, may fall behind an `after=` loop that already paged past its moment. **Catching up after downtime:** keep an anchor id taken only from the last item of a list page you processed — never from a webhook: webhooks do not arrive in list order (sends run in parallel and retries are spread out), so a webhook's id can be newer than an event still retrying. On start, call `?after=<anchor>` and keep calling with the last id of each page until a page comes back empty. Then check `delivery_status=failed`, or run a replay, for anything given up on. Deduplicate on `id`. With `after`, events come oldest first. Without it, newest first, paged by `nextCursor`. An `after` id older than your plan keeps answers `400 EVENT_NOT_IN_HISTORY`: resume from `since` instead.