Skip to main content
POST
/
v1
/
webhooks
/
{subscriptionId}
/
test
Send a test webhook event
curl --request POST \
  --url https://api.xentfi.com/v1/webhooks/{subscriptionId}/test \
  --header 'Content-Type: application/json' \
  --header 'apiKey: <api-key>' \
  --header 'orgId: <api-key>' \
  --data '
{
  "eventType": "address.incoming_transfer"
}
'
const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({eventType: 'address.incoming_transfer'})
};

fetch('https://api.xentfi.com/v1/webhooks/{subscriptionId}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
import requests

url = "https://api.xentfi.com/v1/webhooks/{subscriptionId}/test"

payload = { "eventType": "address.incoming_transfer" }
headers = {
"apiKey": "<api-key>",
"orgId": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.xentfi.com/v1/webhooks/{subscriptionId}/test"

payload := strings.NewReader("{\n \"eventType\": \"address.incoming_transfer\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("apiKey", "<api-key>")
req.Header.Add("orgId", "<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))

}
const options = {
method: 'POST',
headers: {apiKey: '<api-key>', orgId: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({eventType: 'address.incoming_transfer'})
};

fetch('https://api.xentfi.com/v1/webhooks/{subscriptionId}/test', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "success": true,
  "data": {
    "success": true,
    "message": "<string>",
    "eventType": "<string>",
    "payload": {},
    "webhookId": "<string>",
    "webhookName": "<string>",
    "webhookUrl": "<string>",
    "statusCode": 123,
    "response": {},
    "error": "<string>"
  }
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "Wallet not found",
"timestamp": "2023-11-07T05:31:56Z",
"requestId": "<string>"
}
}

Authorizations

apiKey
string
header
required
orgId
string
header
required

Path Parameters

subscriptionId
string
required

The webhook subscription ID

Body

application/json
eventType
string
required

The event type to test

Example:

"address.incoming_transfer"

overrides
object

Optional overrides for the generated event

Example:
{
"hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"value": "2.5",
"from": "0x1234567890abcdef1234567890abcdef12345678"
}

Response

Test webhook sent successfully

success
boolean
Example:

true

data
object