Send Your First Webhook Event
In this guide, you’ll learn how to deploy your first webhook event with Convoy. You’ll be making use of your project API key which can be generated by creating a project from your dashboard. You’ll also need your project ID which can be retrieved from your Project Settings page.
Install Client
Install convoy.js with:
Configure
In the event you’re using a self-hosted convoy instance, you can define the url as part of what is passed into convoy’s constructor.
Now that your client has been configured, create a convoy application.
Create an Endpoint
The next step is to create a subscription to the webhook source. Subscriptions are the conduit through which events are routed from a source to a destination on Convoy.
Subscribe for Events
With the subscription in place, you’re set to send an event.
Send an Event
To send an event, you’ll need the uid from the endpoint you created earlier.
Install Client
Install convoy.js with:
Configure
In the event you’re using a self-hosted convoy instance, you can define the url as part of what is passed into convoy’s constructor.
Now that your client has been configured, create a convoy application.
Create an Endpoint
The next step is to create a subscription to the webhook source. Subscriptions are the conduit through which events are routed from a source to a destination on Convoy.
Subscribe for Events
With the subscription in place, you’re set to send an event.
Send an Event
To send an event, you’ll need the uid from the endpoint you created earlier.
Install Client
Install convoy.rb with:
Configure
To configure your client, provide your api_key and project_id, see below:
Create an Endpoint
An endpoint represents a target URL to receive webhook events. You should create one endpoint per user/business or whatever scope works well for you.
Subscribe for Events
After creating an endpoint, we need to subscribe the endpoint to events.
Send an Event
To send an event, you’ll need to pass the uid from the endpoint we created earlier.
Install Client
Install convoy-go, with:
Configure
The SDK also supports authenticating via Basic Auth by providing your username and password
In the event you’re using a self hosted convoy instance, you can define the url as part of what is passed into the convoy.Options struct
Create an Endpoint
The next step is to create a subscription to the webhook source. Subscriptions are the conduit through which events are routed from a source to a destination on Convoy.
Subscribe for Events
With the subscription in place, you’re set to send an event.
Send an Event
To send an event, you’ll need the uid from the application you created earlier.
Sending webhooks with the API does not require a client setup like the SDKs. The API key retrieved from your dashboard will be added to the Authorization header and the project ID will be added to the request URL.
Create an Endpoint
An endpoint is a specific destination that can receive webhook events. Once you create an endpoint, you’ll receive a uid as part of the response that you should save and supply in subsequent API calls to perform other requests such as creating an event.
The next step is to create a subscription to the webhook source. Subscriptions are the conduit through which events are routed from a source to a destination on Convoy.
Subscribe for Events
With the subscription in place, you’re set to send an event.
Send an Event
To send an event, you’ll need the uid from the application you created earlier.
Cheers! 🎉
You have successfully created a Convoy application to send events to your configured endpoint.
Was this page helpful?