Create Webhook
POST
/api/v1/webhooks
const url = 'https://api.qeychain.xyz/api/v1/webhooks';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"url":"example","events":["example"],"addresses_filter":["example"],"description":"example","headers":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.qeychain.xyz/api/v1/webhooks \ --header 'Content-Type: application/json' \ --data '{ "url": "example", "events": [ "example" ], "addresses_filter": [ "example" ], "description": "example", "headers": { "additionalProperty": "example" } }'Register a new webhook endpoint.
The signing secret is returned only once - store it securely!
Available event types:
- transaction.new: New transaction detected
- lot.created: New tax lot created
- lot.consumed: Lot partially/fully consumed
- wash_sale.detected: Wash sale triggered
- price.alert: Price threshold crossed
- calculation.complete: Background calculation finished
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
CreateWebhookRequest
Request to create a new webhook.
object
Examplegenerated
{ "url": "example", "events": [ "example" ], "addresses_filter": [ "example" ], "description": "example", "headers": { "additionalProperty": "example" }}Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Response Create Webhook Api V1 Webhooks Post
object
key
additional properties
any
Examplegenerated
{}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}