Skip to main content
POST
/
qstash
/
user
/
rotatetoken
Reset QStash Token
curl --request POST \
  --url https://api.upstash.com/v2/qstash/user/rotatetoken \
  --header 'Authorization: Basic <encoded-value>'
import requests

url = "https://api.upstash.com/v2/qstash/user/rotatetoken"

headers = {"Authorization": "Basic <encoded-value>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};

fetch('https://api.upstash.com/v2/qstash/user/rotatetoken', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.upstash.com/v2/qstash/user/rotatetoken",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => [
    "Authorization: Basic <encoded-value>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.upstash.com/v2/qstash/user/rotatetoken"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Authorization", "Basic <encoded-value>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.upstash.com/v2/qstash/user/rotatetoken")
  .header("Authorization", "Basic <encoded-value>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.upstash.com/v2/qstash/user/rotatetoken")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'

response = http.request(request)
puts response.read_body
{
  "customer_id": "example@upstash.com",
  "id": "99a4c327-31f0-490f-a594-043ade84085a",
  "password": "ZXhhbXBsZUB1cHN0YXNoLmNvbTpuYWJlcg==",
  "token": "ZXhhbXBsZUB1cHN0YXNoLmNvbTpuYWJlcg==",
  "active": true,
  "state": "active",
  "last_plan_upgrade_time": 1761267303,
  "max_message_size": 52428800,
  "max_requests_per_day": 1000000,
  "max_requests_per_day_hard": 10000000,
  "max_endpoints_per_topic": 1000,
  "max_requests_per_second": 500,
  "max_dlq_size": 2147483647,
  "max_retries": 20,
  "max_topics": 1000,
  "max_schedules": 1000000,
  "max_events_size": 100000,
  "max_dlq_retention_time_milis": 2592000000,
  "max_delay": 2147483647,
  "max_parallelism": 10,
  "max_global_parallelism": 200,
  "max_queues": 1000,
  "prod_pack_enabled": false,
  "timeout": 21600,
  "type": "paid",
  "reserved_type": "qstash_enterprise_1m",
  "reserved_price": 180,
  "created_by": "example@upstash.com",
  "creation_time": 1760423113
}

Authorizations

Authorization
string
header
required

Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.

Response

200 - application/json

Token reset successfully, returns updated user information with new credentials

customer_id
string

Customer identifier (email or team ID)

Example:

"example@upstash.com"

id
string<uuid>

Unique identifier for the QStash user account

Example:

"99a4c327-31f0-490f-a594-043ade84085a"

password
string

QStash authentication password

Example:

"ZXhhbXBsZUB1cHN0YXNoLmNvbTpuYWJlcg=="

token
string

Authentication token for QStash operations

Example:

"ZXhhbXBsZUB1cHN0YXNoLmNvbTpuYWJlcg=="

active
boolean

Whether the QStash account is active

Example:

true

state
enum<string>

Current state of the QStash account

Available options:
active,
passive
Example:

"active"

last_plan_upgrade_time
integer<int64>

Unix timestamp of the last plan upgrade

Example:

1761267303

max_message_size
integer

Maximum message size in bytes

Example:

52428800

max_requests_per_day
integer

Soft limit for maximum requests per day

Example:

1000000

max_requests_per_day_hard
integer

Hard limit for maximum requests per day

Example:

10000000

max_endpoints_per_topic
integer

Maximum number of endpoints allowed per topic

Example:

1000

max_requests_per_second
integer

Maximum requests per second (rate limit)

Example:

500

max_dlq_size
integer

Maximum dead letter queue size

Example:

2147483647

max_retries
integer

Maximum number of retry attempts for failed messages

Example:

20

max_topics
integer

Maximum number of topics allowed

Example:

1000

max_schedules
integer

Maximum number of schedules allowed

Example:

1000000

max_events_size
integer

Maximum size for events

Example:

100000

max_dlq_retention_time_milis
integer<int64>

Maximum retention time for dead letter queue in milliseconds

Example:

2592000000

max_delay
integer

Maximum delay for scheduled messages in seconds

Example:

2147483647

max_parallelism
integer

Maximum parallel processing per endpoint

Example:

10

max_global_parallelism
integer

Maximum global parallel processing across all endpoints

Example:

200

max_queues
integer

Maximum number of queues allowed

Example:

1000

prod_pack_enabled
boolean

Whether production pack features are enabled

Example:

false

timeout
integer

Request timeout in seconds

Example:

21600

type
enum<string>

Account plan type

Available options:
free,
paid
Example:

"paid"

reserved_type
enum<string>

Indicates the reserved plan type for QStash. If a credit card is attached, this field reflects the associated reserved plan. If no credit card is added and the account is not on a pay-as-you-go plan, this field will be an empty string.

Available options:
paid,
qstash_enterprise_1m,
qstash_enterprise_10m
Example:

"qstash_enterprise_1m"

reserved_price
number<float>

Reserved plan price

Example:

180

created_by
string

Email of the user who created this account

Example:

"example@upstash.com"

creation_time
integer<int64>

Unix timestamp of account creation

Example:

1760423113