curl -XPOST https://qstash.upstash.io/v2/topics/my-topic \
-H "Authorization: Bearer <token>"
const response = await fetch('https://qstash.upstash.io/v2/topics/my-topic', {
method: 'POST',
headers: {
'Authorization': 'Bearer <token>'
}
});
import requests
headers = {
'Authorization': 'Bearer <token>',
}
response = requests.post(
'https://qstash.upstash.io/v2/topics/my-topic',
headers=headers
)
req, err := http.NewRequest("POST", "https://qstash.upstash.io/v2/topics/my-topic", 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()
Topics
Remove Topic
Remove a topic and all its endpoints
DELETE
/
v2
/
topics
/
{topicName}
curl -XPOST https://qstash.upstash.io/v2/topics/my-topic \
-H "Authorization: Bearer <token>"
const response = await fetch('https://qstash.upstash.io/v2/topics/my-topic', {
method: 'POST',
headers: {
'Authorization': 'Bearer <token>'
}
});
import requests
headers = {
'Authorization': 'Bearer <token>',
}
response = requests.post(
'https://qstash.upstash.io/v2/topics/my-topic',
headers=headers
)
req, err := http.NewRequest("POST", "https://qstash.upstash.io/v2/topics/my-topic", 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()
The topic and all its endpoints are removed. In flight messages in the topic are not removed but you will not be able to send messages to the topic anymore.
Request
string
required
The name of the topic to remove.
Response
This endpoint returns 200 if the topic is removed successfully.curl -XPOST https://qstash.upstash.io/v2/topics/my-topic \
-H "Authorization: Bearer <token>"
const response = await fetch('https://qstash.upstash.io/v2/topics/my-topic', {
method: 'POST',
headers: {
'Authorization': 'Bearer <token>'
}
});
import requests
headers = {
'Authorization': 'Bearer <token>',
}
response = requests.post(
'https://qstash.upstash.io/v2/topics/my-topic',
headers=headers
)
req, err := http.NewRequest("POST", "https://qstash.upstash.io/v2/topics/my-topic", 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()
Was this page helpful?
⌘I