---
title: "Notify Workflow Run Event"
method: POST
path: "/v2/notify/{workflowRunId}/{eventId}"
tags: ["Notify"]
---

# Notify Workflow Run Event

`POST /v2/notify/{workflowRunId}/{eventId}`

## Request

- Base URL: `https://qstash-eu-central-1.upstash.io`
- URL: `https://qstash-eu-central-1.upstash.io/v2/notify/{workflowRunId}/{eventId}`
- Auth: one of:
  - HTTP bearer
  - API key in query parameter `qstash_token`
- TypeScript: <https://skmtc.dev/upstash/apis/upstash-workflow-rest-api/docs/v2/notify/:workflowRunId/:eventId/post.ts> (a function with typed inputs; its response is checked against the schema)

Notify an event to a specific workflow run's waiters.

This endpoint sends an event notification to waiters within a specific workflow run.
Unlike the general notify endpoint, this uses a "safe notify" mechanism that guarantees
delivery even if no waiter is currently active.

**Safe Notify Behavior:**
- If a waiter is currently active, it receives the notification immediately
- If no waiter is active, the notification is saved in the database
- When a waiter becomes active later, it will consume the saved notification
- This ensures events are never lost due to timing issues

## Path parameters

- `workflowRunId` string, required
- `eventId` string, required

## Request body

- object

## Response `201`

Event notification sent or saved successfully

- NotifyResponse
  - `waiter` Waiter
    - `url` string: The URL that is waiting for the event notification.
    - `headers` object: The HTTP headers to send with the notification.
    - `deadline` integer: The Unix timestamp in seconds when the wait operation times out.
    - `timeoutBody` string, byte: The body to send if the wait times out.
    - `timeoutUrl` string: The URL to call if the wait times out.
    - `timeoutHeaders` object: The HTTP headers to send with the timeout callback.
  - `messageId` string: The ID of the notification message that was published.
  - `deduplicated` boolean: Whether this notification was deduplicated.
  - `error` string: Error message if the notification failed.
  - `workflowRunId` string: The workflow run ID if the notification was sent within a workflow.
  - `workflowCreatedAt` integer: The timestamp when the workflow run was created (Unix timestamp in milliseconds).

## Other responses

- `400`: Bad Request - Invalid workflow run ID or event ID
- `401`: Unauthorized
- `429`: Rate Limit Exceeded
- `500`: Internal Server Error

---

[API](https://skmtc.dev/upstash/apis/upstash-workflow-rest-api.md) - [All operations](https://skmtc.dev/upstash/apis/upstash-workflow-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upstash/apis/upstash-workflow-rest-api/revisions/251bee05a7ec?raw)
