Our Webhook API is a RESTful API accessed by using either an HTTP client, such as wget or curl, or an HTTP library, which is a part of most modern programming language packages.
Create webhookslink
Learn how to create and manage webhooks for Fivetran events.
Creating a webhook is a two-step process:
- Set up your application to receive webhook payloads at a secure, public URL.
- Create a webhook with Fivetran to fire in response to particular events.
The Fivetran Webhook REST API lets you manage webhooks. You can also use the REST API to change the configuration of your webhook. For example, you can modify the payload URL and the list of events.
URLlink
The payload URL must be a secure site (HTTPS). If an insecure (HTTP) payload URL is received, Fivetran returns an HTTP 400 Bad Request
error.
Activelink
You can disable the delivery of webhook payloads by setting active
to false
.
Eventslink
When configuring a webhook, you can use the API to choose which events send you payloads. Subscribing to only specific events you want to listen for minimizes the number of HTTPS requests to your server.
We support the following events:
- sync_start
- sync_end
- status (deprecated)
- dbt_run_start
- dbt_run_succeeded
- dbt_run_failed
- transformation_run_start
- transformation_run_succeeded
- transformation_run_failed
NOTE: Fill out our survey if you want more event types supported by our Webhook Management API.
Retrieslink
We will retry webhooks for up to 24 hours before disabling the webhook. We use the wait interval of the previous retry, which is 0 for the first retry, as a base, then add 5-minute increments to every subsequent backoff retry.
See how Fivetran calculates the times of retries following a failed initial attempt in the following example:
Initial attempt and following retries | Time |
---|---|
Initial attempt | 10:00 |
1st retry | 10:05 |
2nd retry | 10:15 |
3rd retry | 10:30 |
4th retry | 10:50 |
Signinglink
The webhook payload can be signed if you specified a secret during the webhook creation. The signature is calculated based on the payload body using the SHA-256 HMAC algorithm.
Webhook Managementlink
Our Webhook REST API supports the following webhook management actions:
- Create account webhook
- Create group webhook
- Retrieve webhook details
- Update webhook
- Delete webhook
- Retrieve the list of webhooks
- Test webhook
Create account webhooklink
This endpoint allows you to create a new webhook for the current account.
Request
POST https://api.fivetran.com/v1/webhooks/account
{
"url": "https://customer.com/webhook",
"events": [
"sync_start",
"sync_end"
],
"active": true,
"secret": "my_secret"
}
Request parameters
Name | Description |
---|---|
url |
Your webhooks URL endpoint for your application |
events |
The array of event types |
active |
Boolean, if set to true , webhooks are immediately sent in response to events |
secret |
The secret string used for payload signing. Optional. |
Response
HTTP 200 OK
{
"id": "program_quoth",
"type": "account",
"url": "https://customer.com/webhook",
"events": [
"sync_start",
"sync_end"
],
"active": true,
"secret": "******",
"created_at": "2022-04-29T09:41:08.583Z",
"created_by": "_airworthy"
}
Fields
Name | Description | Possible values |
---|---|---|
id |
The webhook ID | |
type |
The webhook type | group , account |
group_id |
The group ID | |
url |
Your webhooks URL endpoint for your application | |
events |
The array of event types | |
active |
Boolean, if set to true , webhooks are immediately sent in response to events |
|
secret |
The secret string used for payload signing and masked in the response. Optional. | |
created_at |
The webhook creation timestamp | |
created_by |
The ID of the user who created the webhook |
Create group webhooklink
This endpoint allows you to create a new webhook for a given group.
Request
POST https://api.fivetran.com/v1/webhooks/group/{group_id}
{
"url": "https://customer.com/webhook",
"events": [
"sync_start",
"sync_end"
],
"active": true,
"secret": "my_secret"
}
Request parameters
Name | Description |
---|---|
group_id |
The group ID |
url |
Your webhooks URL endpoint for your application |
events |
The array of event types |
active |
Boolean, if set to true , webhooks are immediately sent in response to events |
secret |
The secret string used for payload signing. Optional. |
Response
HTTP 200 OK
{
"id": "recur_readable",
"type": "group",
"group_id": "_moonbeam",
"url": "https://customer.com/webhook",
"events": [
"sync_start",
"sync_end"
],
"active": true,
"secret": "******",
"created_at": "2022-04-29T10:45:00.000Z",
"created_by": "_airworthy"
}
Fields
Name | Description | Possible values |
---|---|---|
id |
The webhook ID | |
type |
The webhook type | group , account |
group_id |
The group ID | |
url |
Your webhooks URL endpoint for your application | |
events |
The array of event types | |
active |
Boolean, if set to true , webhooks are immediately sent in response to events |
|
secret |
The secret string used for payload signing and masked in the response. Optional. | |
created_at |
The webhook creation timestamp | |
created_by |
The ID of the user who created the webhook. |
Retrieve webhook detailslink
This endpoint allows you to retrieve details of the existing webhook for a given identifier.
Request
GET https://api.fivetran.com/v1/webhooks/{webhook_id}
Request parameters
Name | Description |
---|---|
webhook_id |
Webhook identifier |
Response
HTTP 200 OK
{
"id": "recur_readable",
"type": "group",
"group_id": "_moonbeam",
"url": "https://customer.com/webhook",
"events": [
"sync_start",
"sync_end"
],
"active": true,
"secret": "******",
"created_at": "2022-04-29T10:45:00.000Z",
"created_by": "_airworthy"
}
Fields
Name | Description | Possible values |
---|---|---|
id |
The webhook ID | |
type |
The webhook type | group , account |
group_id |
The group ID | |
url |
Your webhooks URL endpoint for your application | |
events |
The array of event types | |
active |
Boolean, if set to true , webhooks are immediately sent in response to events |
|
secret |
The secret string used for payload signing and masked in the response. Optional. | |
created_at |
The webhook creation timestamp | |
created_by |
The ID of the user who created the webhook. |
Update webhooklink
The endpoint allows you to update the existing webhook with a given identifier.
Request
PATCH https://api.fivetran.com/v1/webhooks/{webhook_id}
{
"url": "https://customer.com/webhook",
"events": [
"sync_end",
"sync_start"
],
"active": true,
"secret": "my_secret"
}
Request parameters
Name | Description |
---|---|
webhook_id |
The webhook ID |
url |
Your webhooks URL endpoint for your application |
events |
The array of event types |
active |
Boolean, if set to true , webhooks are immediately sent in response to events |
secret |
The secret string used for payload signing and masked in the response. Optional. |
Response
HTTP 200 OK
{
"id": "program_quoth",
"type": "account",
"url": "https://customer.com/webhook",
"events": [
"sync_start",
"sync_end"
],
"active": true,
"secret": "******",
"created_at": "2022-04-29T09:41:08.583Z",
"created_by": "_airworthy"
}
Fields
Name | Description | Possible values |
---|---|---|
id |
The webhook ID | |
type |
The webhook type | group , account |
group_id |
The group ID | |
url |
Your webhooks URL endpoint for your application | |
events |
The array of event types | |
active |
Boolean, if set to true , webhooks are immediately sent in response to events |
|
secret |
The secret string used for payload signing and masked in the response. Optional. | |
created_at |
The webhook creation timestamp | |
created_by |
The ID of the user who created the webhook. |
Delete webhooklink
This endpoint allows you to delete an existing webhook with a given identifier.
Request
DELETE https://api.fivetran.com/v1/webhooks/{webhook_id}
Request parameters
Name | Description |
---|---|
webhook_id |
The webhook ID |
Response
HTTP 204 OK
Retrieve the list of webhookslink
The endpoint allows you to retrieve the list of existing webhooks available for the current account.
Request
GET https://api.fivetran.com/v1/webhooks
Request parameters
Name | Description |
---|---|
cursor |
The paging cursor. Read more about pagination in our documentation |
limit |
The number of records to fetch, accepts a number in the range of 1…1000, the default value is 100 |
Response
HTTP 200 OK
{
"items": [
{
"id": "program_quoth",
"type": "account",
"url": "https://customer.com/webhook",
"events": [
"sync_start",
"sync_end"
],
"active": true,
"secret": "******",
"created_at": "2022-04-29T09:41:08.583Z",
"created_by": "_airworthy"
},
{
"id": "recur_readable",
"type": "group",
"group_id": "_moonbeam",
"url": "https://customer.com/webhook",
"events": [
"sync_start",
"sync_end"
],
"active": true,
"secret": "******",
"created_at": "2022-04-29T10:45:00.000Z",
"created_by": "_airworthy"
}
]
}
Fields
Name | Description | Possible values |
---|---|---|
items |
The collection of webhooks available for the current account | |
id |
The webhook ID | |
type |
The webhook type | group , account |
group_id |
The group ID | |
url |
Your webhooks URL endpoint for your application | |
events |
The array of event types | |
active |
Boolean, if set to true , webhooks are immediately sent in response to events |
|
secret |
The secret string used for payload signing and masked in the response. Optional. | |
created_at |
The webhook creation timestamp | |
created_by |
The ID of the user who created the webhook. |
Test webhooklink
The endpoint allows you to test an existing webhook. It sends a webhook with a given identifier for a dummy connector with identifier _connector_1
.
Request
POST https://api.fivetran.com/v1/webhooks/{webhook_id}/test
{
"event": "sync_start"
}
Request parameters
Name | Description |
---|---|
webhook_id |
The webhook ID |
event |
Type of event that should be sent |
Response
HTTP 200 OK
{
"succeed": false,
"status": 200,
"message": "SUCCESS"
}
Example of webhook payloadlink
Fivetran sends webhooks with the following payload structure:
{
"event" : "sync_end",
"created" : "2021-08-18T11:38:34.386Z",
"connector_type" : "asana",
"connector_id" : "mystified_presiding",
"destination_group_id" : "deck_enjoy",
"data" : {
"status" : "SUCCESSFUL"
}
}
Fields
Name | Description | Possible Values |
---|---|---|
event |
The event type | |
created |
The event generation date | |
connector_type |
The type of the connector for which the webhooks is sent | |
connector_id |
The ID of the connector for which the webhooks is sent | |
destination_group_id |
The destination group ID of the connector for which the webhooks is sent | |
data |
The response payload object. The object fields vary depending on the event type. | |
status |
The webhook creation status | SUCCESSFUL , FAILED |