---
title: resumeWebhook
description: Resume a paused workflow by sending an HTTP request to a webhook token.
docs_index: /llms.txt
lastUpdated: 2026-10-13
type: reference
summary: Use resumeWebhook to forward an HTTP request to a webhook token and resume a paused workflow.
prerequisites:
  - /docs/foundations/hooks
related:
  - /docs/api-reference/workflow-api/resume-hook
---

> For an index of all documentation, see [/llms.txt](/llms.txt).

Resumes a workflow run by sending an HTTP `Request` to a webhook identified by its token.

This function publishes a workflow invocation carrying the request; the runtime creates the `hook_received` event from it and continues execution. It's designed to be called from API routes or server actions that receive external HTTP requests.

> `resumeWebhook` is a runtime function that must be called from outside a workflow function.

> The webhook token is the only authorization `resumeWebhook()` and the public webhook route perform. Verify requests before acting on them. See [Hook and webhook security](/docs/foundations/hooks#security).

```typescript lineNumbers
import { resumeWebhook } from "workflow/api";

export async function POST(request: Request) {
  const url = new URL(request.url);
  const token = url.searchParams.get("token");

  if (!token) {
    return new Response("Missing token", { status: 400 });
  }

  try {
    const response = await resumeWebhook(token, request); // [!code highlight]
    return response;
  } catch (error) {
    return new Response("Webhook not found", { status: 404 });
  }
}
```

## API signature

### Parameters

### Returns

Returns a `Promise<Response>` that resolves to one of:

- A `202 Accepted` response when the webhook was created in the default mode (no `respondWith` option).
- The exact `Response` object configured via `createWebhook({ respondWith: new Response(...) })`.
- The workflow's manual `Response` when the webhook was created with `createWebhook({ respondWith: "manual" })` and a step calls `request.respondWith(response)`.

Throws [`HookNotFoundError`](/docs/api-reference/workflow-errors/hook-not-found-error) if the token does not match an active webhook.

## Usage note

> In most cases, you should not need to call `resumeWebhook()` directly. When you use `createWebhook()`, the framework automatically generates a webhook token and provides a public URL at `/.well-known/workflow/v1/webhook/:token`. External systems can send HTTP requests directly to that URL.
>
> For server-side hook resumption with deterministic tokens, use [`resumeHook()`](/docs/api-reference/workflow-api/resume-hook) with [`createHook()`](/docs/api-reference/workflow/create-hook) instead.

## Example

Forward an incoming HTTP request to a webhook by token:

```typescript lineNumbers
import { resumeWebhook } from "workflow/api";

export async function POST(request: Request) {
  const url = new URL(request.url);
  const token = url.searchParams.get("token");

  if (!token) {
    return new Response("Token required", { status: 400 });
  }

  try {
    const response = await resumeWebhook(token, request); // [!code highlight]
    return response; // 202 Accepted, a configured static Response, or a manual workflow response
  } catch (error) {
    return new Response("Webhook not found", { status: 404 });
  }
}
```

## Related functions

- [`createWebhook()`](/docs/api-reference/workflow/create-webhook) - Create a webhook in a workflow
- [`resumeHook()`](/docs/api-reference/workflow-api/resume-hook) - Resume a hook with arbitrary payload
- [`defineHook()`](/docs/api-reference/workflow/define-hook) - Type-safe hook helper

---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)