> ## Documentation Index
> Fetch the complete documentation index at: https://upstash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Pin Configuration for Flow Control Key

> Pins a processing configuration for a specific flow-control key.

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.

<Warning>Pinning a configuration resets the current state (rate count and period) of the flow-control key.</Warning>


## OpenAPI

````yaml /workflow/openapi.yaml post /v2/flowControl/{flowControlKey}/pin
openapi: 3.1.0
info:
  title: Upstash Workflow REST API
  description: >
    Upstash Workflow is a serverless workflow orchestration service built on top
    of Upstash QStash and Upstash Redis.
  version: 2.0.0
  contact:
    name: Upstash
    url: https://upstash.com
servers:
  - url: https://qstash.upstash.io
security:
  - bearerAuth: []
  - bearerAuthQuery: []
paths:
  /v2/flowControl/{flowControlKey}/pin:
    post:
      tags:
        - Flow Control
      summary: Pin Configuration for Flow Control Key
      description: Pins a processing configuration for a specific flow-control key.
      parameters:
        - name: flowControlKey
          in: path
          required: true
          schema:
            type: string
          description: The flow-control key for which the configuration will be pinned.
        - name: parallelism
          in: query
          schema:
            type: integer
          description: The parallelism value to apply to the flow-control key.
        - name: rate
          in: query
          schema:
            type: integer
          description: The rate value to apply to the flow-control key.
        - name: period
          in: query
          schema:
            type: integer
          description: The period value to apply to the flow-control key, in seconds.
      responses:
        '200':
          description: The flow-control key configuration has been pinned.
        '400':
          description: >-
            Bad request. Returned when the flow-control key is not provided, or
            when the parallelism, rate or period values are invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: QStash authentication token
    bearerAuthQuery:
      type: apiKey
      in: query
      name: qstash_token
      description: QStash authentication token passed as a query parameter

````