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

# api.concurrencyLimit()

> Public low-code contract, signatures and examples for api.concurrencyLimit.

## `api.concurrencyLimit()`

Acquires an instance-scoped concurrency token.

Notes:

* Returns whether admission succeeded; ttl is in seconds.
* Each successful admission acquires one slot. Release it exactly once with releaseConcurrencyLimit.
* Stored durably per instance with a separate owner and expiry for each admitted slot.
* Without leaseOwnerId, release through the same runtime invocation that acquired the slot.
* For separate SDK requests, pass a unique leaseOwnerId for this execution to acquisition and release.
  Reusing that owner renews neither its TTL nor business idempotency. Finish before TTL.
* Durable storage unavailability throws before admission; an optional cache is not required.
* Unavailable with `readOnly: true` (throws an error).

### Signature

```ts theme={null}
static concurrencyLimit(
      key: string,
      limit: number,
      ttl: number,
      leaseOwnerId?: string,
    ): Promise<boolean>;
```

### Example

```ts theme={null}
const locked = await api.concurrencyLimit('sync:customers', 1, 300);
```

See [all api methods](https://docs.revoengine.com/low-code/reference/api.md) or [runtime basics](https://docs.revoengine.com/low-code/overview.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.