> ## 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.

# BambooHR Webhook Setup Guide

> Configure BambooHR 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/bamboohr/guides/connector-profile/oauth-2-0" icon="https://stackone-logos.com/api/bamboohr/filled/png" horizontal>
        BambooHR - OAuth 2.0
      </Card>

      <Card title="Connector Profile" href="/connectors/bamboohr/guides/connector-profile/api-key" icon="https://stackone-logos.com/api/bamboohr/filled/png" horizontal>
        BambooHR - 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/bamboohr/guides/link-account/oauth-2-0" icon="https://stackone-logos.com/api/bamboohr/filled/png" horizontal>
        BambooHR - OAuth 2.0
      </Card>

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

<section data-guide-section data-guide-scopes="">
  <h2>Subscribe via the StackOne dashboard</h2>

  <p>This connector uses <strong>Programmatic Webhooks</strong>. When you enable webhook events for a connected BambooHR account, StackOne automatically creates a single webhook (via `POST /api/v1/webhooks`) registered for the event types you enable, pointing at your StackOne callback URL.</p>

  <Steps>
    <Step title="Select event subscriptions in the dashboard">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>In the StackOne dashboard, open the BambooHR connector profile and enable the webhook events you want delivered downstream. See the <strong>Available Webhook Events</strong> section below for the full list.</p>
      </div>
    </Step>

    <Step title="Registration on subscribe">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>When webhook events are enabled (or the event selection changes), StackOne creates the webhook on your behalf using the connected account's credentials. The webhook is registered for all enabled event types in a single call.</p>

        <ul>
          <li>StackOne registers a comprehensive set of standard employee fields as `monitorFields` so that any change to core employee data triggers `employee.updated`.</li>
          <li>The webhook is created with `format: json` so payloads arrive as JSON.</li>
        </ul>
      </div>
    </Step>

    <Step title="Service-account API key recommendation">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>BambooHR webhooks are permanently tied to the user account that created them. If the creating user is deactivated, the webhook silently stops firing with no error or notification.</p>

        <ul>
          <li>For API Key connections, generate the key from a dedicated service account (e.g. a non-person integration user) that will not be deactivated.</li>
          <li>OAuth 2.0 connections are not subject to this limitation.</li>
        </ul>
      </div>
    </Step>

    <Step title="Verify delivery">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Trigger a matching change in BambooHR (for example, update an employee's name) and confirm the event reaches your downstream consumer.</p>

        <ul>
          <li>BambooHR retries failed deliveries up to 5 times with exponential backoff (immediate, +5 min, +10 min, +20 min, +40 min with jitter).</li>
        </ul>
      </div>
    </Step>

    <Step title="Unsubscribe">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Changing your event selection re-registers the StackOne-managed webhook. Disconnecting the account deletes it, stopping deliveries.</p>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Available Webhook Events</h2>

  <p>The following BambooHR employee events can be enabled using the modern event-based webhook family.</p>

  <Steps>
    <Step title="Employee lifecycle events">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>Events fired when employee records are created, updated, or deleted.</p>

        <ul>
          <li><strong>Employee Created</strong> (`employee.created`) — Fired when a new employee record is created. Note: BambooHR also fires `employee.updated` immediately after `employee.created` — downstream consumers should expect both.</li>
          <li><strong>Employee Updated</strong> (`employee.updated`) — Fired when any monitored field on an employee changes. The payload includes `data.changedFields` listing the changed field aliases. Only fires for fields in the registered `monitorFields` list — StackOne registers all standard fields.</li>
          <li><strong>Employee Deleted</strong> (`employee.deleted`) — Fired when an employee record is deleted.</li>
        </ul>
      </div>
    </Step>
  </Steps>
</section>

<section data-guide-section data-guide-scopes="">
  <h2>Payload and signature</h2>

  <p>Details of how BambooHR delivers events to StackOne.</p>

  <Steps>
    <Step title="JSON payloads">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>BambooHR delivers each event as an HTTP POST with a JSON body. The envelope contains `type` (the event string, e.g. `employee.updated`), `timestamp` (ISO 8601), and `data` (with `companyId`, `employeeId`, and for updated events, `changedFields`).</p>
      </div>
    </Step>

    <Step title="Signature mechanism">
      <div data-guide-step data-guide-scopes="" data-guide-display-scopes-list="">
        <p>BambooHR signs each delivery using the `privateKey` returned in the webhook creation response (201). The key is shown <strong>only once</strong> and cannot be retrieved again — store it securely at creation time.</p>

        <ul>
          <li>Signature header: `X-BambooHR-Signature`</li>
          <li>Algorithm: HMAC-SHA256 computed over the raw request body concatenated with the `X-BambooHR-Timestamp` header value.</li>
          <li>To verify: reconstruct the HMAC using your stored `privateKey` and compare it to the header value.</li>
        </ul>
      </div>
    </Step>
  </Steps>
</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.
