# Notify Workflow Run Event

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

## Endpoint

`POST https://qstash-{region}.upstash.io/v2/notify/{workflowRunId}/{eventId}`

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


## Parameters

- `workflowRunId` (path, string, required): The workflow run ID to notify.
- `eventId` (path, string, required): The event ID that waiters are listening for.

## Request body


## Responses

### 201 - Event notification sent or saved successfully

- `waiter` (object)
  - `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): 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).

### 400 - Bad Request - Invalid workflow run ID or event ID

- `error` (string, required): Error message

### 401 - Unauthorized

- `error` (string, required): Error message

### 429 - Rate Limit Exceeded

- `error` (string, required): Error message

### 500 - Internal Server Error

- `error` (string, required): Error message

## cURL

```bash
curl --request POST \
  --url https://qstash-{region}.upstash.io/v2/notify/{workflowRunId}/{eventId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '<string>'
```
