Create a webhook subscription
POST/webhooks
Creates a webhook subscription. This endpoint:
- Registers a URL that should be called on specific events
- Filters the subscription to specific events (deposits, credit card transactions)
Request
- application/json
Body
required
Webhook creation data
Possible values: [WEBHOOK_CREATED
, WEBHOOK_UPDATED
, CUSTOMER_CREATED
, DEPOSIT_TRANSACTION_INITIALIZED
, DEPOSIT_TRANSACTION_FAILED
, DEPOSIT_TRANSACTION_SUCCEEDED
, WITHDRAW_TRANSACTION_INITIALIZED
, WITHDRAW_TRANSACTION_FAILED
, WITHDRAW_TRANSACTION_SUCCEEDED
, INTERNAL_TRANSACTION_INITIALIZED
, VIRTUAL_INTERNAL_TRANSACTION_SUCCEEDED
, VIRTUAL_ACCOUNT_CREATED
, ASSET_TRADE_SUCCESSFUL
, ASSET_TRADE_FAIL
, LTV_LIQUIDATED
, LTV_LIQUIDATION_WARNING
, LTV_URGENT_COLLATERAL_NEEDED
, LTV_COLLATERAL_NEEDED
, LTV_PURCHASE_RESTRICTED
, LTV_THRESHOLD_WARNING
]
Responses
- 201
- 400
- 403
- 404
Webhook subscription successfully created. Note that the signature for this webhook is included on the response payload.
- application/json
- Schema
- Example (from schema)
Schema
data
object
Possible values: [WEBHOOK_CREATED
, WEBHOOK_UPDATED
, CUSTOMER_CREATED
, DEPOSIT_TRANSACTION_INITIALIZED
, DEPOSIT_TRANSACTION_FAILED
, DEPOSIT_TRANSACTION_SUCCEEDED
, WITHDRAW_TRANSACTION_INITIALIZED
, WITHDRAW_TRANSACTION_FAILED
, WITHDRAW_TRANSACTION_SUCCEEDED
, INTERNAL_TRANSACTION_INITIALIZED
, VIRTUAL_INTERNAL_TRANSACTION_SUCCEEDED
, VIRTUAL_ACCOUNT_CREATED
, ASSET_TRADE_SUCCESSFUL
, ASSET_TRADE_FAIL
, LTV_LIQUIDATED
, LTV_LIQUIDATION_WARNING
, LTV_URGENT_COLLATERAL_NEEDED
, LTV_COLLATERAL_NEEDED
, LTV_PURCHASE_RESTRICTED
, LTV_THRESHOLD_WARNING
]
{
"traceId": "string",
"message": "string",
"data": {
"id": "string",
"name": "string",
"subscribedEventTypes": [
"WEBHOOK_CREATED"
],
"active": true,
"url": "string"
}
}
Invalid request payload. This can happen if required fields are missing or have invalid formats.
- application/json
- Schema
- Example (from schema)
Schema
{
"traceId": "string",
"message": "string"
}
The API key is invalid or the client does not have sufficient permissions.
- application/json
- Schema
- Example (from schema)
Schema
{
"traceId": "string",
"message": "string"
}
One of the specified resources was not found. Does not apply for empty result set.
- application/json
- Schema
- Example (from schema)
Schema
{
"traceId": "string",
"message": "string"
}