> ## 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.acquireIdempotencyKey()

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

## `api.acquireIdempotencyKey()`

Acquires a durable instance-scoped idempotency key.

Notes:

* Cache outages do not remove duplicate protection; durable storage failure rejects admission.
* Unavailable with readOnly: true; throws READ\_ONLY\_OPERATION\_FORBIDDEN.

### Signature

```ts theme={null}
static acquireIdempotencyKey(
      key: string,
      ttl: number,
      value?: any,
    ): Promise<boolean>;
```

### Example

```ts theme={null}
const first = await api.acquireIdempotencyKey('orders:123', 600, { state: 'running' });
```

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.