> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fivetran Webhook Setup Guide

> Configure Fivetran to deliver events to StackOne.

## Prerequisites

Before continuing, you should have already completed the following for this connector:

<Steps>
  <Step title="Configure the Connector">
    Enable the connector and set up its connector profile in your project. See <a href="/guides/explore-connectors">Managing Connectors</a>.

    <Columns cols={2}>
      <Card title="Connector Profile" href="/connectors/fivetran/guides/connector-profile/api-key" icon="https://stackone-logos.com/api/fivetran/filled/png" horizontal>
        Fivetran - API Key
      </Card>
    </Columns>
  </Step>

  <Step title="Link an Account">
    Connect an account using <a href="/guides/embedding-stackone-hub">StackOne Hub</a> or <a href="/guides/auth-link">Auth Link</a>.

    <Columns cols={2}>
      <Card title="Link Account" href="/connectors/fivetran/guides/link-account/api-key" icon="https://stackone-logos.com/api/fivetran/filled/png" horizontal>
        Fivetran - API Key
      </Card>
    </Columns>
  </Step>
</Steps>

<section data-guide-section data-guide-scopes="">
  <h2>How webhooks are set up</h2>

  <p>There is no manual webhook setup in Fivetran — it is fully automatic. On connection, StackOne calls Fivetran's `POST /v1/webhooks/account` endpoint with your API key to create one account-level webhook covering every supported event, using a delivery URL unique to this connection that carries a secret token. As part of creation, Fivetran sends a one-time `test_event` validation POST to the URL and requires a 2xx response before it activates the webhook — StackOne answers this automatically. Fivetran then sends one HTTP POST per event, StackOne routes it to your integration, and only the events you have enabled are dispatched. Disconnecting the account deletes the webhook.</p>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Review the available webhook events</h2>

  <p>Each delivery carries the firing event in the top-level `event` field, the affected connection in `connector_id`, and the timestamp in `created`. Only the events you enable in StackOne are dispatched.</p>

  <Steps>
    <Step title="Review sync events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Fired as a connection's data sync runs.</p>

        <ul>
          <li><strong>Sync Start</strong> (`sync_start`) — Fired when a connection sync begins.</li>
          <li><strong>Sync End</strong> (`sync_end`) — Fired when a connection sync completes (check `data.status` for `SUCCESSFUL`/`FAILED`).</li>
        </ul>
      </div>
    </Step>

    <Step title="Review connection health events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Fired for connection setup-test results.</p>

        <ul>
          <li><strong>Connection Successful</strong> (`connection_successful`) — Fired when a connection's setup test succeeds.</li>
          <li><strong>Connection Failure</strong> (`connection_failure`) — Fired when a connection's setup test fails.</li>
        </ul>
      </div>
    </Step>

    <Step title="Review connector lifecycle events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Fired as connections are created, edited, paused, and resynced.</p>

        <ul>
          <li><strong>Create Connector</strong> (`create_connector`) — Fired when a connection is created.</li>
          <li><strong>Edit Connector</strong> (`edit_connector`) — Fired when a connection's settings are edited.</li>
          <li><strong>Pause Connector</strong> (`pause_connector`) — Fired when a connection is paused.</li>
          <li><strong>Resume Connector</strong> (`resume_connector`) — Fired when a connection is resumed.</li>
          <li><strong>Delete Connector</strong> (`delete_connector`) — Fired when a connection is deleted.</li>
          <li><strong>Force Update Connector</strong> (`force_update_connector`) — Fired when a connection is force-updated (e.g. a manual sync via the API).</li>
          <li><strong>Resync Connector</strong> (`resync_connector`) — Fired when a full connection re-sync is triggered.</li>
          <li><strong>Resync Table</strong> (`resync_table`) — Fired when a single table re-sync is triggered.</li>
        </ul>
      </div>
    </Step>

    <Step title="Review transformation events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Fired as transformations (e.g. dbt) run.</p>

        <ul>
          <li><strong>Transformation Start</strong> (`transformation_start`) — Fired when a transformation run begins.</li>
          <li><strong>Transformation Succeeded</strong> (`transformation_succeeded`) — Fired when a transformation run completes successfully.</li>
          <li><strong>Transformation Failed</strong> (`transformation_failed`) — Fired when a transformation run fails.</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Inspect the delivery format</h2>

  <p>Fivetran sends each event as an HTTP POST with a JSON body. Top-level fields are `event` (the firing event, e.g. `sync_end`), `created` (ISO 8601 event time), `connector_type`, `connector_id`, `connector_name`, `sync_id`, `destination_group_id`, and `data` (event-specific detail, e.g. `data.status` of `SUCCESSFUL`/`FAILED`). StackOne maps `event` to the event type, `connector_id` to the record id, and `created` to the event timestamp, and passes the full body through as the event data.</p>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Understand delivery and retries</h2>

  <p>Your endpoint must return a 2xx status quickly. If a delivery fails (endpoint unavailable or a non-2xx response), Fivetran retries for up to 24 hours in increasing intervals, then stops for that event instance. Repeated failures can automatically deactivate the webhook. Design your integration to handle occasional duplicate deliveries idempotently.</p>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Verify delivery authenticity</h2>

  <p>StackOne registers the webhook with a signing secret, so Fivetran signs each delivery with an `X-Fivetran-Signature-256` header — an HMAC-SHA256 of the raw request body. StackOne authorizes each delivery using the secret token embedded in the per-connection webhook URL, so no extra configuration is required on your side.</p>
</section>

## Verify

Your Connector should now be able to receive and process events. Try triggering an event and you should see an Event appear in the Connector logs.
