> ## 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.
</Tip>

[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

<ParamField body="functionRunId" type={"string"} required>
  ID of a run belonging to this function.
</ParamField>

<ParamField body="fields" type={"FunctionRunUpdateRequest"} required>
  Status and fields to update. Omitted fields remain unchanged.
</ParamField>

## 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](/typescript-sdk-reference/types/functionrunupdaterequest)
* [UpdateFunctionRunResponse](/typescript-sdk-reference/types/updatefunctionrunresponse)


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