Update a webhook
curl --request PUT \
--url https://api.bridge.xyz/v0/webhooks/{webhookID} \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"event_categories": []
}
'import requests
url = "https://api.bridge.xyz/v0/webhooks/{webhookID}"
payload = {
"url": "<string>",
"event_categories": []
}
headers = {
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', event_categories: []})
};
fetch('https://api.bridge.xyz/v0/webhooks/{webhookID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bridge.xyz/v0/webhooks/{webhookID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'event_categories' => [
]
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bridge.xyz/v0/webhooks/{webhookID}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"event_categories\": []\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.bridge.xyz/v0/webhooks/{webhookID}")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"event_categories\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bridge.xyz/v0/webhooks/{webhookID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"event_categories\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "wep_123",
"url": "https://my_updated_endpoint.xyz/hooks",
"status": "active",
"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"
]
}Webhooks
Update a webhook
Update the specified webhook object
PUT
/
webhooks
/
{webhookID}
Update a webhook
curl --request PUT \
--url https://api.bridge.xyz/v0/webhooks/{webhookID} \
--header 'Api-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "<string>",
"event_categories": []
}
'import requests
url = "https://api.bridge.xyz/v0/webhooks/{webhookID}"
payload = {
"url": "<string>",
"event_categories": []
}
headers = {
"Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: '<string>', event_categories: []})
};
fetch('https://api.bridge.xyz/v0/webhooks/{webhookID}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bridge.xyz/v0/webhooks/{webhookID}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'event_categories' => [
]
]),
CURLOPT_HTTPHEADER => [
"Api-Key: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bridge.xyz/v0/webhooks/{webhookID}"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"event_categories\": []\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.bridge.xyz/v0/webhooks/{webhookID}")
.header("Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"event_categories\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bridge.xyz/v0/webhooks/{webhookID}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"event_categories\": []\n}"
response = http.request(request)
puts response.read_body{
"id": "wep_123",
"url": "https://my_updated_endpoint.xyz/hooks",
"status": "active",
"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"
]
}Path Parameters
Body
application/json
Updated webhook endpoint object
The list of event categories that the webhook endpoint will receive. Note that if modified, the webhook endpoint will receive events for new categories only from the current point onwards.
The category of the webhook event
Available options:
customer, kyc_link, liquidation_address.drain, static_memo.activity, transfer, virtual_account.activity, bridge_wallet.activity, card_account, card_transaction, card_withdrawal, posted_card_account_transaction, external_account, rfi Response
Successful webhook object response
The list of event categories that the webhook endpoint will receive
The category of the webhook event
Available options:
customer, kyc_link, liquidation_address.drain, static_memo.activity, transfer, virtual_account.activity, bridge_wallet.activity, card_account, card_transaction, card_withdrawal, posted_card_account_transaction, external_account, rfi Was this page helpful?