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

# Webhook Quickstart

> Step-by-step guide to configure, implement, and test a Suki notification Webhook endpoint

This guide walks you through the steps to receive Webhook notifications from Suki when an Ambient session completes or fails.

During partner onboarding, you provide Suki with a callback URL. Whenever a supported event occurs, Suki sends an HTTP POST request to that endpoint. Your application verifies the request, processes the payload, and returns a successful response.

## Prerequisites

Before you begin, make sure you have:

* Completed [Partner onboarding](/documentation/get-started/partner-onboarding).
* Provided Suki with an HTTPS callback URL. See [Configuration](/documentation/webhook/configuration).
* Received your partner secret key. You use this to verify incoming Webhook requests. See [Signature verification](/documentation/webhook/signature-verification).
* A publicly accessible HTTPS endpoint (TLS 1.2 or later).
* An integration that creates and ends Ambient sessions using the Ambient APIs or a Suki SDK.

<Note>
  Suki configures **one Webhook callback URL** per partner during onboarding. You cannot create or update the callback URL through an API or self-service portal.
</Note>

## Implementation

<Steps>
  <Step title="Configure Webhook Callback URL" icon="gear">
    Provide Suki with the HTTPS endpoint that should receive Webhook notifications, for example:

    `https://your-app.example.com/webhooks/notification`

    Suki stores this URL for your partner account and sends all Webhook notifications to this endpoint.
  </Step>

  <Step title="Create Webhook Endpoint" icon="code">
    Implement an endpoint that accepts:

    * POST requests.
    * Content-Type: application/json.

    Read the raw request body before parsing JSON. You'll use the raw payload when verifying the Webhook signature.
  </Step>

  <Step title="Verify Webhook Request" icon="lock">
    Before processing the payload:

    * Read the generated-at and X-API-Key headers.
    * Verify the HMAC-SHA-256 signature using your partner secret.
    * Reject the request if signature verification fails.

    For complete verification steps and examples, see [Signature verification](/documentation/webhook/signature-verification).
  </Step>

  <Step title="Process Webhook Event" icon="bell">
    After verification succeeds:

    * Parse the JSON payload.
    * Read the top-level status field.
    * Handle the event based on its value.

    **Success**:
    Use the returned session\_id, encounter\_id, and \_links to retrieve notes, transcripts, or status from the Ambient APIs.

    **Failure**:
    Use error\_code and error\_detail to log the failure, notify your application, or display an appropriate message.

    See [Webhook payload & response](/documentation/webhook/payload-and-response) for the complete payload schema.
  </Step>

  <Step title="Return Successful Response" icon="check">
    Return an HTTP 2xx response after successfully receiving the Webhook.

    You can process additional work asynchronously after sending the response.
  </Step>

  <Step title="Test Webhook Integration" icon="play">
    Run a complete ambient workflow:

    * Create an Ambient session.
    * Stream audio.
    * End the session.
    * Wait for processing to complete.

    Verify that your endpoint:

    * Receives the Webhook.
    * Verifies the signature.
    * Processes the payload.
    * Returns a successful response.

    If you need a sample workflow, see the [Ambient API quickstart](/api-reference/quickstart).
  </Step>
</Steps>

## Example Webhook handlers

The following examples show a basic Webhook endpoint that receives notifications and processes successful and failed events.

**Language tabs (agents):** Equivalent code samples are available in: Python, TypeScript. Humans see one language at a time. Use the variant that matches the user's stack; behavior is the same across tabs.

<Tabs>
  <Tab title="Python">
    ```python theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
    from flask import Flask, request, jsonify

    app = Flask(__name__)

    @app.route("/webhooks/notification", methods=["POST"])
    def Webhook():

        # Verify signature before parsing the payload.

        payload = request.get_json()

        if payload["status"] == "success":
            print(payload["session_id"])
            print(payload["encounter_id"])

        elif payload["status"] == "failure":
            print(payload["error_code"])
            print(payload["error_detail"])

        return jsonify({"status": "ok"}), 200
    ```
  </Tab>

  <Tab title="TypeScript">
    ```typescript theme={"theme":{"light":"github-dark","dark":"material-theme-darker"}}
    import express from "express";

    const app = express();

    app.use(express.json());

    app.post("/webhooks/notification", (req, res) => {

      // Verify signature before processing.

      const payload = req.body;

      if (payload.status === "success") {
        console.log(payload.session_id);
        console.log(payload.encounter_id);
      }

      if (payload.status === "failure") {
        console.log(payload.error_code);
        console.log(payload.error_detail);
      }

      res.status(200).json({ status: "ok" });
    });
    ```
  </Tab>
</Tabs>

## Available cookbooks

<div className="hp-io-method-grid tut-hub-card-grid" data-cookbook-related-grid>
  <a className="hp-io-method-card tut-hub-method-card" href="/documentation/cookbooks/verify-webhook-hmac-signature">
    <div className="tut-hub-card-media tut-hub-card-media--blue" aria-hidden="true" />

    <div className="hp-io-method-card-body">
      <div className="tut-hub-card-badges">
        <span className="hp-wn-badge hp-wn-badge-new">Webhooks</span>
        <span className="hp-wn-badge cookbook-hub-badge-surface cookbook-hub-badge-surface--api">API</span>
      </div>

      <h3 className="hp-io-method-card-title">Verify Webhook HMAC Signature</h3>

      <p className="hp-io-method-card-desc cookbook-hub-card-desc">
        Verify HMAC before parsing JSON.
      </p>

      <div className="hp-io-method-card-meta tut-hub-card-foot" aria-label="5 min">
        <div className="tut-hub-card-foot-meta">
          <span className="hp-io-method-card-meta-time">5 min</span>
        </div>
      </div>
    </div>
  </a>
</div>

## Available tutorials

<div className="hp-io-method-grid tut-hub-card-grid">
  <a className="hp-io-method-card tut-hub-method-card" href="/documentation/tutorials/webhook-notification-receiver">
    <div className="tut-hub-card-media" aria-hidden="true" />

    <div className="hp-io-method-card-body">
      <span className="hp-wn-badge hp-wn-badge-new">Webhooks</span>
      <h3 className="hp-io-method-card-title">Build a Webhook Notification Receiver</h3>

      <p className="hp-io-method-card-desc">
        Verify HMAC signatures, parse partner notifications, and handle success and failure events.
      </p>

      <div className="hp-io-method-card-meta tut-hub-card-foot" aria-label="10 min, Beginner">
        <div className="tut-hub-card-foot-meta">
          <span className="hp-io-method-card-meta-time">10 min</span>
          <span className="tut-hub-level">Beginner</span>
        </div>
      </div>
    </div>
  </a>
</div>

## Next steps

* Learn more about event types in the [Webhook event types](/documentation/webhook/event-types) guide.
* Implement a secure connection with [Signature verification](/documentation/webhook/signature-verification) process.
* Review the [Webhook payload & response](/documentation/webhook/payload-and-response) schema for the complete payload schema.
* Refer to the [Webhook API reference](/api-reference/asynchronous/webhook.mdx) for the OpenAPI specification and additional examples.
