Skip to main content
POST
/
v1
/
tx-relay
/
webhooks
Create Webhook
curl --request POST \
  --url https://api.example.com/v1/tx-relay/webhooks \
  --header 'Content-Type: application/json' \
  --header 'X-Access-Key: <x-access-key>' \
  --header 'X-Signature: <x-signature>' \
  --header 'X-Timestamp: <x-timestamp>' \
  --data '
{
  "tenantId": "<string>",
  "projectId": "<string>",
  "url": "<string>",
  "events": [
    {}
  ],
  "secret": "<string>",
  "enabled": true
}
'
{
  "config": {}
}

Create Webhook

Create a new webhook to receive real-time notifications for transaction events.

Authentication

X-Access-Key
string
required
API access key
X-Signature
string
required
HMAC-SHA256 signature
X-Timestamp
string
required
ISO 8601 timestamp

Request Body

tenantId
string
required
Tenant identifier
projectId
string
required
Project identifier
url
string
required
Webhook endpoint URL (must be HTTPS)
events
array
required
Array of event types to subscribe to
secret
string
required
Secret for signing webhook payloads
enabled
boolean
default:"true"
Whether the webhook is enabled

Response

config
object
Created webhook configuration

Example

curl -X POST https://api.axonvault.io/v1/tx-relay/webhooks \
  -H "X-Access-Key: ak_live_abc123" \
  -H "X-Signature: sha256=..." \
  -H "X-Timestamp: 2024-01-15T10:30:00Z" \
  -H "Content-Type: application/json" \
  -d '{
    "tenantId": "ten_abc123",
    "projectId": "proj_abc123",
    "url": "https://yourapp.com/webhooks/axonvault",
    "events": ["transaction.confirmed", "transaction.failed"],
    "secret": "whsec_your_webhook_secret",
    "enabled": true
  }'
Response:
{
  "config": {
    "webhookId": "wh_abc123",
    "tenantId": "ten_abc123",
    "projectId": "proj_abc123",
    "url": "https://yourapp.com/webhooks/axonvault",
    "events": ["transaction.confirmed", "transaction.failed"],
    "enabled": true,
    "createdAt": "2024-01-15T10:30:00Z"
  }
}

Available Events

EventDescription
transaction.pendingTransaction submitted to network
transaction.confirmedTransaction confirmed on chain
transaction.failedTransaction failed or reverted
approval.requestedTransaction requires approval
approval.approvedTransaction approved
approval.rejectedTransaction rejected