Skip to main content

Create Topics and Endpoints

QStash allows you to group multiple APIs together into a single namespace, called a topic. Read more about topics here.

There are two ways to create endpoints and topics: The UI and the REST API.

UI

Go to console.upstash.com/qstash and click on the Topics tab. Afterwards you can create a new topic by giving it a name. Keep in mind that topic names are restricted to alphanumeric, underscore, hyphen and dot characters.

After creating the topic, you can add endpoints to it:

API

First you need to create a topic by providing a name:

curl -XPOST 'https://qstash.upstash.io/v1/topics' \
-H 'Authorization: Bearer <QSTASH_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{"name": "my-topic"}'

And then you can create a new endpoint for this topic

curl -XPOST 'https://qstash.upstash.io/v1/endpoints' \
-H 'Authorization: Bearer <QSTASH_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{"topicName": "my-topic", "url": "https://my-endpoint.com/path"}'