# Reset QStash Token

> Resets the authentication credentials for the QStash user account.

## Endpoint

`POST https://api.upstash.com/v2/qstash/rotate-token/{id}`

Resets the authentication credentials for the QStash user account.
This invalidates the old password and token, and generates new ones.
Returns the updated user information with new credentials.


## Parameters

- `id` (path, string, required): QStash user ID

## Responses

### 200 - Token reset successfully, returns updated user information with new credentials

- `customer_id` (string): Customer identifier (email or team ID)
- `id` (string): Unique identifier for the QStash user account
- `token` (string): Authentication token for QStash operations
- `read_only_token` (string): Read-only authentication token for QStash operations
- `active` (boolean): Whether the QStash account is active
- `state` (string): Current state of the QStash account (e.g. `active`, `passive`; other values may be returned)
- `modifying_state` (string): Transitional state while the console applies an async change (e.g. `suspended` during suspension). Omitted when no change is in progress.
- `last_plan_upgrade_time` (integer): Unix timestamp of the last plan upgrade
- `max_message_size` (integer): Maximum message size in bytes
- `max_requests_per_day` (integer): Soft limit for maximum requests per day
- `max_requests_per_day_hard` (integer): Hard limit for maximum requests per day
- `max_endpoints_per_topic` (integer): Maximum number of endpoints allowed per topic
- `max_requests_per_second` (integer): Maximum requests per second (rate limit)
- `max_dlq_size` (integer): Maximum dead letter queue size
- `max_retries` (integer): Maximum number of retry attempts for failed messages
- `max_topics` (integer): Maximum number of topics allowed
- `max_schedules` (integer): Maximum number of schedules allowed
- `max_events_size` (integer): Maximum size for events
- `max_dlq_retention_time_milis` (integer): Maximum retention time for dead letter queue in milliseconds
- `max_delay` (integer): Maximum delay for scheduled messages in seconds
- `max_parallelism` (integer): Maximum parallel processing per endpoint
- `max_global_parallelism` (integer): Maximum global parallel processing across all endpoints
- `max_queues` (integer): Maximum number of queues allowed
- `max_bandwidth_per_second` (integer): Maximum bandwidth per second in bytes
- `prod_pack_enabled` (boolean): Whether production pack features are enabled
- `prometheus_enabled` (enum<string>): Whether Prometheus metrics export is enabled (`"true"` / `"false"` string as returned by the API)
- `timeout` (integer): Request timeout in seconds
- `type` (enum<string>): Account billing plan category
- `region` (enum<string>): Region where the QStash instance is deployed
- `reserved_type` (string): Fixed-tier or enterprise label when applicable. May be empty/absent for non-fixed plans.
Known values include `qstash_fixed_1m`, `qstash_fixed_10m`, `qstash_fixed_100m`, `qstash_fixed`.
Enterprise accounts may use the prefix `enterprise:` followed by an identifier (e.g. `enterprise:acme`).

- `reserved_price` (integer): Reserved plan price (may be `0`)
- `created_by` (string): Email of the user who created this account
- `creation_time` (integer): Unix timestamp of account creation
- `deletion_time` (integer): Unix timestamp of account deletion (`0` if not deleted)
- `budget` (integer): Monthly spending budget limit in dollars. 0 means no limit.
- `enterprise` (object): Present for enterprise accounts
  - `enabled` (boolean): Whether enterprise features are enabled

## cURL

```bash
curl --request POST \
  --url https://api.upstash.com/v2/qstash/rotate-token/{id} \
  --header 'Authorization: Bearer <token>'
```
