Skip to main content

Download OpenAPI specification:Download

Endpoints

List

Returns all your existing endpoints.

Responses

Create

Create a new endpoint and susbscribe it to a topic.

Authorizations:
Request Body schema: application/json
topicId
string

The id of the topic this endpoint subscribes to.

Either topicId or topicName must be set

topicName
string

The name of the topic this endpoint subscribes to.

Either topicId or topicName must be set

url
required
string

User controlled service url where we will send webhooks to.

Must not be on local network.

Responses

Request samples

Content type
application/json
{
  • "topicId": "string",
  • "topicName": "string",
  • "url": "string"
}

Get

Returns all your existing endpoints.

path Parameters
endpointId
required
string

The id of the endpoint

Responses

Update

Update an existing endpoint's url. This will only apply to newly created messages. All messages published before this endpoint was updated will still use the old url.

path Parameters
endpointId
required
string
Request Body schema: application/json
url
required
string

The new url of the endpoint

Responses

Request samples

Content type
application/json
{
  • "url": "string"
}

Delete

Deletes an existing endpoint from qstash

query Parameters
endpointId
required
string

The id of the endpoint you want to delete.

Responses

Keys

Get

Get your current and next signing keys.

Responses

Rotate

Rotate your signing keys. The next one becomes the current and we generate a new one and assign it to next

Please update the signing keys in your applications as soon as possible.

Responses

Messages

List

Returns a list of messages

query Parameters
cursor
integer <int64>

Cursor is a unix timestamp with milliseconds precision. You can use it to paginate the results.

Responses

Get

Get the complete message with the given Id.

query Parameters
messageId
required
string

The unique id of the message.

Responses

Cancel

Cancel a message. We will no longer try to deliver this message to any endpoints. All scheduled executions of this message will be canceled as well.

query Parameters
messageId
required
string

The unique id of the message you want to cancel

Responses

Tasks

Returns the last 100 tasks in descending chronological order.

Use the cursor parameter to paginate.

path Parameters
messageId
required
string

MessageId is the Id of the message to list tasks for.

query Parameters
cursor
integer <int64>

Cursor is a unix timestamp with milliseconds precision. You can use it to paginate the results.

Responses

Publish

Publish a new message to a topic or directly to a url.

path Parameters
Destination
required
string

Destination can either be a topic name or id that you configured in the Upstash console, or a valid url where the message gets sent to. Make sure the url is prefixed with a valid protocol (http:// or https://)

header Parameters
Content-Type
string

ContentType is the MIME type of the message.

We highly recommend sending a Content-Type header along, as this will help your destination API to understand the content of the message.

For example application/json, application/xml, application/octet-stream, text/plain

Upstash-Deduplication-Id
string
Example: "abcdef"

Provide a unique id for deduplication.

This id will be used to detect duplicate messages. If a duplicate message is detected, the request will be accepted but not enqueued. Deduplication ids must not contain : or whitespace.

We store deduplication ids for 90 days. Afterwards it is possible that the message with the same deduplication id is delivered again.

When scheduling a message, the deduplication happens before the schedule is created.

Upstash-Content-Based-Deduplication
boolean
Example: true

If true, the message content will get hashed and used as deduplication id. If a duplicate message is detected, the request will be accepted but not enqueued.

The content based hash includes the following values:

All headers prefixed with Upstash this includes all custom headers you are sending.

The entire raw request body

The destination from the url path

We store deduplication ids for 90 days. Afterwards it is possible that the message with the same deduplication id is delivered again.

When scheduling a message, the deduplication happens before the schedule is created. Messages created by schedules are not deduplicated.

Upstash-Not-Before
integer <int64>
Example: 1657093973

Delay the first delivery attempt until this time

Unix timestamp with second precision.

This overrides Upstash-Delay if both are provided.

Upstash-Delay
string
Example: "50s" | "3m" | "10h" | "1d"

Delay the first delivery attempt.

Format for this header is a number followed by duration abbreviation, like 10s. Available durations are s (seconds), m (minutes), h (hours), d (days).

Overridden by Upstash-Not-Before if both are provided.

Upstash-Retries
integer <int64>
Example: 3

How often should this messasge be retried in case the destination API is not available.

The total number of deliveries is therefore capped at 1 + retries

Leave this empty to use the default value, (free tier: 3, paid tier: 5)

The backoff duration in seconds is calculated as follows: n is the number of times the task has been retried.

min(86400, e ** (2 * n))

Upstash-Cron
string
Example: */5 * * * *

Cron allows you to send this message periodically on a schedule.

Add a Cron expression and we will requeue this message automatically whenever the Cron expression triggers. We offer an easy to use UI for creating Cron expressions in our console or you can check out Crontab.guru.

Note: it can take up to 60 seconds until the schedule is registered on an available qstash node.

Upstash-Callback
string
Example: https://example.com/callback

You can define a callback url that will be called with the response from the destination API.

Callbacks are experimental, and the API might change in the future!

The callback url must be prefixed with a valid protocol (http:// or https://) Callbacks are charged as a regular message. Callbacks will use the retry setting from the original request.

Upstash-Forward-*
string
Example: "Upstash-Forward-My-Header: my-value" -> "My-Header: my-value"

You can send custom headers along with your message.

To send a custom header, prefix the header name with Upstash-Forward-. We will strip the prefix and them to the destination API.

Request Body schema: application/json

The raw request message passed to the endpoints as is

Will be populated from the request body

string <byte>

Responses

Request samples

Content type
application/json
"string"

Quota

Get your current quota limits.

Responses

Schedules

List

Returns a list of schedules

Responses

Get

Returns a single schedule

Responses

Delete

Delete a schedule. It can take up to 60s for the schedule to be deleted from the system.

query Parameters
scheduleId
required
string

The unique id of the schedule you want to delete

Responses

Tasks

Get

Returns information about a task

query Parameters
taskId
required
string

Specify the task id for which you want to get information

Responses

Logs

Returns the last 100 logs in descending chronological order.

Use the cursor parameter to paginate.

path Parameters
taskId
required
string

TaskId is the Id of the tasks to list logs for.

Responses

Topics

List

Returns all your existing topics.

Responses

Create

Create a new topic in qstash

Request Body schema: application/json
name
required
string

The name of the topic Must only contain alphanumeric characters, underscores, dashes and periods. regex: ^[a-zA-Z0-9-_.]+$

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Get

returns all your existing topics.

path Parameters
topic
required
string

The id or name of the topic

Responses

Update

Update an existing topic's name

path Parameters
Topic
required
string

Topic name or id

Request Body schema: application/json
name
required
string

The new name of the topic Must only contain alphanumeric characters, underscores, dashes and periods. regex: ^[a-zA-Z0-9-_.]+$

Responses

Request samples

Content type
application/json
{
  • "name": "string"
}

Delete

deletes an existing topic from qstash

query Parameters
topic
required
string

The name or id for the topic you want to delete.

Responses