Skip to main content
POST
/
webhooks
Create a webhook endpoint
curl --request POST \
  --url https://api.bridge.xyz/v0/webhooks \
  --header 'Api-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: <idempotency-key>' \
  --data '{
  "url": "<string>",
  "event_epoch": "webhook_creation",
  "event_categories": [
    "customer"
  ]
}'
{
"id": "wep_123",
"url": "https://my_endpoint.xyz/hooks",
"status": "disabled",
"public_key": "-----BEGIN PUBLIC KEY-----\\nFJJ3hFnaPLmxxG4a5w0BAQEFAAOCAQ8AMIIBCgKCAQEAtYhc6PV2LOs/nqDRHi0B\\nMKTsdMLHtg58a1NDxaYfw4IZJ3hpy1qIFUgt5X0HhCYZE0Y40MyLGIejPyitEjYw\\ni9/aE+9F/PN+btqN7OK6cVuF9s/R9cZCtNc27UdTQXrUO5T8GXNAMmRr0KFh8yPv\\nfIgpoZn5ZhnyRbZpDvrxHzLmcZJFAX8Ca+KZLzgGVybEqJtP6fKAT0zrrUS1z44s\\nRDOLiXl543cRAmBnUyrT6cXiNz/PNbm4zRK5Nx7LGxBFrCWQCao4Yi8hrwWsnHxg\\n0Tcy3UyZhAcgL6ydVJfLD5x58Ri4BN32WPBtgSSO6JxZZwCiX0d1BOgq7+eNgmzN\\nJQIDAQAB\\n-----END PUBLIC KEY-----\\n",
"event_categories": [
"customer",
"liquidation_address",
"virtual_account",
"virtual_account.activity",
"card_account",
"card_transaction",
"card_withdrawal",
"posted_card_account_transaction"
]
}

Authorizations

Api-Key
string
header
required

Headers

Idempotency-Key
string
required

Body

application/json

Information about the webhook endpoint to be created

url
string
required

The URL that the webhook will send events to. It must use the HTTPS scheme and have a valid X.509 certificate. The URL doesn't need to be live, but the host must be reachable.

Minimum length: 1
event_epoch
enum<string>
required

Specifies the starting point from which this webhook will receive events. This should usually be set to "webhook_creation", unless there is a reason why this webhook needs to process events from before its creation. When this value is set to "webhook_creation", the webhook will receive a small number of events preceding its creation for convenience.

Available options:
webhook_creation,
beginning_of_time
event_categories
enum<string>[]

The list of event categories that the webhook endpoint will receive

Response

Webhook endpoint created

id
string
required

An identifier that uniquely identifies the webhook endpoint

url
string
required

The URL that the webhook will send events to

status
enum<string>
required

The status of the webhook. Only active webhooks will receive events automatically.

Available options:
active,
disabled,
deleted
public_key
string
required

The public key (in PEM format) that should be used to verify the authenticity of webhook events

event_categories
enum<string>[]

The list of event categories that the webhook endpoint will receive