curl -X POST https://qstash.upstash.io/v2/notify/myEvent \
-H "Authorization: Bearer <token>" \
-d "Hello World!"
import { Client } from "@upstash/workflow";
const client = new Client({ token: "<QSTASH_TOKEN>" })
await client.notify({
eventId: "my-event-id",
eventData: "Hello World!"
});
const response = await fetch('https://qstash.upstash.io/v2/notify/myEvent', {
method: 'POST',
body: "Hello world!",
headers: {
'Authorization': 'Bearer <token>'
}
});
import requests
headers = {
'Authorization': 'Bearer <token>',
}
response = requests.post(
'https://qstash.upstash.io/v2/notify/myEvent',
headers=headers
)
req, err := http.NewRequest("POST", "https://qstash.upstash.io/v2/notify/myEvent", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer <token>")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
[
{
"waiter": {
"url": "https://my-workflow.com/path",
"headers": {
"Upstash-Workflow-Runid": [
"wfr_melCHYvPkVhDqIhhk2"
],
"Upstash-Workflow-Url": [
"https://my-workflow.com/path"
]
},
"deadline": 1729869206
},
"messageId": "msg_26hZCxxbG2TT3AnHEr1w"
}
]
Runs
Notify Workflows
Resume workflows waiting for an event
POST
/
v2
/
notify
/
{eventId}
curl -X POST https://qstash.upstash.io/v2/notify/myEvent \
-H "Authorization: Bearer <token>" \
-d "Hello World!"
import { Client } from "@upstash/workflow";
const client = new Client({ token: "<QSTASH_TOKEN>" })
await client.notify({
eventId: "my-event-id",
eventData: "Hello World!"
});
const response = await fetch('https://qstash.upstash.io/v2/notify/myEvent', {
method: 'POST',
body: "Hello world!",
headers: {
'Authorization': 'Bearer <token>'
}
});
import requests
headers = {
'Authorization': 'Bearer <token>',
}
response = requests.post(
'https://qstash.upstash.io/v2/notify/myEvent',
headers=headers
)
req, err := http.NewRequest("POST", "https://qstash.upstash.io/v2/notify/myEvent", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer <token>")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
[
{
"waiter": {
"url": "https://my-workflow.com/path",
"headers": {
"Upstash-Workflow-Runid": [
"wfr_melCHYvPkVhDqIhhk2"
],
"Upstash-Workflow-Url": [
"https://my-workflow.com/path"
]
},
"deadline": 1729869206
},
"messageId": "msg_26hZCxxbG2TT3AnHEr1w"
}
]
Notify workflows waiting for an event to resume them. See our documentation to learn more.
More information about the
If there were no workflows waiting for the event, the result is an empty list.
Request
Event id to notify
Event data passed to the notified workflows
Response
The response contains a list of- notified waiter objects,
- id of the message sent,
- workflowRunId and workflowCreatedAt fields for the related workflow runs, as a result of the notify request.
type NotifyResponse = { waiter: Waiter, messageId: string, workflowRunId: string, workflowCreatedAt: number}[]
Waiter object:
Waiter
Show child attributes
Show child attributes
URL to call upon notify
Unix timestamp for when the wait will time out
Headers sent in case of notify
URL to call upon timeout
Body used in timeout request
Headers sent in case of time out
curl -X POST https://qstash.upstash.io/v2/notify/myEvent \
-H "Authorization: Bearer <token>" \
-d "Hello World!"
import { Client } from "@upstash/workflow";
const client = new Client({ token: "<QSTASH_TOKEN>" })
await client.notify({
eventId: "my-event-id",
eventData: "Hello World!"
});
const response = await fetch('https://qstash.upstash.io/v2/notify/myEvent', {
method: 'POST',
body: "Hello world!",
headers: {
'Authorization': 'Bearer <token>'
}
});
import requests
headers = {
'Authorization': 'Bearer <token>',
}
response = requests.post(
'https://qstash.upstash.io/v2/notify/myEvent',
headers=headers
)
req, err := http.NewRequest("POST", "https://qstash.upstash.io/v2/notify/myEvent", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer <token>")
resp, err := http.DefaultClient.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
[
{
"waiter": {
"url": "https://my-workflow.com/path",
"headers": {
"Upstash-Workflow-Runid": [
"wfr_melCHYvPkVhDqIhhk2"
],
"Upstash-Workflow-Url": [
"https://my-workflow.com/path"
]
},
"deadline": 1729869206
},
"messageId": "msg_26hZCxxbG2TT3AnHEr1w"
}
]
Was this page helpful?
⌘I