Skip to content

Webhooks ​

List webhook endpoints ​

listWebhookEndpoints · GET /api/v1/webhook-endpoints · scope webhooks:manage

Never returns a secret. A disabled endpoint stays listed: endpoints are never deleted.

Query

NameTypeNote
cursorstringOptional. The previous page's next_cursor, passed back as received. Send the same filters with it; limit may change between pages. A cursor never expires. A malformed one answers 400 with invalid_request.
limitintegerOptional. The most rows to return. Default 50.
statusenumOptional. Only active or only disabled endpoints. One of active, disabled.
sh
curl -sS "$FIATLESS_URL/api/v1/webhook-endpoints" \
  -H "Authorization: Bearer $FIATLESS_KEY"

Responses

StatusMeaning
200One page of endpoints, newest first.
400A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
dataobject[]
data[].iduuid
data[].urluriThe scheme it was registered with, http or https.
data[].descriptionstring or null
data[].statusenumOne of active, disabled.
data[].eventsenum[] or nullOne of wallet.deposit_credited, transaction.detected, transaction.confirmed, transaction.reverted, payout.queued, payout.broadcast, payout.confirming, payout.confirmed, payout.failed, payout.reorg_detected, payout.reorg_resolved.
data[].created_atdate-time
data[].updated_atdate-timeMoves on each change, a rotation and a disable included.
next_cursorstring or nullPass it back as cursor for the next page; null on the last page.

Register webhook endpoint ​

registerWebhookEndpoint · POST /api/v1/webhook-endpoints · scope webhooks:manage

Returns the new endpoint and its signing secret. Only this call and rotateWebhookEndpointSecret return a secret: the install derives it and never stores it. Store it before you handle the response.

events lists the event types the endpoint receives; left out or null, it receives every type, one a later release adds included. A list never grows by itself: a type added later reaches only endpoints that receive every type.

The URL of an active endpoint again answers 200 with that endpoint and no secret, whichever key sends it, and sets the description and events the body sends; what it leaves out keeps its value. Another spelling of it is the same URL too: another case of the host, a trailing dot on it, :443 (:80 over http), an escaped letter or an empty ?; url returns the one spelling the install stores. The URL of a disabled endpoint registers a new endpoint, with its own id and secret. To replace a lost secret, call rotateWebhookEndpointSecret. The call takes no Idempotency-Key, because a stored response would keep the secret. The install records which key registered an endpoint and which changed it.

The URL must be http or https, with no credentials and no fragment. Over http the event bodies cross the network in clear text; the signature still proves them. At most 50 endpoints can be active; one more answers 409 with webhook_endpoint_limit_reached, even when two calls race.

Body

FieldTypeNote
urluriRequired. Must be http or https, with no credentials and no fragment; over http the event bodies cross the network in clear text. It must reach a public address, or a private one the install's operator allows: each delivery checks the address it connects to. A private address literal the operator does not allow, a port outside 1 to 65535, a . or .. path segment or a malformed escape answers 400 naming url and why.
descriptionstringOptional. Sent again with an active endpoint's URL, it sets the description; "" clears it.
eventsenum[] or nullOptional. One of wallet.deposit_credited, transaction.detected, transaction.confirmed, transaction.reverted, payout.queued, payout.broadcast, payout.confirming, payout.confirmed, payout.failed, payout.reorg_detected, payout.reorg_resolved.
sh
curl -sS "$FIATLESS_URL/api/v1/webhook-endpoints" \
  -H "Authorization: Bearer $FIATLESS_KEY" \
  --json @- <<JSON
{
  "url": "$URL"
}
JSON

Responses

StatusMeaning
200The URL's active endpoint, with what the body set; no secret.
201The endpoint is registered; the body carries its signing secret.
400A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
409The key was used for another request, or the resource's state refuses the call, as for a payout external_id already used with another body. The codes are idempotency_key_conflict and resource_conflict, and on the webhook calls webhook_endpoint_limit_reached, webhook_endpoint_disabled and webhook_delivery_not_failed.
415The body was not sent as application/json. The code is unsupported_media_type.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
iduuid
urluriThe scheme it was registered with, http or https.
descriptionstring or null
statusenumOne of active, disabled.
eventsenum[] or nullOne of wallet.deposit_credited, transaction.detected, transaction.confirmed, transaction.reverted, payout.queued, payout.broadcast, payout.confirming, payout.confirmed, payout.failed, payout.reorg_detected, payout.reorg_resolved.
created_atdate-time
updated_atdate-timeMoves on each change, a rotation and a disable included.

Update webhook endpoint ​

updateWebhookEndpoint · POST /api/v1/webhook-endpoints/{id} · scope webhooks:manage

Sets the description and events the body sends; what it leaves out keeps its value, and description "" clears it. A body that sends neither answers 400. The endpoint's URL and secret stay as they are. A disabled endpoint answers 409 with webhook_endpoint_disabled. The install records which key made each change.

Path

NameTypeNote
iduuidRequired. The resource's id.

Body

FieldTypeNote
descriptionstringOptional. The new description; "" clears it.
eventsenum[] or nullOptional. One of wallet.deposit_credited, transaction.detected, transaction.confirmed, transaction.reverted, payout.queued, payout.broadcast, payout.confirming, payout.confirmed, payout.failed, payout.reorg_detected, payout.reorg_resolved.
sh
curl -sS "$FIATLESS_URL/api/v1/webhook-endpoints/$WEBHOOK_ENDPOINT_ID" \
  -H "Authorization: Bearer $FIATLESS_KEY" \
  --json @- <<JSON
{}
JSON

Responses

StatusMeaning
200The endpoint as it is now.
400A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The key was used for another request, or the resource's state refuses the call, as for a payout external_id already used with another body. The codes are idempotency_key_conflict and resource_conflict, and on the webhook calls webhook_endpoint_limit_reached, webhook_endpoint_disabled and webhook_delivery_not_failed.
415The body was not sent as application/json. The code is unsupported_media_type.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
iduuid
urluriThe scheme it was registered with, http or https.
descriptionstring or null
statusenumOne of active, disabled.
eventsenum[] or nullOne of wallet.deposit_credited, transaction.detected, transaction.confirmed, transaction.reverted, payout.queued, payout.broadcast, payout.confirming, payout.confirmed, payout.failed, payout.reorg_detected, payout.reorg_resolved.
created_atdate-time
updated_atdate-timeMoves on each change, a rotation and a disable included.

Disable webhook endpoint ​

disableWebhookEndpoint · POST /api/v1/webhook-endpoints/{id}/disable · scope webhooks:manage

Stops delivery to one endpoint. It takes no body. Endpoints are never deleted, so the record of what was sent to them survives, and disabling again succeeds. A disabled endpoint stays disabled: to receive events at its URL again, register the URL, which makes a new endpoint.

Path

NameTypeNote
iduuidRequired. The resource's id.
sh
curl -sS -X POST "$FIATLESS_URL/api/v1/webhook-endpoints/$WEBHOOK_ENDPOINT_ID/disable" \
  -H "Authorization: Bearer $FIATLESS_KEY"

Responses

StatusMeaning
200The endpoint is disabled.
400A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
iduuid
urluriThe scheme it was registered with, http or https.
descriptionstring or null
statusenumOne of active, disabled.
eventsenum[] or nullOne of wallet.deposit_credited, transaction.detected, transaction.confirmed, transaction.reverted, payout.queued, payout.broadcast, payout.confirming, payout.confirmed, payout.failed, payout.reorg_detected, payout.reorg_resolved.
created_atdate-time
updated_atdate-timeMoves on each change, a rotation and a disable included.

Rotate endpoint secret ​

rotateWebhookEndpointSecret · POST /api/v1/webhook-endpoints/{id}/rotate-secret · scope webhooks:manage

Events are signed with the new secret at once, so deploy it before the next event arrives; only a delivery already on its way still carries the old signature. Only this endpoint changes. This is also how to replace a lost secret: no call returns an endpoint's current one. A disabled endpoint answers 409 with webhook_endpoint_disabled.

Path

NameTypeNote
iduuidRequired. The resource's id.
sh
curl -sS -X POST "$FIATLESS_URL/api/v1/webhook-endpoints/$WEBHOOK_ENDPOINT_ID/rotate-secret" \
  -H "Authorization: Bearer $FIATLESS_KEY"

Responses

StatusMeaning
200The endpoint with its new secret.
400A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The key was used for another request, or the resource's state refuses the call, as for a payout external_id already used with another body. The codes are idempotency_key_conflict and resource_conflict, and on the webhook calls webhook_endpoint_limit_reached, webhook_endpoint_disabled and webhook_delivery_not_failed.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
iduuid
urluriThe scheme it was registered with, http or https.
descriptionstring or null
statusenumOne of active, disabled.
eventsenum[] or nullOne of wallet.deposit_credited, transaction.detected, transaction.confirmed, transaction.reverted, payout.queued, payout.broadcast, payout.confirming, payout.confirmed, payout.failed, payout.reorg_detected, payout.reorg_resolved.
created_atdate-time
updated_atdate-timeMoves on each change, a rotation and a disable included.
secretstringSigns every event sent to this endpoint, as Standard Webhooks defines: whsec_ and the base64 of the 32 key bytes, so the official libraries take it as it is. Only the registration that creates the endpoint and a rotation return it: the install derives it and never stores it.

Send test event ​

sendWebhookTestEvent · POST /api/v1/webhook-endpoints/{id}/test · scope webhooks:manage

Sends one endpoint.test event to this endpoint, whatever its events, signed and retried like every event, so you can check your signature code and your answer before a payment arrives. It answers with the new delivery, which listWebhookDeliveries and getWebhookDelivery show too. A disabled endpoint answers 409 with webhook_endpoint_disabled.

Path

NameTypeNote
iduuidRequired. The resource's id.
sh
curl -sS -X POST "$FIATLESS_URL/api/v1/webhook-endpoints/$WEBHOOK_ENDPOINT_ID/test" \
  -H "Authorization: Bearer $FIATLESS_KEY"

Responses

StatusMeaning
201The test event's delivery, pending.
400A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The key was used for another request, or the resource's state refuses the call, as for a payout external_id already used with another body. The codes are idempotency_key_conflict and resource_conflict, and on the webhook calls webhook_endpoint_limit_reached, webhook_endpoint_disabled and webhook_delivery_not_failed.
500The install failed; the details stay in its logs. The code is internal_error.

201 Created

FieldTypeNote
iduuid
endpoint_iduuid
eventobject
event.iduuidThe event's id, also sent as the webhook-id header. An event has one delivery per endpoint, and one per replay.
event.typeanyAn event type an endpoint can choose, or endpoint.test, which sendWebhookTestEvent sends.
event.occurred_atdate-timeWhen the event happened, not when it was delivered.
statusenumdelivered, failed and superseded are final. failed is the dead-letter list: those deliveries are never retried on their own. superseded is a transaction.detected that was never sent, because a later transaction.confirmed or transaction.reverted of its payment came first to the same endpoint and carries its state; it is not replayed. One of pending, delivering, delivered, failed, superseded.
attempt_countintegerAttempts made; the 12th that fails moves the delivery to failed.
last_status_codeinteger or nullYour endpoint's last HTTP status. Its body is never stored.
last_error_codeenum or nullWhy the last attempt failed, never text from a response body; null once delivered. One of endpoint_unreachable, endpoint_rejected, endpoint_gone, delivery_lease_expired, envelope_encode_failed, signature_unavailable.
last_attempt_atdate-time or null
next_attempt_atdate-time or nullSet only while pending; each retry waits twice as long as the last.
completed_atdate-time or nullWhen the delivery ended, as status says; null until then.
replayed_from_delivery_iduuid or nullThe delivery this replay came from, which is never changed; null on a first delivery.
created_atdate-time
updated_atdate-time

List webhook deliveries ​

listWebhookDeliveries · GET /api/v1/webhook-deliveries · scope webhooks:manage

One row per event and endpoint, newest first. It tells an event never sent apart from one your endpoint refused until the attempts ran out.

status=failed is the dead-letter list: those deliveries used every attempt, 12, and are never retried on their own. Replay one with replayWebhookDelivery.

A delivery is removed 30 days after it ends, so the list holds what is pending, being sent, or ended in the last 30 days. A dead letter whose replay is still listed stays as long as that replay.

Your endpoint's response body is never stored: last_status_code and last_error_code are all that is kept. No signing material appears.

Query

NameTypeNote
cursorstringOptional. The previous page's next_cursor, passed back as received. Send the same filters with it; limit may change between pages. A cursor never expires. A malformed one answers 400 with invalid_request.
limitintegerOptional. The most rows to return. Default 50.
endpoint_iduuidOptional. Restrict to one destination; an unknown one answers 400 with error.field.
event_iduuidOptional. One event's deliveries, by the id in its body and its webhook-id header; an unknown one answers 400 with error.field.
event_typeanyOptional. One event type's deliveries; a type no endpoint receives answers 400 with error.field.
statusenumOptional. delivered, failed and superseded are final. failed is the dead-letter list: those deliveries are never retried on their own. superseded is a transaction.detected that was never sent, because a later transaction.confirmed or transaction.reverted of its payment came first to the same endpoint and carries its state; it is not replayed. One of pending, delivering, delivered, failed, superseded.
sh
curl -sS "$FIATLESS_URL/api/v1/webhook-deliveries" \
  -H "Authorization: Bearer $FIATLESS_KEY"

Responses

StatusMeaning
200One page of deliveries, newest first.
400A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
dataobject[]
data[].iduuid
data[].endpoint_iduuid
data[].eventobject
data[].event.iduuidThe event's id, also sent as the webhook-id header. An event has one delivery per endpoint, and one per replay.
data[].event.typeanyAn event type an endpoint can choose, or endpoint.test, which sendWebhookTestEvent sends.
data[].event.occurred_atdate-timeWhen the event happened, not when it was delivered.
data[].statusenumdelivered, failed and superseded are final. failed is the dead-letter list: those deliveries are never retried on their own. superseded is a transaction.detected that was never sent, because a later transaction.confirmed or transaction.reverted of its payment came first to the same endpoint and carries its state; it is not replayed. One of pending, delivering, delivered, failed, superseded.
data[].attempt_countintegerAttempts made; the 12th that fails moves the delivery to failed.
data[].last_status_codeinteger or nullYour endpoint's last HTTP status. Its body is never stored.
data[].last_error_codeenum or nullWhy the last attempt failed, never text from a response body; null once delivered. One of endpoint_unreachable, endpoint_rejected, endpoint_gone, delivery_lease_expired, envelope_encode_failed, signature_unavailable.
data[].last_attempt_atdate-time or null
data[].next_attempt_atdate-time or nullSet only while pending; each retry waits twice as long as the last.
data[].completed_atdate-time or nullWhen the delivery ended, as status says; null until then.
data[].replayed_from_delivery_iduuid or nullThe delivery this replay came from, which is never changed; null on a first delivery.
data[].created_atdate-time
data[].updated_atdate-time
next_cursorstring or nullPass it back as cursor for the next page; null on the last page.

Get webhook delivery ​

getWebhookDelivery · GET /api/v1/webhook-deliveries/{id} · scope webhooks:manage

One delivery with its event's body exactly as each attempt sends it. Each attempt signs that body anew, so no signature is shown. A delivery that ended more than 30 days ago is removed and answers 404.

Path

NameTypeNote
iduuidRequired. The resource's id.
sh
curl -sS "$FIATLESS_URL/api/v1/webhook-deliveries/$WEBHOOK_DELIVERY_ID" \
  -H "Authorization: Bearer $FIATLESS_KEY"

Responses

StatusMeaning
200The delivery and the event it sends.
400A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
iduuid
endpoint_iduuid
eventobjectThe body each attempt sends, as the event catalog documents it.
event.iduuid
event.typeanyAn event type an endpoint can choose, or endpoint.test, which sendWebhookTestEvent sends.
event.aggregate_typeenumOne of deposit_wallet, chain_transaction, withdrawal, webhook_endpoint.
event.aggregate_iduuid
event.schema_versionintegerAlways 1.
event.occurred_atdate-time
event.dataobject
statusenumdelivered, failed and superseded are final. failed is the dead-letter list: those deliveries are never retried on their own. superseded is a transaction.detected that was never sent, because a later transaction.confirmed or transaction.reverted of its payment came first to the same endpoint and carries its state; it is not replayed. One of pending, delivering, delivered, failed, superseded.
attempt_countintegerAttempts made; the 12th that fails moves the delivery to failed.
last_status_codeinteger or nullYour endpoint's last HTTP status. Its body is never stored.
last_error_codeenum or nullWhy the last attempt failed, never text from a response body; null once delivered. One of endpoint_unreachable, endpoint_rejected, endpoint_gone, delivery_lease_expired, envelope_encode_failed, signature_unavailable.
last_attempt_atdate-time or null
next_attempt_atdate-time or nullSet only while pending; each retry waits twice as long as the last.
completed_atdate-time or nullWhen the delivery ended, as status says; null until then.
replayed_from_delivery_iduuid or nullThe delivery this replay came from, which is never changed; null on a first delivery.
created_atdate-time
updated_atdate-time

Replay webhook delivery ​

replayWebhookDelivery · POST /api/v1/webhook-deliveries/{id}/replay · scope webhooks:manage

Sends the same event to the same endpoint again, as a new delivery whose replayed_from_delivery_id names this one. The failed delivery is left as it was.

Calling it twice is safe: the first call answers 201 with the replay, the second 200 with the same delivery, and sends nothing more.

Only a failed delivery can be replayed: a pending, delivering, delivered or superseded one answers 409 with webhook_delivery_not_failed. A disabled endpoint answers 409 with webhook_endpoint_disabled: register its URL again instead. A delivery that ended more than 30 days ago is removed, and replaying it answers 404.

Path

NameTypeNote
iduuidRequired. The resource's id.
sh
curl -sS -X POST "$FIATLESS_URL/api/v1/webhook-deliveries/$WEBHOOK_DELIVERY_ID/replay" \
  -H "Authorization: Bearer $FIATLESS_KEY"

Responses

StatusMeaning
200The replay an earlier call made, as it is now.
201The replay this call made.
400A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
404The resource does not exist. The code is resource_not_found.
409The key was used for another request, or the resource's state refuses the call, as for a payout external_id already used with another body. The codes are idempotency_key_conflict and resource_conflict, and on the webhook calls webhook_endpoint_limit_reached, webhook_endpoint_disabled and webhook_delivery_not_failed.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
iduuid
endpoint_iduuid
eventobject
event.iduuidThe event's id, also sent as the webhook-id header. An event has one delivery per endpoint, and one per replay.
event.typeanyAn event type an endpoint can choose, or endpoint.test, which sendWebhookTestEvent sends.
event.occurred_atdate-timeWhen the event happened, not when it was delivered.
statusenumdelivered, failed and superseded are final. failed is the dead-letter list: those deliveries are never retried on their own. superseded is a transaction.detected that was never sent, because a later transaction.confirmed or transaction.reverted of its payment came first to the same endpoint and carries its state; it is not replayed. One of pending, delivering, delivered, failed, superseded.
attempt_countintegerAttempts made; the 12th that fails moves the delivery to failed.
last_status_codeinteger or nullYour endpoint's last HTTP status. Its body is never stored.
last_error_codeenum or nullWhy the last attempt failed, never text from a response body; null once delivered. One of endpoint_unreachable, endpoint_rejected, endpoint_gone, delivery_lease_expired, envelope_encode_failed, signature_unavailable.
last_attempt_atdate-time or null
next_attempt_atdate-time or nullSet only while pending; each retry waits twice as long as the last.
completed_atdate-time or nullWhen the delivery ended, as status says; null until then.
replayed_from_delivery_iduuid or nullThe delivery this replay came from, which is never changed; null on a first delivery.
created_atdate-time
updated_atdate-time