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

# client.functions

<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/client.ts](https://github.com/nottelabs/notte/blob/main/node-sdk/src/client.ts)

Client-bound function API operations. `list()` retains its array return value.

These operations use the configured client's authentication and transport. Signatures below preserve positional arguments, optional parameters, and return types. See the [OpenAPI schema](https://api.notte.cc/openapi.json) for HTTP request and response fields.

## list

```typescript theme={null}
client.functions.list(options?: FunctionListOptions): Promise<FunctionListItemResponse[]>;
```

## create

functionCreate: /functions. Returns the API response body.

```typescript theme={null}
client.functions.create(body: FunctionCreateData["body"], query?: FunctionCreateData["query"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionCreateData["headers"]>, "x-notte-api-key">; }): Promise<FunctionResponse>;
```

## delete

functionDelete: /functions/\{function\_id}. Returns the API response body.

```typescript theme={null}
client.functions.delete(functionId: FunctionDeleteData["path"]["function_id"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionDeleteData["headers"]>, "x-notte-api-key">; }): Promise<DeleteFunctionResponse>;
```

## deleteSchedule

functionScheduleDelete: /functions/\{function\_id}/schedule. Returns the API response body.

```typescript theme={null}
client.functions.deleteSchedule(functionId: FunctionScheduleDeleteData["path"]["function_id"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionScheduleDeleteData["headers"]>, "x-notte-api-key">; }): Promise<ScheduleDeleteResponse>;
```

## downloadRunPayload

downloadRunPayload: /functions/\{function\_id}/runs/\{run\_id}/payloads/\{field}. Returns the API response body.

```typescript theme={null}
client.functions.downloadRunPayload(functionId: DownloadRunPayloadData["path"]["function_id"], runId: DownloadRunPayloadData["path"]["run_id"], field: DownloadRunPayloadData["path"]["field"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<DownloadRunPayloadData["headers"]>, "x-notte-api-key">; }): Promise<unknown>;
```

## downloadUrl

functionDownloadUrl: /functions/\{function\_id}. Returns the API response body.

```typescript theme={null}
client.functions.downloadUrl(functionId: FunctionDownloadUrlData["path"]["function_id"], query?: FunctionDownloadUrlData["query"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionDownloadUrlData["headers"]>, "x-notte-api-key">; }): Promise<FunctionWithLinkResponse>;
```

## fork

functionFork: /functions/\{function\_id}/fork. Returns the API response body.

```typescript theme={null}
client.functions.fork(functionId: FunctionForkData["path"]["function_id"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionForkData["headers"]>, "x-notte-api-key">; }): Promise<FunctionResponse>;
```

## listRuns

listFunctionRunsByFunctionId: /functions/\{function\_id}/runs. Returns the API response body.

```typescript theme={null}
client.functions.listRuns(functionId: ListFunctionRunsByFunctionIdData["path"]["function_id"], query?: ListFunctionRunsByFunctionIdData["query"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<ListFunctionRunsByFunctionIdData["headers"]>, "x-notte-api-key">; }): Promise<PaginatedResponseFunctionRunListItemResponse>;
```

## metadataUpdate

functionMetadataUpdate: /functions/\{function\_id}. Returns the API response body.

```typescript theme={null}
client.functions.metadataUpdate(functionId: FunctionMetadataUpdateData["path"]["function_id"], body: FunctionMetadataUpdateData["body"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionMetadataUpdateData["headers"]>, "x-notte-api-key">; }): Promise<FunctionResponse>;
```

## prepareRunPayloadUpload

prepareRunPayloadUpload: /functions/\{function\_id}/runs/\{run\_id}/payloads/\{field}/upload. Returns the API response body.

```typescript theme={null}
client.functions.prepareRunPayloadUpload(functionId: PrepareRunPayloadUploadData["path"]["function_id"], runId: PrepareRunPayloadUploadData["path"]["run_id"], field: PrepareRunPayloadUploadData["path"]["field"], body: PrepareRunPayloadUploadData["body"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<PrepareRunPayloadUploadData["headers"]>, "x-notte-api-key">; }): Promise<RunPayloadUploadResponse>;
```

## rollback

functionRollback: /functions/\{function\_id}/rollback. Returns the API response body.

```typescript theme={null}
client.functions.rollback(functionId: FunctionRollbackData["path"]["function_id"], body: FunctionRollbackData["body"], query?: FunctionRollbackData["query"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionRollbackData["headers"]>, "x-notte-api-key">; }): Promise<FunctionResponse>;
```

## runGetMetadata

functionRunGetMetadata: /functions/\{function\_id}/runs/\{run\_id}. Returns the API response body.

```typescript theme={null}
client.functions.runGetMetadata(functionId: FunctionRunGetMetadataData["path"]["function_id"], runId: FunctionRunGetMetadataData["path"]["run_id"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionRunGetMetadataData["headers"]>, "x-notte-api-key">; }, query?: FunctionRunGetMetadataData["query"]): Promise<GetFunctionRunResponse>;
```

## runStart

functionRunStart: /functions/\{function\_id}/runs/start. Returns the API response body.

```typescript theme={null}
client.functions.runStart(functionId: FunctionRunStartData["path"]["function_id"], body: FunctionRunStartData["body"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionRunStartData["headers"]>, "x-notte-api-key">; }): Promise<unknown>;
```

## runStop

functionRunStop: /functions/\{function\_id}/runs/\{run\_id}. Returns the API response body.

```typescript theme={null}
client.functions.runStop(functionId: FunctionRunStopData["path"]["function_id"], runId: FunctionRunStopData["path"]["run_id"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionRunStopData["headers"]>, "x-notte-api-key">; }): Promise<UpdateFunctionRunResponse>;
```

## runUpdateMetadata

functionRunUpdateMetadata: /functions/\{function\_id}/runs/\{run\_id}. Returns the API response body.

```typescript theme={null}
client.functions.runUpdateMetadata(functionId: FunctionRunUpdateMetadataData["path"]["function_id"], runId: FunctionRunUpdateMetadataData["path"]["run_id"], body: FunctionRunUpdateMetadataData["body"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionRunUpdateMetadataData["headers"]>, "x-notte-api-key">; }): Promise<UpdateFunctionRunResponse>;
```

## runtimeHealth

functionRuntimeHealth: /functions/health. Returns the API response body.

```typescript theme={null}
client.functions.runtimeHealth(requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionRuntimeHealthData["headers"]>, "x-notte-api-key">; }): Promise<FunctionRuntimeHealthResponse>;
```

## setSchedule

functionScheduleSet: /functions/\{function\_id}/schedule. Returns the API response body.

```typescript theme={null}
client.functions.setSchedule(functionId: FunctionScheduleSetData["path"]["function_id"], body: FunctionScheduleSetData["body"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionScheduleSetData["headers"]>, "x-notte-api-key">; }): Promise<ScheduleResponse>;
```

## update

functionUpdate: /functions/\{function\_id}. Returns the API response body.

```typescript theme={null}
client.functions.update(functionId: FunctionUpdateData["path"]["function_id"], body: FunctionUpdateData["body"], query?: FunctionUpdateData["query"], requestOptions?: ResourceRequestOptions & { headers?: Omit<NonNullable<FunctionUpdateData["headers"]>, "x-notte-api-key">; }): Promise<FunctionResponse>;
```


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