Getting started
Webhooks
Subscribe to platform events and receive notifications at an address you own.
1 min read
Service obtained with sdk.webhooks(). A subscription links an event to an address that receives notifications.
subscribe(params)
js
await sdk.webhooks().subscribe({ event, url })| Name | Type | Required | Description |
|---|---|---|---|
event |
string |
Yes | Event name. |
url |
string |
Yes | Address that receives notifications. |
Returns: a Promise with the subscription identifier (subscriptionId).
Error conditions
invalid webhook url: the address is not valid.unknown event: the event does not exist.network error: network failure while registering the subscription.
Minimal example
html
<script src="https://cdn.infinity6.ai/releases/sdkweb/latest/bundle/i6sdk-web.js"></script>
<script type="module">
async function main() {
const sdk = new window.I6Sdk();
const user = await sdk.auth().requireUser();
if (!user) return;
const result = await sdk.webhooks().subscribe({
event: "<your-event>",
url: "<your-address>",
});
console.log(result);
}
main();
</script>Support
Implementation support
Official channels for questions during integration.
Response within 1 business day
Technical support email
Send implementation questions with the context of your current step.
Coming soon
Direct assistance for quick integration questions.
Coming soon
Support assistant
i6 documentation and implementation assistant.
