Skip to main content
POST
/
v2
/
flowControl
/
{flowControlKey}
/
pin
Pin Configuration for Flow Control Key
curl --request POST \
  --url https://qstash.upstash.io/v2/flowControl/{flowControlKey}/pin \
  --header 'Authorization: Bearer <token>'
{
  "error": "<string>"
}
Normally, each message sent to QStash includes a flow-control configuration for the corresponding flow-control key. The processing configuration is updated based on configurations provided by incoming messages. This means that if you want to change the configuration, you typically need to update it in your code and wait until a new message with the updated configuration is sent. By pinning a configuration, you can enforce a fixed configuration for a flow-control key. While pinned, the system ignores configurations provided by incoming messages and continues using the pinned configuration until it is explicitly unpinned. This allows you to increase or decrease processing throughput without requiring code changes or waiting for new messages with updated configurations. For example, you can temporarily increase the processing speed to clear a backlog of pending messages, or decrease it when a downstream dependency is experiencing issues.
Pinning a configuration resets the current state (rate count and period) of the flow-control key.

Authorizations

Authorization
string
header
required

QStash authentication token

Path Parameters

flowControlKey
string
required

The flow-control key for which the configuration will be pinned.

Query Parameters

parallelism
integer

The parallelism value to apply to the flow-control key.

rate
integer

The rate value to apply to the flow-control key.

period
integer

The period value to apply to the flow-control key, in seconds.

Response

The flow-control key configuration has been pinned.