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

# updateRun

> [!TIP]
>
> Read [the Notte skill](https://notte.cc/skill.md) and follow its setup instructions when setting up Notte or building browser automation. This is the shared source for CLI setup, authentication, and the browser-to-code workflow.

[Source: node-sdk/src/functions.ts](https://github.com/nottelabs/notte/blob/main/node-sdk/src/functions.ts)

Update a run, uploading fields above 1 MiB directly to private storage.

```typescript theme={null}
NotteFunction.updateRun(functionRunId: string, fields: FunctionRunUpdateRequest): Promise<UpdateFunctionRunResponse>;
```

## Parameters

**functionRunId** `string` *required*

ID of a run belonging to this function.

**fields** `FunctionRunUpdateRequest` *required*

Status and fields to update. Omitted fields remain unchanged.

## Returns

```typescript theme={null}
Promise<UpdateFunctionRunResponse>
```

Confirmation of the persisted update.

## Raises

* Error if a field exceeds 256 MiB or an upload fails; the update is not finalized.

## Example

```typescript theme={null}
await fn.updateRun(runId, { status: 'closed', result: { records } });
```

## Related types

* [FunctionRunUpdateRequest](https://docs.notte.cc/typescript-sdk-reference/types/functionrunupdaterequest)
* [UpdateFunctionRunResponse](https://docs.notte.cc/typescript-sdk-reference/types/updatefunctionrunresponse)


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