Skip to main content
POST
TypeScript

Authorizations

Authorization
string
header
required

Use a named environment API key. It starts with tr_dev_sk_, tr_prod_sk_, tr_stg_sk_, etc.

Create a named API key in the API Keys section of your Trigger.dev project dashboard. Choose the narrowest access preset that supports your integration.

Our TypeScript SDK will default to using the value of the TRIGGER_SECRET_KEY environment variable if it is set. If you are using the SDK in a different environment, you can set the key using the configure function.

Path Parameters

name
string
required

The limit's name

Body

application/json

At least one of perKey or total must be provided.

perKey
integer

Caps each concurrencyKey pool; runs without a key share one pool. May not exceed the environment concurrency limit.

Required range: 0 <= x <= 100000
total
integer

Caps every run holding this limit, keys or not. May not exceed the environment concurrency limit.

Required range: 0 <= x <= 100000

Response

Concurrency limit overridden successfully

id
string
required

The limit's id, starting with climit_

Example:

"climit_abcdef123456"

name
string
required

The limit's name, as declared with concurrencyLimit()

Example:

"openai"

perKey
object
required

Caps each concurrencyKey pool; runs without a key share one pool

total
object
required

Caps every run holding this limit, keys or not

running
integer
required

Runs executing that hold this limit

Example:

14

queued
integer
required

Runs that are queued and must clear this limit to execute

Example:

100

paused
boolean

Whether the limit is paused. A paused limit admits no runs until resumed; its configured bounds are kept.

Example:

false