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

# ctx.runId

> The id of the current run.

A unique id of this run of the action, a random UUID. It is the last part of the run's URL, `/actions/<slug>/<runId>`.

## Usage

```ts theme={null}
export const importOrdersAction = app.defineAction({
  name: 'Import orders',
  handler: async ({ io, ctx }) => {
    console.info(`[${ctx.runId}] import started by ${ctx.user.email}`);
    // …
  },
});
```

Use it to tie your logs or records to one run. Runs live in memory only, so the id stops pointing anywhere after the run is cleaned up (15 minutes after it ends) or the server restarts.


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