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

# Netlify API reference

> API reference for the Netlify plugin in Corsair: every `netlify.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Accounts

### audit.list

`accounts.audit.list`

List a team's audit log events, one page at a time

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.accounts.audit.list({ account_id: '5f3e9c1b7a2d4e0012ab34cd' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | — |
| `query` | `string` | No | — |
| `log_type` | `string` | No | — |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while a page came back full (per\_page entries), null once a page comes back shorter. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   account_id?: string | null,
>   payload?: {
>     actor_id?: string | null,
>     actor_name?: string | null,
>     actor_email?: string | null,
>     action?: string | null,
>     timestamp?: string | null,
>     log_type?: string | null
>   } | null
> }[]
> ```

***

### builds.status

`accounts.builds.status`

Get a team's build status: returns the team's counts of active, concurrency-pending, and enqueued builds, and its build minutes usage

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.accounts.builds.status({ account_id: '5f3e9c1b7a2d4e0012ab34cd' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `active` | `number \| null` | No | — |
| `pending_concurrency` | `number \| null` | No | — |
| `enqueued` | `number \| null` | No | — |
| `build_count` | `number \| null` | No | — |
| `minutes` | `object \| null` | No | — |

> [accordion] minutes full type
>
> ```ts theme={null}
> {
>   current?: number | null,
>   current_average_sec?: number | null,
>   previous?: number | null,
>   period_start_date?: string | null,
>   period_end_date?: string | null,
>   last_updated_at?: string | null,
>   included_minutes?: string | null,
>   included_minutes_with_packs?: string | null
> } | null
> ```

***

### cancel

`accounts.cancel`

Cancel a team: its sites and members are removed and billing stops

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.accounts.cancel({ account_id: '5f3e9c1b7a2d4e0012ab34cd' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### create

`accounts.create`

Create a team

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.accounts.create({ name: 'example-site', type_id: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `type_id` | `string` | Yes | — |
| `payment_method_id` | `string` | No | — |
| `period` | `monthly \| yearly` | No | — |
| `extra_seats_block` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `slug` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `capabilities` | `object \| null` | No | — |
| `billing_name` | `string \| null` | No | — |
| `billing_email` | `string \| null` | No | — |
| `billing_details` | `string \| null` | No | — |
| `billing_period` | `string \| null` | No | — |
| `payment_method_id` | `string \| null` | No | — |
| `type_name` | `string \| null` | No | — |
| `type_id` | `string \| null` | No | — |
| `owner_ids` | `string[] \| null` | No | — |
| `roles_allowed` | `string[] \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

> [accordion] capabilities full type
>
> ```ts theme={null}
> {
>   sites?: {
>     included?: number | null,
>     used?: number | null
>   } | null,
>   collaborators?: {
>     included?: number | null,
>     used?: number | null
>   } | null
> } | null
> ```

***

### get

`accounts.get`

Get a team

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.accounts.get({ account_id: '5f3e9c1b7a2d4e0012ab34cd' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `slug` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `capabilities` | `object \| null` | No | — |
| `billing_name` | `string \| null` | No | — |
| `billing_email` | `string \| null` | No | — |
| `billing_details` | `string \| null` | No | — |
| `billing_period` | `string \| null` | No | — |
| `payment_method_id` | `string \| null` | No | — |
| `type_name` | `string \| null` | No | — |
| `type_id` | `string \| null` | No | — |
| `owner_ids` | `string[] \| null` | No | — |
| `roles_allowed` | `string[] \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

> [accordion] capabilities full type
>
> ```ts theme={null}
> {
>   sites?: {
>     included?: number | null,
>     used?: number | null
>   } | null,
>   collaborators?: {
>     included?: number | null,
>     used?: number | null
>   } | null
> } | null
> ```

***

### list

`accounts.list`

List the current user's teams

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.accounts.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `minimal` | `boolean` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   type?: string | null,
>   capabilities?: {
>     sites?: {
>       included?: number | null,
>       used?: number | null
>     } | null,
>     collaborators?: {
>       included?: number | null,
>       used?: number | null
>     } | null
>   } | null,
>   billing_name?: string | null,
>   billing_email?: string | null,
>   billing_details?: string | null,
>   billing_period?: string | null,
>   payment_method_id?: string | null,
>   type_name?: string | null,
>   type_id?: string | null,
>   owner_ids?: string[] | null,
>   roles_allowed?: string[] | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[]
> ```

***

### listTypes

`accounts.listTypes`

List plans available for new teams

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.accounts.listTypes({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   description?: string | null,
>   capabilities?: {
>   } | null,
>   monthly_dollar_price?: number | string | null,
>   yearly_dollar_price?: number | string | null,
>   monthly_seats_addon_dollar_price?: number | string | null,
>   yearly_seats_addon_dollar_price?: number | string | null
> }[]
> ```

***

### members.add

`accounts.members.add`

Invite someone to the team by email with a role; Netlify sends them an invitation email

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.accounts.members.add({ account_slug: 'acme', email: 'grace@example.com', role: 'Developer' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_slug` | `string` | Yes | — |
| `role` | `Owner \| Developer \| Billing Admin \| Reviewer` | No | — |
| `email` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar?: string | null,
>   role?: string | null
> }[]
> ```

***

### members.get

`accounts.members.get`

Get a team member

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.accounts.members.get({ account_slug: 'acme', member_id: '5f3e9e117a2d4e0012ab34cf' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_slug` | `string` | Yes | — |
| `member_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `full_name` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `avatar` | `string \| null` | No | — |
| `role` | `string \| null` | No | — |

***

### members.list

`accounts.members.list`

List a team's members

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.accounts.members.list({ account_slug: 'acme' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_slug` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar?: string | null,
>   role?: string | null
> }[]
> ```

***

### members.remove

`accounts.members.remove`

Remove a team member

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.accounts.members.remove({ account_slug: 'acme', member_id: '5f3e9e117a2d4e0012ab34cf' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_slug` | `string` | Yes | — |
| `member_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### members.update

`accounts.members.update`

Update a team member

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.accounts.members.update({ account_slug: 'acme', member_id: '5f3e9e117a2d4e0012ab34cf' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_slug` | `string` | Yes | — |
| `member_id` | `string` | Yes | — |
| `role` | `Owner \| Developer \| Billing Admin \| Reviewer` | No | — |
| `site_access` | `all \| none \| selected` | No | — |
| `site_ids` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `full_name` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `avatar` | `string \| null` | No | — |
| `role` | `string \| null` | No | — |

***

### sites.create

`accounts.sites.create`

Create a site in a team

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.accounts.sites.create({ account_slug: 'acme', name: 'acme-docs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `configure_dns` | `boolean` | No | — |
| `account_slug` | `string` | Yes | — |
| `id` | `string` | No | — |
| `state` | `string` | No | — |
| `plan` | `string` | No | — |
| `name` | `string` | No | — |
| `custom_domain` | `string` | No | — |
| `domain_aliases` | `string[]` | No | — |
| `branch_deploy_custom_domain` | `string` | No | — |
| `deploy_preview_custom_domain` | `string` | No | — |
| `password` | `string` | No | — |
| `notification_email` | `string` | No | — |
| `url` | `string` | No | — |
| `ssl_url` | `string` | No | — |
| `admin_url` | `string` | No | — |
| `screenshot_url` | `string` | No | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `user_id` | `string` | No | — |
| `session_id` | `string` | No | — |
| `ssl` | `boolean` | No | — |
| `force_ssl` | `boolean` | No | — |
| `managed_dns` | `boolean` | No | — |
| `deploy_url` | `string` | No | — |
| `published_deploy` | `object` | No | — |
| `account_id` | `string` | No | — |
| `account_name` | `string` | No | — |
| `git_provider` | `string` | No | — |
| `deploy_hook` | `string` | No | — |
| `capabilities` | `object` | No | — |
| `processing_settings` | `object` | No | — |
| `build_settings` | `object` | No | — |
| `id_domain` | `string` | No | — |
| `default_hooks_data` | `object` | No | — |
| `build_image` | `string` | No | — |
| `prerender` | `string` | No | — |
| `functions_region` | `string` | No | — |
| `prevent_non_git_prod_deploys` | `boolean` | No | — |
| `repo` | `object` | No | — |

> [accordion] published\_deploy full type
>
> ```ts theme={null}
> {
>   id?: string,
>   site_id?: string,
>   user_id?: string,
>   build_id?: string,
>   state?: string,
>   name?: string,
>   url?: string,
>   ssl_url?: string,
>   admin_url?: string,
>   deploy_url?: string,
>   deploy_ssl_url?: string,
>   screenshot_url?: string,
>   review_id?: number,
>   draft?: boolean,
>   required?: string[],
>   required_functions?: string[],
>   required_edge_functions?: string[],
>   required_server?: string[],
>   error_message?: string,
>   branch?: string,
>   commit_ref?: string,
>   commit_url?: string,
>   skipped?: boolean,
>   created_at?: string,
>   updated_at?: string,
>   published_at?: string,
>   title?: string,
>   context?: string,
>   locked?: boolean,
>   review_url?: string,
>   framework?: string,
>   skew_protection_token?: string,
>   function_schedules?: {
>     name?: string,
>     cron?: string
>   }[],
>   functions_region?: string,
>   functions_region_overrides?: {
>     name?: string,
>     region?: string
>   }[]
> }
> ```

> [accordion] capabilities full type
>
> ```ts theme={null}
> Record<string, {
> }>
> ```

> [accordion] processing\_settings full type
>
> ```ts theme={null}
> {
>   html?: {
>     pretty_urls?: boolean
>   }
> }
> ```

> [accordion] build\_settings full type
>
> ```ts theme={null}
> {
>   id?: number,
>   provider?: string,
>   deploy_key_id?: string,
>   repo_path?: string,
>   repo_branch?: string,
>   dir?: string,
>   functions_dir?: string,
>   cmd?: string,
>   allowed_branches?: string[],
>   public_repo?: boolean,
>   private_logs?: boolean,
>   repo_url?: string,
>   env?: Record<string, string>,
>   installation_id?: number,
>   stop_builds?: boolean
> }
> ```

> [accordion] default\_hooks\_data full type
>
> ```ts theme={null}
> {
>   access_token?: string
> }
> ```

> [accordion] repo full type
>
> ```ts theme={null}
> {
>   id?: number,
>   provider?: string,
>   deploy_key_id?: string,
>   repo_path?: string,
>   repo_branch?: string,
>   dir?: string,
>   functions_dir?: string,
>   cmd?: string,
>   allowed_branches?: string[],
>   public_repo?: boolean,
>   private_logs?: boolean,
>   repo_url?: string,
>   env?: Record<string, string>,
>   installation_id?: number,
>   stop_builds?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `plan` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `custom_domain` | `string \| null` | No | — |
| `domain_aliases` | `string[] \| null` | No | — |
| `branch_deploy_custom_domain` | `string \| null` | No | — |
| `deploy_preview_custom_domain` | `string \| null` | No | — |
| `password` | `string \| null` | No | — |
| `notification_email` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `ssl_url` | `string \| null` | No | — |
| `admin_url` | `string \| null` | No | — |
| `screenshot_url` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `session_id` | `string \| null` | No | — |
| `ssl` | `boolean \| null` | No | — |
| `force_ssl` | `boolean \| null` | No | — |
| `managed_dns` | `boolean \| null` | No | — |
| `deploy_url` | `string \| null` | No | — |
| `published_deploy` | `object \| null` | No | — |
| `account_id` | `string \| null` | No | — |
| `account_name` | `string \| null` | No | — |
| `account_slug` | `string \| null` | No | — |
| `git_provider` | `string \| null` | No | — |
| `deploy_hook` | `string \| null` | No | — |
| `capabilities` | `object \| null` | No | Feature flags and limits of the site's plan (strings, booleans, numbers or objects). |
| `processing_settings` | `object \| null` | No | — |
| `build_settings` | `object \| null` | No | — |
| `id_domain` | `string \| null` | No | — |
| `default_hooks_data` | `object \| null` | No | — |
| `build_image` | `string \| null` | No | — |
| `prerender` | `string \| null` | No | — |
| `functions_region` | `string \| null` | No | — |
| `prevent_non_git_prod_deploys` | `boolean \| null` | No | — |
| `identity_instance_id` | `string \| null` | No | The site's Netlify Identity instance, when Identity is on (pass it to sites.identity.users.\*). |

> [accordion] published\_deploy full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   user_id?: string | null,
>   build_id?: string | null,
>   state?: string | null,
>   name?: string | null,
>   url?: string | null,
>   ssl_url?: string | null,
>   admin_url?: string | null,
>   deploy_url?: string | null,
>   deploy_ssl_url?: string | null,
>   screenshot_url?: string | null,
>   review_id?: number | null,
>   draft?: boolean | null,
>   required?: string[] | null,
>   required_functions?: string[] | null,
>   required_edge_functions?: string[] | null,
>   required_server?: string[] | null,
>   error_message?: string | null,
>   branch?: string | null,
>   commit_ref?: string | null,
>   commit_url?: string | null,
>   skipped?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   title?: string | null,
>   context?: string | null,
>   locked?: boolean | null,
>   review_url?: string | null,
>   framework?: string | null,
>   skew_protection_token?: string | null,
>   function_schedules?: {
>     name?: string | null,
>     cron?: string | null
>   }[] | null,
>   functions_region?: string | null,
>   functions_region_overrides?: {
>     name?: string | null,
>     region?: string | null
>   }[] | null
> } | null
> ```

> [accordion] capabilities full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] processing\_settings full type
>
> ```ts theme={null}
> {
>   html?: {
>     pretty_urls?: boolean | null
>   } | null
> } | null
> ```

> [accordion] build\_settings full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   provider?: string | null,
>   deploy_key_id?: string | null,
>   repo_path?: string | null,
>   repo_branch?: string | null,
>   dir?: string | null,
>   functions_dir?: string | null,
>   cmd?: string | null,
>   allowed_branches?: string[] | null,
>   public_repo?: boolean | null,
>   private_logs?: boolean | null,
>   repo_url?: string | null,
>   env?: Record<string, string> | null,
>   installation_id?: number | null,
>   stop_builds?: boolean | null
> } | null
> ```

> [accordion] default\_hooks\_data full type
>
> ```ts theme={null}
> {
>   access_token?: string | null
> } | null
> ```

***

### sites.list

`accounts.sites.list`

List a team's sites, one page at a time

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.accounts.sites.list({ account_slug: 'acme' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | — |
| `account_slug` | `string` | Yes | — |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while a page came back full (per\_page entries), null once a page comes back shorter. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   state?: string | null,
>   plan?: string | null,
>   name?: string | null,
>   custom_domain?: string | null,
>   domain_aliases?: string[] | null,
>   branch_deploy_custom_domain?: string | null,
>   deploy_preview_custom_domain?: string | null,
>   password?: string | null,
>   notification_email?: string | null,
>   url?: string | null,
>   ssl_url?: string | null,
>   admin_url?: string | null,
>   screenshot_url?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   user_id?: string | null,
>   session_id?: string | null,
>   ssl?: boolean | null,
>   force_ssl?: boolean | null,
>   managed_dns?: boolean | null,
>   deploy_url?: string | null,
>   published_deploy?: {
>     id?: string | null,
>     site_id?: string | null,
>     user_id?: string | null,
>     build_id?: string | null,
>     state?: string | null,
>     name?: string | null,
>     url?: string | null,
>     ssl_url?: string | null,
>     admin_url?: string | null,
>     deploy_url?: string | null,
>     deploy_ssl_url?: string | null,
>     screenshot_url?: string | null,
>     review_id?: number | null,
>     draft?: boolean | null,
>     required?: string[] | null,
>     required_functions?: string[] | null,
>     required_edge_functions?: string[] | null,
>     required_server?: string[] | null,
>     error_message?: string | null,
>     branch?: string | null,
>     commit_ref?: string | null,
>     commit_url?: string | null,
>     skipped?: boolean | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     published_at?: string | null,
>     title?: string | null,
>     context?: string | null,
>     locked?: boolean | null,
>     review_url?: string | null,
>     framework?: string | null,
>     skew_protection_token?: string | null,
>     function_schedules?: {
>       name?: string | null,
>       cron?: string | null
>     }[] | null,
>     functions_region?: string | null,
>     functions_region_overrides?: {
>       name?: string | null,
>       region?: string | null
>     }[] | null
>   } | null,
>   account_id?: string | null,
>   account_name?: string | null,
>   account_slug?: string | null,
>   git_provider?: string | null,
>   deploy_hook?: string | null,
>   capabilities?: {
>   } | null,
>   processing_settings?: {
>     html?: {
>       pretty_urls?: boolean | null
>     } | null
>   } | null,
>   build_settings?: {
>     id?: number | null,
>     provider?: string | null,
>     deploy_key_id?: string | null,
>     repo_path?: string | null,
>     repo_branch?: string | null,
>     dir?: string | null,
>     functions_dir?: string | null,
>     cmd?: string | null,
>     allowed_branches?: string[] | null,
>     public_repo?: boolean | null,
>     private_logs?: boolean | null,
>     repo_url?: string | null,
>     env?: Record<string, string> | null,
>     installation_id?: number | null,
>     stop_builds?: boolean | null
>   } | null,
>   id_domain?: string | null,
>   default_hooks_data?: {
>     access_token?: string | null
>   } | null,
>   build_image?: string | null,
>   prerender?: string | null,
>   functions_region?: string | null,
>   prevent_non_git_prod_deploys?: boolean | null,
>   identity_instance_id?: string | null
> }[]
> ```

***

### update

`accounts.update`

Update a team

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.accounts.update({ account_id: '5f3e9c1b7a2d4e0012ab34cd' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `slug` | `string` | No | — |
| `type_id` | `string` | No | — |
| `extra_seats_block` | `number` | No | — |
| `billing_name` | `string` | No | — |
| `billing_email` | `string` | No | — |
| `billing_details` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `slug` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `capabilities` | `object \| null` | No | — |
| `billing_name` | `string \| null` | No | — |
| `billing_email` | `string \| null` | No | — |
| `billing_details` | `string \| null` | No | — |
| `billing_period` | `string \| null` | No | — |
| `payment_method_id` | `string \| null` | No | — |
| `type_name` | `string \| null` | No | — |
| `type_id` | `string \| null` | No | — |
| `owner_ids` | `string[] \| null` | No | — |
| `roles_allowed` | `string[] \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

> [accordion] capabilities full type
>
> ```ts theme={null}
> {
>   sites?: {
>     included?: number | null,
>     used?: number | null
>   } | null,
>   collaborators?: {
>     included?: number | null,
>     used?: number | null
>   } | null
> } | null
> ```

***

## Agent Runners

### archive

`agentRunners.archive`

Archive an agent run

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.agentRunners.archive({ agent_runner_id: '6566a360c0b7f6005d3a1f38' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### commitToBranch

`agentRunners.commitToBranch`

Commit an agent run's changes to a branch: queues a commit of the run's diff to `target_branch`

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.agentRunners.commitToBranch({ agent_runner_id: '6566a360c0b7f6005d3a1f38', target_branch: 'main' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |
| `target_branch` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `parent_agent_runner_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | One of `new`, `running`, `await_input`, `interrupted`, `error`, `done`, `cancelled` or `archived`. |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `done_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `result_branch` | `string \| null` | No | — |
| `pr_url` | `string \| null` | No | — |
| `pr_branch` | `string \| null` | No | — |
| `pr_state` | `string \| null` | No | One of `open`, `draft`, `merged` or `closed`. |
| `pr_number` | `number \| null` | No | — |
| `pr_is_being_created` | `boolean \| null` | No | — |
| `pr_error` | `string \| null` | No | — |
| `current_task` | `string \| null` | No | What the agent is working on in the active session. |
| `result_diff` | `string \| null` | No | — |
| `sha` | `string \| null` | No | — |
| `merge_commit_sha` | `string \| null` | No | — |
| `merge_commit_error` | `string \| null` | No | — |
| `merge_commit_is_being_created` | `boolean \| null` | No | — |
| `base_deploy_id` | `string \| null` | No | — |
| `attached_file_keys` | `string[] \| null` | No | — |
| `active_session_created_at` | `string \| null` | No | — |
| `has_result_diff` | `boolean \| null` | No | Whether the run has changes, available from `GET /agent_runners/{agent_runner_id}/diff`. |
| `latest_session_deploy_id` | `string \| null` | No | — |
| `latest_session_deploy_url` | `string \| null` | No | — |
| `preview_state` | `string \| null` | No | State of the deploy building the latest preview. Null until that deploy exists; `ready` once the preview is live. |
| `user` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar_url?: string | null
> } | null
> ```

***

### create

`agentRunners.create`

Start an agent run

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.agentRunners.create({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `deploy_id` | `string` | No | — |
| `branch` | `string` | No | — |
| `prompt` | `string` | No | — |
| `agent` | `string` | No | — |
| `model` | `string` | No | — |
| `parent_agent_runner_id` | `string` | No | — |
| `dev_server_image` | `string` | No | — |
| `file_keys` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `parent_agent_runner_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | One of `new`, `running`, `await_input`, `interrupted`, `error`, `done`, `cancelled` or `archived`. |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `done_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `result_branch` | `string \| null` | No | — |
| `pr_url` | `string \| null` | No | — |
| `pr_branch` | `string \| null` | No | — |
| `pr_state` | `string \| null` | No | One of `open`, `draft`, `merged` or `closed`. |
| `pr_number` | `number \| null` | No | — |
| `pr_is_being_created` | `boolean \| null` | No | — |
| `pr_error` | `string \| null` | No | — |
| `current_task` | `string \| null` | No | What the agent is working on in the active session. |
| `result_diff` | `string \| null` | No | — |
| `sha` | `string \| null` | No | — |
| `merge_commit_sha` | `string \| null` | No | — |
| `merge_commit_error` | `string \| null` | No | — |
| `merge_commit_is_being_created` | `boolean \| null` | No | — |
| `base_deploy_id` | `string \| null` | No | — |
| `attached_file_keys` | `string[] \| null` | No | — |
| `active_session_created_at` | `string \| null` | No | — |
| `has_result_diff` | `boolean \| null` | No | Whether the run has changes, available from `GET /agent_runners/{agent_runner_id}/diff`. |
| `latest_session_deploy_id` | `string \| null` | No | — |
| `latest_session_deploy_url` | `string \| null` | No | — |
| `preview_state` | `string \| null` | No | State of the deploy building the latest preview. Null until that deploy exists; `ready` once the preview is live. |
| `user` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar_url?: string | null
> } | null
> ```

***

### createPullRequest

`agentRunners.createPullRequest`

Open a pull request from an agent run: queues a pull request for the run's diff (`result_diff`)

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.agentRunners.createPullRequest({ agent_runner_id: '6566a360c0b7f6005d3a1f38' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `parent_agent_runner_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | One of `new`, `running`, `await_input`, `interrupted`, `error`, `done`, `cancelled` or `archived`. |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `done_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `result_branch` | `string \| null` | No | — |
| `pr_url` | `string \| null` | No | — |
| `pr_branch` | `string \| null` | No | — |
| `pr_state` | `string \| null` | No | One of `open`, `draft`, `merged` or `closed`. |
| `pr_number` | `number \| null` | No | — |
| `pr_is_being_created` | `boolean \| null` | No | — |
| `pr_error` | `string \| null` | No | — |
| `current_task` | `string \| null` | No | What the agent is working on in the active session. |
| `result_diff` | `string \| null` | No | — |
| `sha` | `string \| null` | No | — |
| `merge_commit_sha` | `string \| null` | No | — |
| `merge_commit_error` | `string \| null` | No | — |
| `merge_commit_is_being_created` | `boolean \| null` | No | — |
| `base_deploy_id` | `string \| null` | No | — |
| `attached_file_keys` | `string[] \| null` | No | — |
| `active_session_created_at` | `string \| null` | No | — |
| `has_result_diff` | `boolean \| null` | No | Whether the run has changes, available from `GET /agent_runners/{agent_runner_id}/diff`. |
| `latest_session_deploy_id` | `string \| null` | No | — |
| `latest_session_deploy_url` | `string \| null` | No | — |
| `preview_state` | `string \| null` | No | State of the deploy building the latest preview. Null until that deploy exists; `ready` once the preview is live. |
| `user` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar_url?: string | null
> } | null
> ```

***

### createUploadUrl

`agentRunners.createUploadUrl`

Create an upload URL for agent run files: returns a presigned URL for uploading a file that agent run sessions can use, and the file's storage key

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.agentRunners.createUploadUrl({ account_id: '5f3e9c1b7a2d4e0012ab34cd', filename: 'brief.md', content_type: 'text/markdown' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | — |
| `filename` | `string` | Yes | — |
| `content_type` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `upload_url` | `string \| null` | No | Presigned URL to upload the file to with a PUT request. Expires after one hour. |
| `file_key` | `string \| null` | No | Storage key of the uploaded file. |

***

### delete

`agentRunners.delete`

Stop an agent run (alias): same as `POST /agent_runners/{agent_runner_id}/stop`

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.agentRunners.delete({ agent_runner_id: '6566a360c0b7f6005d3a1f38' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### get

`agentRunners.get`

Get an agent run

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.agentRunners.get({ agent_runner_id: '6566a360c0b7f6005d3a1f38' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `parent_agent_runner_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | One of `new`, `running`, `await_input`, `interrupted`, `error`, `done`, `cancelled` or `archived`. |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `done_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `result_branch` | `string \| null` | No | — |
| `pr_url` | `string \| null` | No | — |
| `pr_branch` | `string \| null` | No | — |
| `pr_state` | `string \| null` | No | One of `open`, `draft`, `merged` or `closed`. |
| `pr_number` | `number \| null` | No | — |
| `pr_is_being_created` | `boolean \| null` | No | — |
| `pr_error` | `string \| null` | No | — |
| `current_task` | `string \| null` | No | What the agent is working on in the active session. |
| `result_diff` | `string \| null` | No | — |
| `sha` | `string \| null` | No | — |
| `merge_commit_sha` | `string \| null` | No | — |
| `merge_commit_error` | `string \| null` | No | — |
| `merge_commit_is_being_created` | `boolean \| null` | No | — |
| `base_deploy_id` | `string \| null` | No | — |
| `attached_file_keys` | `string[] \| null` | No | — |
| `active_session_created_at` | `string \| null` | No | — |
| `has_result_diff` | `boolean \| null` | No | Whether the run has changes, available from `GET /agent_runners/{agent_runner_id}/diff`. |
| `latest_session_deploy_id` | `string \| null` | No | — |
| `latest_session_deploy_url` | `string \| null` | No | — |
| `preview_state` | `string \| null` | No | State of the deploy building the latest preview. Null until that deploy exists; `ready` once the preview is live. |
| `user` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar_url?: string | null
> } | null
> ```

***

### getDiff

`agentRunners.getDiff`

Get an agent run's diff: returns the run's changes as a unified diff (returned as text)

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.agentRunners.getDiff({ agent_runner_id: '6566a360c0b7f6005d3a1f38' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |
| `strip_binary` | `boolean` | No | Replace binary file contents with a placeholder, keeping the file headers. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `text` | `string` | Yes | The body Netlify answered with (plain text, such as a diff). |

***

### list

`agentRunners.list`

List a site's agent runs: lists a site's agent runs, most recently active first, one page at a time

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.agentRunners.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', account_id: '5f3e9c1b7a2d4e0012ab34cd' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `account_id` | `string` | Yes | — |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |
| `state` | `string` | No | Only runs in this state: `new`, `running`, `await_input`, `interrupted`, `error`, `done`, `cancelled` or `archived`. |
| `title` | `string` | No | — |
| `branch` | `string` | No | — |
| `result_branch` | `string` | No | — |
| `user_id` | `string` | No | Only runs started by this user. |
| `from` | `number` | No | Unix timestamp. Only runs created at or after this time. |
| `to` | `number` | No | Unix timestamp. Only runs created before this time. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while a page came back full (per\_page entries), null once a page comes back shorter. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   parent_agent_runner_id?: string | null,
>   state?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   done_at?: string | null,
>   title?: string | null,
>   branch?: string | null,
>   result_branch?: string | null,
>   pr_url?: string | null,
>   pr_branch?: string | null,
>   pr_state?: string | null,
>   pr_number?: number | null,
>   pr_is_being_created?: boolean | null,
>   pr_error?: string | null,
>   current_task?: string | null,
>   result_diff?: string | null,
>   sha?: string | null,
>   merge_commit_sha?: string | null,
>   merge_commit_error?: string | null,
>   merge_commit_is_being_created?: boolean | null,
>   base_deploy_id?: string | null,
>   attached_file_keys?: string[] | null,
>   active_session_created_at?: string | null,
>   has_result_diff?: boolean | null,
>   latest_session_deploy_id?: string | null,
>   latest_session_deploy_url?: string | null,
>   preview_state?: string | null,
>   user?: {
>     id?: string | null,
>     full_name?: string | null,
>     email?: string | null,
>     avatar_url?: string | null
>   } | null
> }[]
> ```

***

### sessions.answer

`agentRunners.sessions.answer`

Answer an agent run session's pending interaction: answers or skips a pending interaction and resumes the session

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.agentRunners.sessions.answer({ agent_runner_id: '6566a360c0b7f6005d3a1f38', agent_runner_session_id: '6566a365c0b7f6005d3a1f39', refId: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |
| `agent_runner_session_id` | `string` | Yes | — |
| `refId` | `string` | Yes | Key of the pending interaction in the session's `interactions`. |
| `response` | `any[]` | No | One entry per question in the interaction's `payload`: a string, an array of strings for a multi-select question, or null to skip that question. |
| `skipped` | `boolean` | No | Skip the whole interaction instead of answering it. |
| `instruction` | `string` | No | Instruction for the agent when skipping. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `agent_runner_id` | `string \| null` | No | — |
| `dev_server_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | One of `new`, `running`, `await_input`, `interrupted`, `error`, `done` or `cancelled`. |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `done_at` | `string \| null` | No | — |
| `paused_at` | `string \| null` | No | When the session paused waiting on an interaction. Null once it resumes. |
| `title` | `string \| null` | No | — |
| `prompt` | `string \| null` | No | — |
| `agent_config` | `object \| null` | No | — |
| `result` | `string \| null` | No | The agent's summary of what it did. |
| `result_diff` | `string \| null` | No | — |
| `commit_sha` | `string \| null` | No | — |
| `deploy_id` | `string \| null` | No | — |
| `deploy_url` | `string \| null` | No | URL of the session's deploy preview. |
| `duration` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `interactions` | `object \| null` | No | Questions and requests from the agent, keyed by reference ID. A pending one pauses the session in `await_input` until it's answered or skipped. |
| `steps` | `object[] \| null` | No | — |
| `user` | `object \| null` | No | — |
| `attached_file_keys` | `string[] \| null` | No | — |
| `result_zip_file_name` | `string \| null` | No | — |
| `is_published` | `boolean \| null` | No | — |

> [accordion] agent\_config full type
>
> ```ts theme={null}
> {
>   agent?: string | null,
>   model?: string | null
> } | null
> ```

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   total_input_tokens?: number | null,
>   total_output_tokens?: number | null,
>   total_cached_input_tokens?: number | null,
>   total_cached_output_tokens?: number | null,
>   total_tokens?: number | null,
>   total_credits_cost?: number | null
> } | null
> ```

> [accordion] interactions full type
>
> ```ts theme={null}
> Record<string, {
>   type?: string | null,
>   status?: string | null,
>   payload?: any | null,
>   response?: any[] | null
> }> | null
> ```

> [accordion] steps full type
>
> ```ts theme={null}
> {
>   title?: string | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar_url?: string | null
> } | null
> ```

***

### sessions.create

`agentRunners.sessions.create`

Start a follow-up agent run session: starts a follow-up session on the run

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.agentRunners.sessions.create({ agent_runner_id: '6566a360c0b7f6005d3a1f38' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |
| `prompt` | `string` | No | Use the request body instead. |
| `agent` | `string` | No | Use the request body instead. |
| `model` | `string` | No | Use the request body instead. |
| `file_keys` | `string[]` | No | Use the request body instead. |
| `mode` | `normal \| ask` | No | `normal` (the default) changes code; `ask` answers questions without changing code. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `agent_runner_id` | `string \| null` | No | — |
| `dev_server_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | One of `new`, `running`, `await_input`, `interrupted`, `error`, `done` or `cancelled`. |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `done_at` | `string \| null` | No | — |
| `paused_at` | `string \| null` | No | When the session paused waiting on an interaction. Null once it resumes. |
| `title` | `string \| null` | No | — |
| `prompt` | `string \| null` | No | — |
| `agent_config` | `object \| null` | No | — |
| `result` | `string \| null` | No | The agent's summary of what it did. |
| `result_diff` | `string \| null` | No | — |
| `commit_sha` | `string \| null` | No | — |
| `deploy_id` | `string \| null` | No | — |
| `deploy_url` | `string \| null` | No | URL of the session's deploy preview. |
| `duration` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `interactions` | `object \| null` | No | Questions and requests from the agent, keyed by reference ID. A pending one pauses the session in `await_input` until it's answered or skipped. |
| `steps` | `object[] \| null` | No | — |
| `user` | `object \| null` | No | — |
| `attached_file_keys` | `string[] \| null` | No | — |
| `result_zip_file_name` | `string \| null` | No | — |
| `is_published` | `boolean \| null` | No | — |

> [accordion] agent\_config full type
>
> ```ts theme={null}
> {
>   agent?: string | null,
>   model?: string | null
> } | null
> ```

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   total_input_tokens?: number | null,
>   total_output_tokens?: number | null,
>   total_cached_input_tokens?: number | null,
>   total_cached_output_tokens?: number | null,
>   total_tokens?: number | null,
>   total_credits_cost?: number | null
> } | null
> ```

> [accordion] interactions full type
>
> ```ts theme={null}
> Record<string, {
>   type?: string | null,
>   status?: string | null,
>   payload?: any | null,
>   response?: any[] | null
> }> | null
> ```

> [accordion] steps full type
>
> ```ts theme={null}
> {
>   title?: string | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar_url?: string | null
> } | null
> ```

***

### sessions.delete

`agentRunners.sessions.delete`

Stop an agent run session (alias): same as `POST /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}/stop`

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.agentRunners.sessions.delete({ agent_runner_id: '6566a360c0b7f6005d3a1f38', agent_runner_session_id: '6566a365c0b7f6005d3a1f39' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |
| `agent_runner_session_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### sessions.get

`agentRunners.sessions.get`

Get an agent run session

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.agentRunners.sessions.get({ agent_runner_id: '6566a360c0b7f6005d3a1f38', agent_runner_session_id: '6566a365c0b7f6005d3a1f39' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |
| `agent_runner_session_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `agent_runner_id` | `string \| null` | No | — |
| `dev_server_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | One of `new`, `running`, `await_input`, `interrupted`, `error`, `done` or `cancelled`. |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `done_at` | `string \| null` | No | — |
| `paused_at` | `string \| null` | No | When the session paused waiting on an interaction. Null once it resumes. |
| `title` | `string \| null` | No | — |
| `prompt` | `string \| null` | No | — |
| `agent_config` | `object \| null` | No | — |
| `result` | `string \| null` | No | The agent's summary of what it did. |
| `result_diff` | `string \| null` | No | — |
| `commit_sha` | `string \| null` | No | — |
| `deploy_id` | `string \| null` | No | — |
| `deploy_url` | `string \| null` | No | URL of the session's deploy preview. |
| `duration` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `interactions` | `object \| null` | No | Questions and requests from the agent, keyed by reference ID. A pending one pauses the session in `await_input` until it's answered or skipped. |
| `steps` | `object[] \| null` | No | — |
| `user` | `object \| null` | No | — |
| `attached_file_keys` | `string[] \| null` | No | — |
| `result_zip_file_name` | `string \| null` | No | — |
| `is_published` | `boolean \| null` | No | — |

> [accordion] agent\_config full type
>
> ```ts theme={null}
> {
>   agent?: string | null,
>   model?: string | null
> } | null
> ```

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   total_input_tokens?: number | null,
>   total_output_tokens?: number | null,
>   total_cached_input_tokens?: number | null,
>   total_cached_output_tokens?: number | null,
>   total_tokens?: number | null,
>   total_credits_cost?: number | null
> } | null
> ```

> [accordion] interactions full type
>
> ```ts theme={null}
> Record<string, {
>   type?: string | null,
>   status?: string | null,
>   payload?: any | null,
>   response?: any[] | null
> }> | null
> ```

> [accordion] steps full type
>
> ```ts theme={null}
> {
>   title?: string | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar_url?: string | null
> } | null
> ```

***

### sessions.list

`agentRunners.sessions.list`

List an agent run's sessions, one page at a time

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.agentRunners.sessions.list({ agent_runner_id: '6566a360c0b7f6005d3a1f38' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |
| `state` | `string` | No | Only sessions in this state: `new`, `running`, `await_input`, `interrupted`, `error`, `done` or `cancelled`. |
| `from` | `number` | No | Unix timestamp. Only sessions created at or after this time. |
| `to` | `number` | No | Unix timestamp. Only sessions created before this time. |
| `order_by` | `asc \| desc` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while a page came back full (per\_page entries), null once a page comes back shorter. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   agent_runner_id?: string | null,
>   dev_server_id?: string | null,
>   state?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   done_at?: string | null,
>   paused_at?: string | null,
>   title?: string | null,
>   prompt?: string | null,
>   agent_config?: {
>     agent?: string | null,
>     model?: string | null
>   } | null,
>   result?: string | null,
>   result_diff?: string | null,
>   commit_sha?: string | null,
>   deploy_id?: string | null,
>   deploy_url?: string | null,
>   duration?: number | null,
>   usage?: {
>     total_input_tokens?: number | null,
>     total_output_tokens?: number | null,
>     total_cached_input_tokens?: number | null,
>     total_cached_output_tokens?: number | null,
>     total_tokens?: number | null,
>     total_credits_cost?: number | null
>   } | null,
>   interactions?: Record<string, {
>     type?: string | null,
>     status?: string | null,
>     payload?: any | null,
>     response?: any[] | null
>   }> | null,
>   steps?: {
>     title?: string | null,
>     message?: string | null
>   }[] | null,
>   user?: {
>     id?: string | null,
>     full_name?: string | null,
>     email?: string | null,
>     avatar_url?: string | null
>   } | null,
>   attached_file_keys?: string[] | null,
>   result_zip_file_name?: string | null,
>   is_published?: boolean | null
> }[]
> ```

***

### sessions.stop

`agentRunners.sessions.stop`

Stop an agent run session: stops the session

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.agentRunners.sessions.stop({ agent_runner_id: '6566a360c0b7f6005d3a1f38', agent_runner_session_id: '6566a365c0b7f6005d3a1f39' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |
| `agent_runner_session_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### sessions.update

`agentRunners.sessions.update`

Update an agent run session

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.agentRunners.sessions.update({ agent_runner_id: '6566a360c0b7f6005d3a1f38', agent_runner_session_id: '6566a365c0b7f6005d3a1f39' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |
| `agent_runner_session_id` | `string` | Yes | — |
| `is_published` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `agent_runner_id` | `string \| null` | No | — |
| `dev_server_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | One of `new`, `running`, `await_input`, `interrupted`, `error`, `done` or `cancelled`. |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `done_at` | `string \| null` | No | — |
| `paused_at` | `string \| null` | No | When the session paused waiting on an interaction. Null once it resumes. |
| `title` | `string \| null` | No | — |
| `prompt` | `string \| null` | No | — |
| `agent_config` | `object \| null` | No | — |
| `result` | `string \| null` | No | The agent's summary of what it did. |
| `result_diff` | `string \| null` | No | — |
| `commit_sha` | `string \| null` | No | — |
| `deploy_id` | `string \| null` | No | — |
| `deploy_url` | `string \| null` | No | URL of the session's deploy preview. |
| `duration` | `number \| null` | No | — |
| `usage` | `object \| null` | No | — |
| `interactions` | `object \| null` | No | Questions and requests from the agent, keyed by reference ID. A pending one pauses the session in `await_input` until it's answered or skipped. |
| `steps` | `object[] \| null` | No | — |
| `user` | `object \| null` | No | — |
| `attached_file_keys` | `string[] \| null` | No | — |
| `result_zip_file_name` | `string \| null` | No | — |
| `is_published` | `boolean \| null` | No | — |

> [accordion] agent\_config full type
>
> ```ts theme={null}
> {
>   agent?: string | null,
>   model?: string | null
> } | null
> ```

> [accordion] usage full type
>
> ```ts theme={null}
> {
>   total_input_tokens?: number | null,
>   total_output_tokens?: number | null,
>   total_cached_input_tokens?: number | null,
>   total_cached_output_tokens?: number | null,
>   total_tokens?: number | null,
>   total_credits_cost?: number | null
> } | null
> ```

> [accordion] interactions full type
>
> ```ts theme={null}
> Record<string, {
>   type?: string | null,
>   status?: string | null,
>   payload?: any | null,
>   response?: any[] | null
> }> | null
> ```

> [accordion] steps full type
>
> ```ts theme={null}
> {
>   title?: string | null,
>   message?: string | null
> }[] | null
> ```

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar_url?: string | null
> } | null
> ```

***

### stop

`agentRunners.stop`

Stop an agent run: stops the run's active session

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.agentRunners.stop({ agent_runner_id: '6566a360c0b7f6005d3a1f38' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### update

`agentRunners.update`

Update an agent run

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.agentRunners.update({ agent_runner_id: '6566a360c0b7f6005d3a1f38' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `agent_runner_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `parent_agent_runner_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | One of `new`, `running`, `await_input`, `interrupted`, `error`, `done`, `cancelled` or `archived`. |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `done_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `result_branch` | `string \| null` | No | — |
| `pr_url` | `string \| null` | No | — |
| `pr_branch` | `string \| null` | No | — |
| `pr_state` | `string \| null` | No | One of `open`, `draft`, `merged` or `closed`. |
| `pr_number` | `number \| null` | No | — |
| `pr_is_being_created` | `boolean \| null` | No | — |
| `pr_error` | `string \| null` | No | — |
| `current_task` | `string \| null` | No | What the agent is working on in the active session. |
| `result_diff` | `string \| null` | No | — |
| `sha` | `string \| null` | No | — |
| `merge_commit_sha` | `string \| null` | No | — |
| `merge_commit_error` | `string \| null` | No | — |
| `merge_commit_is_being_created` | `boolean \| null` | No | — |
| `base_deploy_id` | `string \| null` | No | — |
| `attached_file_keys` | `string[] \| null` | No | — |
| `active_session_created_at` | `string \| null` | No | — |
| `has_result_diff` | `boolean \| null` | No | Whether the run has changes, available from `GET /agent_runners/{agent_runner_id}/diff`. |
| `latest_session_deploy_id` | `string \| null` | No | — |
| `latest_session_deploy_url` | `string \| null` | No | — |
| `preview_state` | `string \| null` | No | State of the deploy building the latest preview. Null until that deploy exists; `ready` once the preview is live. |
| `user` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar_url?: string | null
> } | null
> ```

***

## Ai Gateway

### getAccountToken

`aiGateway.getAccountToken`

Get a team's AI Gateway token: returns an AI Gateway token scoped to an account

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.aiGateway.getAccountToken({ account_id: '5f3e9c1b7a2d4e0012ab34cd' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | The account ID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `token` | `string \| null` | No | The AI Gateway authentication token |
| `url` | `string \| null` | No | AI gateway base url |
| `expires_at` | `number \| null` | No | Unix timestamp when the token expires |

***

### getSiteToken

`aiGateway.getSiteToken`

Get a site's AI Gateway token: returns an AI Gateway token for a specific site

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.aiGateway.getSiteToken({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | The site ID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `token` | `string \| null` | No | The AI Gateway authentication token |
| `url` | `string \| null` | No | AI gateway base url |
| `expires_at` | `number \| null` | No | Unix timestamp when the token expires |

***

### listProviders

`aiGateway.listProviders`

List AI Gateway providers and models

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.aiGateway.listProviders({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `providers` | `object \| null` | No | — |

> [accordion] providers full type
>
> ```ts theme={null}
> Record<string, {
>   token_env_var?: string | null,
>   url_env_var?: string | null,
>   models?: string[] | null
> }> | null
> ```

***

## Billing

### paymentMethods.list

`billing.paymentMethods.list`

List payment methods

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.billing.paymentMethods.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   method_name?: string | null,
>   type?: string | null,
>   state?: string | null,
>   data?: {
>     card_type?: string | null,
>     last4?: string | null,
>     email?: string | null
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[]
> ```

***

## Builds

### appendLog

`builds.appendLog`

Add a message to a build log

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.builds.appendLog({ build_id: '6566a2a9c0b7f6005d3a1f23' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `build_id` | `string` | Yes | — |
| `message` | `string` | No | — |
| `error` | `boolean` | No | — |
| `section` | `initializing \| building \| deploying \| cleanup \| postprocessing` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### get

`builds.get`

Get a build

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.builds.get({ build_id: '6566a2a9c0b7f6005d3a1f23' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `build_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `deploy_id` | `string \| null` | No | — |
| `sha` | `string \| null` | No | — |
| `done` | `boolean \| null` | No | — |
| `error` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |

***

### notifyStart

`builds.notifyStart`

Mark a build as started

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.builds.notifyStart({ build_id: '6566a2a9c0b7f6005d3a1f23' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `build_id` | `string` | Yes | — |
| `buildbot_version` | `string` | No | — |
| `build_version` | `string` | No | — |
| `task_id` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

## Cache

### purge

`cache.purge`

Purge cached content from Netlify's CDN for a site (`site_id` or `site_slug`), optionally only the responses with given cache tags

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.cache.purge({
	site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17',
	cache_tags: ['product-42'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | No | — |
| `site_slug` | `string` | No | — |
| `cache_tags` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

## Deploy Keys

### create

`deployKeys.create`

Create a deploy key

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.deployKeys.create({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `public_key` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |

***

### delete

`deployKeys.delete`

Delete a deploy key

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.deployKeys.delete({ key_id: '6566a320c0b7f6005d3a1f32' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `key_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### get

`deployKeys.get`

Get a deploy key

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.deployKeys.get({ key_id: '6566a320c0b7f6005d3a1f32' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `key_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `public_key` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |

***

### list

`deployKeys.list`

List deploy keys

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.deployKeys.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   public_key?: string | null,
>   created_at?: string | null
> }[]
> ```

***

## Deploys

### cancel

`deploys.cancel`

Cancel a deploy

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.deploys.cancel({ deploy_id: '6566a2a8c0b7f6005d3a1f22' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `deploy_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `build_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `ssl_url` | `string \| null` | No | — |
| `admin_url` | `string \| null` | No | — |
| `deploy_url` | `string \| null` | No | — |
| `deploy_ssl_url` | `string \| null` | No | — |
| `screenshot_url` | `string \| null` | No | — |
| `review_id` | `number \| null` | No | — |
| `draft` | `boolean \| null` | No | — |
| `required` | `string[] \| null` | No | — |
| `required_functions` | `string[] \| null` | No | — |
| `required_edge_functions` | `string[] \| null` | No | An array of code\_shas for the edge-function bundles that need to be uploaded to complete the deploy. |
| `required_server` | `string[] \| null` | No | The SHA256 digest of the deploy's Netlify Server bundle, when it still needs to be uploaded to complete the deploy. A deploy has at most one server, so this holds either nothing or a single digest. |
| `error_message` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `commit_ref` | `string \| null` | No | — |
| `commit_url` | `string \| null` | No | — |
| `skipped` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `published_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `context` | `string \| null` | No | — |
| `locked` | `boolean \| null` | No | — |
| `review_url` | `string \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `skew_protection_token` | `string \| null` | No | — |
| `function_schedules` | `object[] \| null` | No | — |
| `functions_region` | `string \| null` | No | The functions region for this deploy as an airport code. |
| `functions_region_overrides` | `object[] \| null` | No | Functions in the deploy that explicitly specify their own region (airport code). |

> [accordion] function\_schedules full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   cron?: string | null
> }[] | null
> ```

> [accordion] functions\_region\_overrides full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   region?: string | null
> }[] | null
> ```

***

### delete

`deploys.delete`

Delete a deploy: marks a deploy for deletion

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.deploys.delete({ deploy_id: '6566a2a8c0b7f6005d3a1f22' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `deploy_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### get

`deploys.get`

Get a deploy

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.deploys.get({ deploy_id: '6566a2a8c0b7f6005d3a1f22' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `deploy_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `build_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `ssl_url` | `string \| null` | No | — |
| `admin_url` | `string \| null` | No | — |
| `deploy_url` | `string \| null` | No | — |
| `deploy_ssl_url` | `string \| null` | No | — |
| `screenshot_url` | `string \| null` | No | — |
| `review_id` | `number \| null` | No | — |
| `draft` | `boolean \| null` | No | — |
| `required` | `string[] \| null` | No | — |
| `required_functions` | `string[] \| null` | No | — |
| `required_edge_functions` | `string[] \| null` | No | An array of code\_shas for the edge-function bundles that need to be uploaded to complete the deploy. |
| `required_server` | `string[] \| null` | No | The SHA256 digest of the deploy's Netlify Server bundle, when it still needs to be uploaded to complete the deploy. A deploy has at most one server, so this holds either nothing or a single digest. |
| `error_message` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `commit_ref` | `string \| null` | No | — |
| `commit_url` | `string \| null` | No | — |
| `skipped` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `published_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `context` | `string \| null` | No | — |
| `locked` | `boolean \| null` | No | — |
| `review_url` | `string \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `skew_protection_token` | `string \| null` | No | — |
| `function_schedules` | `object[] \| null` | No | — |
| `functions_region` | `string \| null` | No | The functions region for this deploy as an airport code. |
| `functions_region_overrides` | `object[] \| null` | No | Functions in the deploy that explicitly specify their own region (airport code). |

> [accordion] function\_schedules full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   cron?: string | null
> }[] | null
> ```

> [accordion] functions\_region\_overrides full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   region?: string | null
> }[] | null
> ```

***

### lock

`deploys.lock`

Lock a deploy: locks a deploy so that subsequent deploys are built but not published

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.deploys.lock({ deploy_id: '6566a2a8c0b7f6005d3a1f22' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `deploy_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `build_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `ssl_url` | `string \| null` | No | — |
| `admin_url` | `string \| null` | No | — |
| `deploy_url` | `string \| null` | No | — |
| `deploy_ssl_url` | `string \| null` | No | — |
| `screenshot_url` | `string \| null` | No | — |
| `review_id` | `number \| null` | No | — |
| `draft` | `boolean \| null` | No | — |
| `required` | `string[] \| null` | No | — |
| `required_functions` | `string[] \| null` | No | — |
| `required_edge_functions` | `string[] \| null` | No | An array of code\_shas for the edge-function bundles that need to be uploaded to complete the deploy. |
| `required_server` | `string[] \| null` | No | The SHA256 digest of the deploy's Netlify Server bundle, when it still needs to be uploaded to complete the deploy. A deploy has at most one server, so this holds either nothing or a single digest. |
| `error_message` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `commit_ref` | `string \| null` | No | — |
| `commit_url` | `string \| null` | No | — |
| `skipped` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `published_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `context` | `string \| null` | No | — |
| `locked` | `boolean \| null` | No | — |
| `review_url` | `string \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `skew_protection_token` | `string \| null` | No | — |
| `function_schedules` | `object[] \| null` | No | — |
| `functions_region` | `string \| null` | No | The functions region for this deploy as an airport code. |
| `functions_region_overrides` | `object[] \| null` | No | Functions in the deploy that explicitly specify their own region (airport code). |

> [accordion] function\_schedules full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   cron?: string | null
> }[] | null
> ```

> [accordion] functions\_region\_overrides full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   region?: string | null
> }[] | null
> ```

***

### unlock

`deploys.unlock`

Unlock a deploy

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.deploys.unlock({ deploy_id: '6566a2a8c0b7f6005d3a1f22' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `deploy_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `build_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `ssl_url` | `string \| null` | No | — |
| `admin_url` | `string \| null` | No | — |
| `deploy_url` | `string \| null` | No | — |
| `deploy_ssl_url` | `string \| null` | No | — |
| `screenshot_url` | `string \| null` | No | — |
| `review_id` | `number \| null` | No | — |
| `draft` | `boolean \| null` | No | — |
| `required` | `string[] \| null` | No | — |
| `required_functions` | `string[] \| null` | No | — |
| `required_edge_functions` | `string[] \| null` | No | An array of code\_shas for the edge-function bundles that need to be uploaded to complete the deploy. |
| `required_server` | `string[] \| null` | No | The SHA256 digest of the deploy's Netlify Server bundle, when it still needs to be uploaded to complete the deploy. A deploy has at most one server, so this holds either nothing or a single digest. |
| `error_message` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `commit_ref` | `string \| null` | No | — |
| `commit_url` | `string \| null` | No | — |
| `skipped` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `published_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `context` | `string \| null` | No | — |
| `locked` | `boolean \| null` | No | — |
| `review_url` | `string \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `skew_protection_token` | `string \| null` | No | — |
| `function_schedules` | `object[] \| null` | No | — |
| `functions_region` | `string \| null` | No | The functions region for this deploy as an airport code. |
| `functions_region_overrides` | `object[] \| null` | No | Functions in the deploy that explicitly specify their own region (airport code). |

> [accordion] function\_schedules full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   cron?: string | null
> }[] | null
> ```

> [accordion] functions\_region\_overrides full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   region?: string | null
> }[] | null
> ```

***

### updateValidationsReport

`deploys.updateValidationsReport`

Update a deploy's validations report: updates the deploy validations report for a deploy

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.deploys.updateValidationsReport({ deploy_id: '6566a2a8c0b7f6005d3a1f22' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `deploy_id` | `string` | Yes | The ID of the deploy |
| `secrets_scan` | `object` | No | — |

> [accordion] secrets\_scan full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | The id of the deploy validations report |
| `deploy_id` | `string \| null` | No | The id of the deploy |
| `secret_scan_result` | `object \| null` | No | — |

> [accordion] secret\_scan\_result full type
>
> ```ts theme={null}
> {
>   scannedFilesCount?: number | null,
>   secretsScanMatches?: string[] | null
> } | null
> ```

***

### uploadEdgeFunction

`deploys.uploadEdgeFunction`

Upload a deploy's edge functions bundle

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.deploys.uploadEdgeFunction({
	deploy_id: '6566a2a8c0b7f6005d3a1f22',
	code_sha: '0000000000000000000000000000000000000000000000000000000000000000',
	file: { base64: 'PGgxPkhlbGxvPC9oMT4=', filename: 'index.html', contentType: 'text/html' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `deploy_id` | `string` | Yes | — |
| `code_sha` | `string` | Yes | — |
| `retry_count` | `number` | No | How many times this upload was retried before (sent as X-Nf-Retry-Count). |
| `file` | `string \| object \| custom` | Yes | The file to upload: its bytes are the whole request body. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### uploadFile

`deploys.uploadFile`

Upload one file a deploy listed as required: `path` is the file path in the site (`index.html`, `assets/app.js`), the bytes are the body. Netlify processes the deploy once every required file and function is in

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.deploys.uploadFile({
	deploy_id: '6566a2a8c0b7f6005d3a1f22',
	path: 'index.html',
	file: { base64: 'PGgxPkhlbGxvPC9oMT4=', filename: 'index.html', contentType: 'text/html' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `deploy_id` | `string` | Yes | — |
| `path` | `string` | Yes | — |
| `size` | `number` | No | — |
| `file` | `string \| object \| custom` | Yes | The file to upload: its bytes are the whole request body. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `path` | `string \| null` | No | — |
| `sha` | `string \| null` | No | — |
| `mime_type` | `string \| null` | No | — |
| `size` | `number \| null` | No | — |

***

### uploadFunction

`deploys.uploadFunction`

Upload one function bundle (a zip) a deploy listed as required, by function name

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.deploys.uploadFunction({
	deploy_id: '6566a2a8c0b7f6005d3a1f22',
	name: 'hello',
	runtime: 'js',
	file: { base64: 'UEsDBBQAAAAAAAAAe10jwYkZMgAAADIAAAAJAAAAaGVsbG8ubWpzZXhwb3J0IGRlZmF1bHQgYXN5bmMgKCkgPT4gbmV3IFJlc3BvbnNlKCJoZWxsbyIpOwpQSwECFAMUAAAAAAAAAHtdI8GJGTIAAAAyAAAACQAAAAAAAAAAAAAAgAEAAAAAaGVsbG8ubWpzUEsFBgAAAAABAAEANwAAAFkAAAAAAA==', filename: 'hello.zip', contentType: 'application/zip' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `deploy_id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `runtime` | `string` | No | — |
| `invocation_mode` | `string` | No | — |
| `timeout` | `number` | No | — |
| `size` | `number` | No | — |
| `retry_count` | `number` | No | How many times this upload was retried before (sent as X-Nf-Retry-Count). |
| `file` | `string \| object \| custom` | Yes | The file to upload: its bytes are the whole request body. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `sha` | `string \| null` | No | — |
| `region` | `string \| null` | No | — |

***

### uploadServer

`deploys.uploadServer`

Upload a deploy's Netlify Server bundle: uploads the deploy's Netlify Server bundle, addressed by the digest the deploy declared in its `server` property

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.deploys.uploadServer({
	deploy_id: '6566a2a8c0b7f6005d3a1f22',
	code_sha: '0000000000000000000000000000000000000000000000000000000000000000',
	file: { base64: 'PGgxPkhlbGxvPC9oMT4=', filename: 'index.html', contentType: 'text/html' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `deploy_id` | `string` | Yes | — |
| `code_sha` | `string` | Yes | — |
| `size` | `number` | No | — |
| `retry_count` | `number` | No | How many times this upload was retried before (sent as X-Nf-Retry-Count). |
| `file` | `string \| object \| custom` | Yes | The file to upload: its bytes are the whole request body. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

## Dns

### records.create

`dns.records.create`

Create a DNS record

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.dns.records.create({
	zone_id: '6566a330c0b7f6005d3a1f33',
	type: 'CNAME',
	hostname: 'www.example.com',
	value: 'acme-docs.netlify.app',
	ttl: 3600,
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone_id` | `string` | Yes | — |
| `type` | `string` | No | — |
| `hostname` | `string` | No | — |
| `value` | `string` | No | — |
| `ttl` | `number` | No | — |
| `priority` | `number` | No | — |
| `weight` | `number` | No | — |
| `port` | `number` | No | — |
| `flag` | `number` | No | — |
| `tag` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `hostname` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `value` | `string \| null` | No | — |
| `ttl` | `number \| null` | No | — |
| `priority` | `number \| null` | No | — |
| `dns_zone_id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `flag` | `number \| null` | No | — |
| `tag` | `string \| null` | No | — |
| `managed` | `boolean \| null` | No | — |

***

### records.delete

`dns.records.delete`

Delete a DNS record

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.dns.records.delete({ zone_id: '6566a330c0b7f6005d3a1f33', dns_record_id: '6566a335c0b7f6005d3a1f34' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone_id` | `string` | Yes | — |
| `dns_record_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### records.get

`dns.records.get`

Get a DNS record

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.dns.records.get({ zone_id: '6566a330c0b7f6005d3a1f33', dns_record_id: '6566a335c0b7f6005d3a1f34' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone_id` | `string` | Yes | — |
| `dns_record_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `hostname` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `value` | `string \| null` | No | — |
| `ttl` | `number \| null` | No | — |
| `priority` | `number \| null` | No | — |
| `dns_zone_id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `flag` | `number \| null` | No | — |
| `tag` | `string \| null` | No | — |
| `managed` | `boolean \| null` | No | — |

***

### records.list

`dns.records.list`

List a DNS zone's records

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.dns.records.list({ zone_id: '6566a330c0b7f6005d3a1f33' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone_id` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   hostname?: string | null,
>   type?: string | null,
>   value?: string | null,
>   ttl?: number | null,
>   priority?: number | null,
>   dns_zone_id?: string | null,
>   site_id?: string | null,
>   flag?: number | null,
>   tag?: string | null,
>   managed?: boolean | null
> }[]
> ```

***

### zones.create

`dns.zones.create`

Create a DNS zone

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.dns.zones.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_slug` | `string` | No | — |
| `site_id` | `string` | No | — |
| `name` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `errors` | `string[] \| null` | No | — |
| `supported_record_types` | `string[] \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `records` | `object[] \| null` | No | — |
| `dns_servers` | `string[] \| null` | No | — |
| `account_id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `account_slug` | `string \| null` | No | — |
| `account_name` | `string \| null` | No | — |
| `domain` | `string \| null` | No | — |
| `ipv6_enabled` | `boolean \| null` | No | — |
| `dedicated` | `boolean \| null` | No | — |

> [accordion] records full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   hostname?: string | null,
>   type?: string | null,
>   value?: string | null,
>   ttl?: number | null,
>   priority?: number | null,
>   dns_zone_id?: string | null,
>   site_id?: string | null,
>   flag?: number | null,
>   tag?: string | null,
>   managed?: boolean | null
> }[] | null
> ```

***

### zones.delete

`dns.zones.delete`

Delete a DNS zone

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.dns.zones.delete({ zone_id: '6566a330c0b7f6005d3a1f33' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### zones.get

`dns.zones.get`

Get a DNS zone

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.dns.zones.get({ zone_id: '6566a330c0b7f6005d3a1f33' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `errors` | `string[] \| null` | No | — |
| `supported_record_types` | `string[] \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `records` | `object[] \| null` | No | — |
| `dns_servers` | `string[] \| null` | No | — |
| `account_id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `account_slug` | `string \| null` | No | — |
| `account_name` | `string \| null` | No | — |
| `domain` | `string \| null` | No | — |
| `ipv6_enabled` | `boolean \| null` | No | — |
| `dedicated` | `boolean \| null` | No | — |

> [accordion] records full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   hostname?: string | null,
>   type?: string | null,
>   value?: string | null,
>   ttl?: number | null,
>   priority?: number | null,
>   dns_zone_id?: string | null,
>   site_id?: string | null,
>   flag?: number | null,
>   tag?: string | null,
>   managed?: boolean | null
> }[] | null
> ```

***

### zones.list

`dns.zones.list`

List DNS zones: returns the DNS zones for the team given by `account_slug`, or all DNS zones the current user can access

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.dns.zones.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_slug` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   errors?: string[] | null,
>   supported_record_types?: string[] | null,
>   user_id?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   records?: {
>     id?: string | null,
>     hostname?: string | null,
>     type?: string | null,
>     value?: string | null,
>     ttl?: number | null,
>     priority?: number | null,
>     dns_zone_id?: string | null,
>     site_id?: string | null,
>     flag?: number | null,
>     tag?: string | null,
>     managed?: boolean | null
>   }[] | null,
>   dns_servers?: string[] | null,
>   account_id?: string | null,
>   site_id?: string | null,
>   account_slug?: string | null,
>   account_name?: string | null,
>   domain?: string | null,
>   ipv6_enabled?: boolean | null,
>   dedicated?: boolean | null
> }[]
> ```

***

### zones.transfer

`dns.zones.transfer`

Transfer a DNS zone to another team

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.dns.zones.transfer({
	zone_id: '6566a330c0b7f6005d3a1f33',
	account_id: '5f3e9c1b7a2d4e0012ab34cd',
	transfer_account_id: '5f3e9c1b7a2d4e0012ab35aa',
	transfer_user_id: '5f3e9c1b7a2d4e0012ab35bb',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone_id` | `string` | Yes | — |
| `account_id` | `string` | Yes | the account of the dns zone |
| `transfer_account_id` | `string` | Yes | the account you want to transfer the dns zone to |
| `transfer_user_id` | `string` | Yes | the user you want to transfer the dns zone to |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `errors` | `string[] \| null` | No | — |
| `supported_record_types` | `string[] \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `records` | `object[] \| null` | No | — |
| `dns_servers` | `string[] \| null` | No | — |
| `account_id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `account_slug` | `string \| null` | No | — |
| `account_name` | `string \| null` | No | — |
| `domain` | `string \| null` | No | — |
| `ipv6_enabled` | `boolean \| null` | No | — |
| `dedicated` | `boolean \| null` | No | — |

> [accordion] records full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   hostname?: string | null,
>   type?: string | null,
>   value?: string | null,
>   ttl?: number | null,
>   priority?: number | null,
>   dns_zone_id?: string | null,
>   site_id?: string | null,
>   flag?: number | null,
>   tag?: string | null,
>   managed?: boolean | null
> }[] | null
> ```

***

## Env

### create

`env.create`

Create one or more environment variables on a team, or on one site with `site_id`; each takes `key`, `scopes`, `values` (per deploy context) and `is_secret`

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.env.create({
	account_id: '5f3e9c1b7a2d4e0012ab34cd',
	site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17',
	env_vars: [{
		key: 'API_URL',
		scopes: ['builds', 'functions'],
		values: [{ value: 'https://api.example.com', context: 'all' }],
	}],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | Scope response to account\_id |
| `site_id` | `string` | No | If provided, create an environment variable on the site level, not the account level |
| `env_vars` | `object[]` | No | — |

> [accordion] env\_vars full type
>
> ```ts theme={null}
> {
>   key?: string,
>   scopes?: (builds | functions | runtime | post-processing)[],
>   values?: {
>     id?: string,
>     value?: string,
>     context?: all | dev | dev-server | branch-deploy | deploy-preview | production | branch,
>     context_parameter?: string
>   }[],
>   is_secret?: boolean
> }[]
> ```

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   key?: string | null,
>   scopes?: string[] | null,
>   values?: {
>     id?: string | null,
>     value?: string | null,
>     context?: string | null,
>     context_parameter?: string | null
>   }[] | null,
>   is_secret?: boolean | null,
>   updated_at?: string | null,
>   updated_by?: {
>     id?: string | null,
>     full_name?: string | null,
>     email?: string | null,
>     avatar_url?: string | null
>   } | null
> }[]
> ```

***

### delete

`env.delete`

Delete an environment variable: deletes an environment variable

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.env.delete({ account_id: '5f3e9c1b7a2d4e0012ab34cd', key: 'API_URL' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | Scope response to account\_id |
| `key` | `string` | Yes | The environment variable key (case-sensitive) |
| `site_id` | `string` | No | If provided, delete the environment variable from this site |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### deleteValue

`env.deleteValue`

Delete an environment variable value: deletes a specific environment variable value

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.env.deleteValue({ account_id: '5f3e9c1b7a2d4e0012ab34cd', id: '6566a390c0b7f6005d3a1f3e', key: 'API_URL' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | Scope response to account\_id |
| `id` | `string` | Yes | The environment variable value's ID |
| `key` | `string` | Yes | The environment variable key name (case-sensitive) |
| `site_id` | `string` | No | If provided, delete the value from an environment variable on this site |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### get

`env.get`

Get an environment variable: returns an individual environment variable

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.env.get({ account_id: '5f3e9c1b7a2d4e0012ab34cd', key: 'API_URL' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | Scope response to account\_id |
| `key` | `string` | Yes | The environment variable key (case-sensitive) |
| `site_id` | `string` | No | If provided, return the environment variable for a specific site (no merging is performed) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `key` | `string \| null` | No | The environment variable key, like ALGOLIA\_ID (case-sensitive) |
| `scopes` | `string[] \| null` | No | The scopes that this environment variable is set to |
| `values` | `object[] \| null` | No | An array of Value objects containing values and metadata |
| `is_secret` | `boolean \| null` | No | Secret values are only readable by code running on Netlify's systems. With secrets, only the local development context values are readable from the UI, API, and CLI. By default, environment variable values are not secret. |
| `updated_at` | `string \| null` | No | The timestamp of when the value was last updated |
| `updated_by` | `object \| null` | No | — |

> [accordion] values full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   value?: string | null,
>   context?: string | null,
>   context_parameter?: string | null
> }[] | null
> ```

> [accordion] updated\_by full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar_url?: string | null
> } | null
> ```

***

### list

`env.list`

List environment variables for a team or site: returns all environment variables for an account or site

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.env.list({ account_id: '5f3e9c1b7a2d4e0012ab34cd' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | Scope response to account\_id |
| `context_name` | `all \| dev \| dev-server \| branch-deploy \| deploy-preview \| production` | No | Filter by deploy context |
| `scope` | `builds \| functions \| runtime \| post-processing` | No | Filter by scope |
| `site_id` | `string` | No | If specified, only return environment variables set on this site |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   key?: string | null,
>   scopes?: string[] | null,
>   values?: {
>     id?: string | null,
>     value?: string | null,
>     context?: string | null,
>     context_parameter?: string | null
>   }[] | null,
>   is_secret?: boolean | null,
>   updated_at?: string | null,
>   updated_by?: {
>     id?: string | null,
>     full_name?: string | null,
>     email?: string | null,
>     avatar_url?: string | null
>   } | null
> }[]
> ```

***

### listForSite

`env.listForSite`

List environment variables for a site: returns all environment variables for a site

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.env.listForSite({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `context_name` | `all \| dev \| dev-server \| branch-deploy \| deploy-preview \| production` | No | Filter by deploy context |
| `scope` | `builds \| functions \| runtime \| post_processing` | No | Filter by scope |
| `site_id` | `string` | Yes | Scope response to site\_id |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   key?: string | null,
>   scopes?: string[] | null,
>   values?: {
>     id?: string | null,
>     value?: string | null,
>     context?: string | null,
>     context_parameter?: string | null
>   }[] | null,
>   is_secret?: boolean | null,
>   updated_at?: string | null,
>   updated_by?: {
>     id?: string | null,
>     full_name?: string | null,
>     email?: string | null,
>     avatar_url?: string | null
>   } | null
> }[]
> ```

***

### setValue

`env.setValue`

Set a value on an environment variable: updates or creates a new value for an existing environment variable

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.env.setValue({
	account_id: '5f3e9c1b7a2d4e0012ab34cd',
	key: 'API_URL',
	site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17',
	context: 'production',
	value: 'https://api.example.com',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | Scope response to account\_id |
| `key` | `string` | Yes | The existing environment variable key name (case-sensitive) |
| `site_id` | `string` | No | If provided, update an environment variable set on this site |
| `context` | `all \| dev \| dev-server \| branch-deploy \| deploy-preview \| production \| branch` | No | The deploy context in which this value will be used. `dev` refers to local development when running `netlify dev`. `branch` must be provided with a value in `context_parameter`. |
| `context_parameter` | `string` | No | An additional parameter for custom branches. Currently, this is used for providing a branch name when `context=branch`. |
| `value` | `string` | No | The environment variable's unencrypted value |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `key` | `string \| null` | No | The environment variable key, like ALGOLIA\_ID (case-sensitive) |
| `scopes` | `string[] \| null` | No | The scopes that this environment variable is set to |
| `values` | `object[] \| null` | No | An array of Value objects containing values and metadata |
| `is_secret` | `boolean \| null` | No | Secret values are only readable by code running on Netlify's systems. With secrets, only the local development context values are readable from the UI, API, and CLI. By default, environment variable values are not secret. |
| `updated_at` | `string \| null` | No | The timestamp of when the value was last updated |
| `updated_by` | `object \| null` | No | — |

> [accordion] values full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   value?: string | null,
>   context?: string | null,
>   context_parameter?: string | null
> }[] | null
> ```

> [accordion] updated\_by full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar_url?: string | null
> } | null
> ```

***

### update

`env.update`

Replace an environment variable: its scopes, secret flag and every value (values left out are removed). Pass `new_key` to rename it

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.env.update({
	account_id: '5f3e9c1b7a2d4e0012ab34cd',
	key: 'API_URL',
	site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17',
	new_key: 'API_BASE_URL',
	values: [{ value: 'https://api.example.com', context: 'all' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | Scope response to account\_id |
| `key` | `string` | Yes | The existing environment variable key name (case-sensitive) |
| `site_id` | `string` | No | If provided, update an environment variable set on this site |
| `new_key` | `string` | No | A new name for the variable; leave it out to keep `key`. |
| `scopes` | `(builds \| functions \| runtime \| post-processing)[]` | No | The scopes that this environment variable is set to (Pro plans and above) |
| `values` | `object[]` | No | — |
| `is_secret` | `boolean` | No | Secret values are only readable by code running on Netlify's systems. With secrets, only the local development context values are readable from the UI, API, and CLI. By default, environment variable values are not secret. |

> [accordion] values full type
>
> ```ts theme={null}
> {
>   id?: string,
>   value?: string,
>   context?: all | dev | dev-server | branch-deploy | deploy-preview | production | branch,
>   context_parameter?: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `key` | `string \| null` | No | The environment variable key, like ALGOLIA\_ID (case-sensitive) |
| `scopes` | `string[] \| null` | No | The scopes that this environment variable is set to |
| `values` | `object[] \| null` | No | An array of Value objects containing values and metadata |
| `is_secret` | `boolean \| null` | No | Secret values are only readable by code running on Netlify's systems. With secrets, only the local development context values are readable from the UI, API, and CLI. By default, environment variable values are not secret. |
| `updated_at` | `string \| null` | No | The timestamp of when the value was last updated |
| `updated_by` | `object \| null` | No | — |

> [accordion] values full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   value?: string | null,
>   context?: string | null,
>   context_parameter?: string | null
> }[] | null
> ```

> [accordion] updated\_by full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar_url?: string | null
> } | null
> ```

***

## Forms

### submissions.list

`forms.submissions.list`

List a form's submissions, one page at a time

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.forms.submissions.list({ form_id: '5f3e9d0a7a2d4e0012ab34ce' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `form_id` | `string` | Yes | — |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while a page came back full (per\_page entries), null once a page comes back shorter. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   number?: number | null,
>   email?: string | null,
>   name?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   company?: string | null,
>   summary?: string | null,
>   body?: string | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   site_url?: string | null
> }[]
> ```

***

## Hooks

### create

`hooks.create`

Create an outgoing notification for a site: type `url` with `data.url` (and `data.signature_secret` to sign deliveries with a JWS the plugin's webhooks check), `slack` or `email`, for one event (deploy\_created, deploy\_failed, submission\_created...)

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.hooks.create({
	site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17',
	type: 'url',
	event: 'deploy_failed',
	data: { url: 'https://example.com/netlify/webhooks', signature_secret: 'a-long-random-secret' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `id` | `string` | No | — |
| `type` | `string` | No | — |
| `event` | `string` | No | — |
| `data` | `object` | No | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `disabled` | `boolean` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `event` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `disabled` | `boolean \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### delete

`hooks.delete`

Delete an outgoing hook

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.hooks.delete({ hook_id: '6566a31ac0b7f6005d3a1f31' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `hook_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### enable

`hooks.enable`

Re-enable an outgoing hook: re-enables an outgoing hook that was disabled after repeated delivery errors

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.hooks.enable({ hook_id: '6566a31ac0b7f6005d3a1f31' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `hook_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `event` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `disabled` | `boolean \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### get

`hooks.get`

Get an outgoing hook

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.hooks.get({ hook_id: '6566a31ac0b7f6005d3a1f31' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `hook_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `event` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `disabled` | `boolean \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### list

`hooks.list`

List a site's outgoing hooks: returns the outgoing hooks for a site

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.hooks.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `form_id` | `string` | No | Only return hooks attached to this form. |
| `event` | `string` | No | Only return hooks for this event name. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   type?: string | null,
>   event?: string | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   disabled?: boolean | null
> }[]
> ```

***

### listTypes

`hooks.listTypes`

List outgoing hook types: returns the available outgoing hook types

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.hooks.listTypes({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | No | Only return the hook types available to this site. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   events?: string[] | null,
>   fields?: {
>   }[] | null
> }[]
> ```

***

### update

`hooks.update`

Update an outgoing hook

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.hooks.update({ hook_id: '6566a31ac0b7f6005d3a1f31' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `hook_id` | `string` | Yes | — |
| `id` | `string` | No | — |
| `site_id` | `string` | No | — |
| `type` | `string` | No | — |
| `event` | `string` | No | — |
| `data` | `object` | No | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `disabled` | `boolean` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `event` | `string \| null` | No | — |
| `data` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `disabled` | `boolean \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

## Oauth

### tickets.create

`oauth.tickets.create`

Create an OAuth ticket

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.oauth.tickets.create({ client_id: 'example-oauth-client-id' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `client_id` | `string` | Yes | — |
| `message` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `client_id` | `string \| null` | No | — |
| `authorized` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |

***

### tickets.exchange

`oauth.tickets.exchange`

Exchange an OAuth ticket for an access token

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.oauth.tickets.exchange({ ticket_id: '6566a350c0b7f6005d3a1f37' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ticket_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `access_token` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `user_email` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |

***

### tickets.get

`oauth.tickets.get`

Get an OAuth ticket

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.oauth.tickets.get({ ticket_id: '6566a350c0b7f6005d3a1f37' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ticket_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `client_id` | `string \| null` | No | — |
| `authorized` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |

***

## Services

### get

`services.get`

Get an add-on service

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.services.get({ addonName: 'example-addon' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `addonName` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `slug` | `string \| null` | No | — |
| `service_path` | `string \| null` | No | — |
| `long_description` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `events` | `object[] \| null` | No | — |
| `tags` | `string[] \| null` | No | — |
| `icon` | `string \| null` | No | — |
| `manifest_url` | `string \| null` | No | — |
| `environments` | `string[] \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

> [accordion] events full type
>
> ```ts theme={null}
> {
> }[] | null
> ```

***

### getManifest

`services.getManifest`

Get an add-on service's manifest

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.services.getManifest({ addonName: 'example-addon' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `addonName` | `string` | Yes | — |

**Output:** *empty object*

***

### list

`services.list`

List add-on services

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.services.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `search` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   service_path?: string | null,
>   long_description?: string | null,
>   description?: string | null,
>   events?: {
>   }[] | null,
>   tags?: string[] | null,
>   icon?: string | null,
>   manifest_url?: string | null,
>   environments?: string[] | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[]
> ```

***

## Sites

### agentRunnerHooks.create

`sites.agentRunnerHooks.create`

Create an agent runner hook

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.agentRunnerHooks.create({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `title` | `string` | No | — |
| `branch` | `string` | No | — |
| `prompt` | `string` | No | — |
| `agent` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `prompt` | `string \| null` | No | — |
| `agent` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `msg` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `secret` | `string \| null` | No | — |

***

### agentRunnerHooks.delete

`sites.agentRunnerHooks.delete`

Delete an agent runner hook

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.agentRunnerHooks.delete({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', id: '6566a390c0b7f6005d3a1f3e' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### agentRunnerHooks.get

`sites.agentRunnerHooks.get`

Get an agent runner hook

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.agentRunnerHooks.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', id: '6566a390c0b7f6005d3a1f3e' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `prompt` | `string \| null` | No | — |
| `agent` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `msg` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |

***

### agentRunnerHooks.list

`sites.agentRunnerHooks.list`

List a site's agent runner hooks

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.agentRunnerHooks.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   title?: string | null,
>   branch?: string | null,
>   prompt?: string | null,
>   agent?: string | null,
>   url?: string | null,
>   msg?: string | null,
>   created_at?: string | null
> }[]
> ```

***

### agentRunnerHooks.update

`sites.agentRunnerHooks.update`

Update an agent runner hook

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.agentRunnerHooks.update({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', id: '6566a390c0b7f6005d3a1f3e' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `id` | `string` | Yes | — |
| `title` | `string` | No | — |
| `branch` | `string` | No | — |
| `prompt` | `string` | No | — |
| `agent` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### agentRunners.create

`sites.agentRunners.create`

Start an agent run on a site: starts an agent run on the site

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.sites.agentRunners.create({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', prompt: 'Add a dark mode toggle to the header' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | The site's ID or one of its hostnames. |
| `prompt` | `string` | Yes | — |
| `branch` | `string` | No | Branch to start from. Defaults to the site's production branch. |
| `deploy_id` | `string` | No | Deploy to start from. Takes precedence over `branch`. |
| `agent` | `string` | No | Agent to run, for example `claude` or `codex`. |
| `model` | `string` | No | Model for the agent to use. Omit to let Netlify choose. |
| `effort` | `low \| medium \| high` | No | Reasoning effort. Omit to let the agent decide. |
| `mode` | `normal \| ask` | No | `normal` (the default) changes code; `ask` answers questions without changing code. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `parent_agent_runner_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | One of `new`, `running`, `await_input`, `interrupted`, `error`, `done`, `cancelled` or `archived`. |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `done_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `result_branch` | `string \| null` | No | — |
| `pr_url` | `string \| null` | No | — |
| `pr_branch` | `string \| null` | No | — |
| `pr_state` | `string \| null` | No | One of `open`, `draft`, `merged` or `closed`. |
| `pr_number` | `number \| null` | No | — |
| `pr_is_being_created` | `boolean \| null` | No | — |
| `pr_error` | `string \| null` | No | — |
| `current_task` | `string \| null` | No | What the agent is working on in the active session. |
| `result_diff` | `string \| null` | No | — |
| `sha` | `string \| null` | No | — |
| `merge_commit_sha` | `string \| null` | No | — |
| `merge_commit_error` | `string \| null` | No | — |
| `merge_commit_is_being_created` | `boolean \| null` | No | — |
| `base_deploy_id` | `string \| null` | No | — |
| `attached_file_keys` | `string[] \| null` | No | — |
| `active_session_created_at` | `string \| null` | No | — |
| `has_result_diff` | `boolean \| null` | No | Whether the run has changes, available from `GET /agent_runners/{agent_runner_id}/diff`. |
| `latest_session_deploy_id` | `string \| null` | No | — |
| `latest_session_deploy_url` | `string \| null` | No | — |
| `preview_state` | `string \| null` | No | State of the deploy building the latest preview. Null until that deploy exists; `ready` once the preview is live. |
| `user` | `object \| null` | No | — |

> [accordion] user full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   full_name?: string | null,
>   email?: string | null,
>   avatar_url?: string | null
> } | null
> ```

***

### assets.create

`sites.assets.create`

Create a site asset (only available to some sites)

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.assets.create({
	site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17',
	name: 'example-site',
	size: 1024,
	content_type: 'text/markdown',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `size` | `number` | Yes | — |
| `content_type` | `string` | Yes | — |
| `visibility` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `form` | `object \| null` | No | — |
| `asset` | `object \| null` | No | — |

> [accordion] form full type
>
> ```ts theme={null}
> {
>   url?: string | null,
>   fields?: Record<string, string> | null
> } | null
> ```

> [accordion] asset full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   creator_id?: string | null,
>   name?: string | null,
>   state?: string | null,
>   content_type?: string | null,
>   url?: string | null,
>   key?: string | null,
>   visibility?: string | null,
>   size?: number | null,
>   created_at?: string | null,
>   updated_at?: string | null
> } | null
> ```

***

### assets.delete

`sites.assets.delete`

Delete a site asset (only available to some sites)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.assets.delete({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', asset_id: '6566a340c0b7f6005d3a1f35' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `asset_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### assets.get

`sites.assets.get`

Get a site asset (only available to some sites)

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.assets.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', asset_id: '6566a340c0b7f6005d3a1f35' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `asset_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `creator_id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `content_type` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `key` | `string \| null` | No | — |
| `visibility` | `string \| null` | No | — |
| `size` | `number \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

### assets.getPublicSignature

`sites.assets.getPublicSignature`

Get a site asset's URL: returns the URL of the asset (only available to some sites)

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.assets.getPublicSignature({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', asset_id: '6566a340c0b7f6005d3a1f35' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `asset_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string \| null` | No | — |

***

### assets.list

`sites.assets.list`

List a site's assets (only available to some sites)

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.assets.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   creator_id?: string | null,
>   name?: string | null,
>   state?: string | null,
>   content_type?: string | null,
>   url?: string | null,
>   key?: string | null,
>   visibility?: string | null,
>   size?: number | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[]
> ```

***

### assets.update

`sites.assets.update`

Update a site asset's state (only available to some sites)

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.assets.update({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', asset_id: '6566a340c0b7f6005d3a1f35', state: 'uploaded' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `asset_id` | `string` | Yes | — |
| `state` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `creator_id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `content_type` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `key` | `string \| null` | No | — |
| `visibility` | `string \| null` | No | — |
| `size` | `number \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

***

### buildHooks.create

`sites.buildHooks.create`

Create a build hook

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.buildHooks.create({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', title: 'CMS publish', branch: 'main' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `title` | `string` | No | — |
| `branch` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |

***

### buildHooks.delete

`sites.buildHooks.delete`

Delete a build hook

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.buildHooks.delete({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', id: '6566a390c0b7f6005d3a1f3e' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### buildHooks.get

`sites.buildHooks.get`

Get a build hook

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.buildHooks.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', id: '6566a390c0b7f6005d3a1f3e' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |

***

### buildHooks.list

`sites.buildHooks.list`

List a site's build hooks

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.buildHooks.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   title?: string | null,
>   branch?: string | null,
>   url?: string | null,
>   site_id?: string | null,
>   created_at?: string | null
> }[]
> ```

***

### buildHooks.update

`sites.buildHooks.update`

Update a build hook

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.buildHooks.update({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', id: '6566a390c0b7f6005d3a1f3e' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `id` | `string` | Yes | — |
| `title` | `string` | No | — |
| `branch` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### builds.create

`sites.builds.create`

Start a build for the site from its linked repository (or from an uploaded zip), optionally for a branch or commit; uses build minutes

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.builds.create({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', clear_cache: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `branch` | `string` | No | If no branch is specified, it is treated as a production deploy If a branch IS specified and matches the main branch, it is also production If a branch is specified and doesn't match the main branch, it is a branch deploy |
| `clear_cache` | `boolean` | No | Whether to clear the build cache before building |
| `commit_sha` | `string` | No | The commit SHA to build; when omitted, the head of the branch or pull request is fetched from the git host. Ignored for zip uploads |
| `draft` | `boolean` | No | Whether to create a draft deploy, which uses the deploy-preview context and is never published; review\_id builds are always drafts |
| `image` | `string` | No | The build image tag to use for the build |
| `review_id` | `number` | No | The merge/pull request ID to build; triggers a deploy preview. Ignored for zip uploads |
| `template_id` | `string` | No | The build template to use for the build |
| `title` | `string` | No | The title of the build |
| `zip` | `string \| object \| custom` | No | A zip file containing the site files to build. Only used with Content-Type 'multipart/form-data'. Alternatively, set Content-Type to 'application/zip' and send the zip as the raw request body (no 'zip' parameter needed). |

> [accordion] zip full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `deploy_id` | `string \| null` | No | — |
| `sha` | `string \| null` | No | — |
| `done` | `boolean \| null` | No | — |
| `error` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |

***

### builds.list

`sites.builds.list`

List a site's builds, one page at a time

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.builds.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while a page came back full (per\_page entries), null once a page comes back shorter. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   deploy_id?: string | null,
>   sha?: string | null,
>   done?: boolean | null,
>   error?: string | null,
>   created_at?: string | null
> }[]
> ```

***

### create

`sites.create`

Create a site in your personal team (accounts.sites.create picks the team), optionally linked to a Git repository with build settings

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.create({ name: 'acme-docs' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `configure_dns` | `boolean` | No | — |
| `id` | `string` | No | — |
| `state` | `string` | No | — |
| `plan` | `string` | No | — |
| `name` | `string` | No | — |
| `custom_domain` | `string` | No | — |
| `domain_aliases` | `string[]` | No | — |
| `branch_deploy_custom_domain` | `string` | No | — |
| `deploy_preview_custom_domain` | `string` | No | — |
| `password` | `string` | No | — |
| `notification_email` | `string` | No | — |
| `url` | `string` | No | — |
| `ssl_url` | `string` | No | — |
| `admin_url` | `string` | No | — |
| `screenshot_url` | `string` | No | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `user_id` | `string` | No | — |
| `session_id` | `string` | No | — |
| `ssl` | `boolean` | No | — |
| `force_ssl` | `boolean` | No | — |
| `managed_dns` | `boolean` | No | — |
| `deploy_url` | `string` | No | — |
| `published_deploy` | `object` | No | — |
| `account_id` | `string` | No | — |
| `account_name` | `string` | No | — |
| `account_slug` | `string` | No | — |
| `git_provider` | `string` | No | — |
| `deploy_hook` | `string` | No | — |
| `capabilities` | `object` | No | — |
| `processing_settings` | `object` | No | — |
| `build_settings` | `object` | No | — |
| `id_domain` | `string` | No | — |
| `default_hooks_data` | `object` | No | — |
| `build_image` | `string` | No | — |
| `prerender` | `string` | No | — |
| `functions_region` | `string` | No | — |
| `prevent_non_git_prod_deploys` | `boolean` | No | — |
| `repo` | `object` | No | — |

> [accordion] published\_deploy full type
>
> ```ts theme={null}
> {
>   id?: string,
>   site_id?: string,
>   user_id?: string,
>   build_id?: string,
>   state?: string,
>   name?: string,
>   url?: string,
>   ssl_url?: string,
>   admin_url?: string,
>   deploy_url?: string,
>   deploy_ssl_url?: string,
>   screenshot_url?: string,
>   review_id?: number,
>   draft?: boolean,
>   required?: string[],
>   required_functions?: string[],
>   required_edge_functions?: string[],
>   required_server?: string[],
>   error_message?: string,
>   branch?: string,
>   commit_ref?: string,
>   commit_url?: string,
>   skipped?: boolean,
>   created_at?: string,
>   updated_at?: string,
>   published_at?: string,
>   title?: string,
>   context?: string,
>   locked?: boolean,
>   review_url?: string,
>   framework?: string,
>   skew_protection_token?: string,
>   function_schedules?: {
>     name?: string,
>     cron?: string
>   }[],
>   functions_region?: string,
>   functions_region_overrides?: {
>     name?: string,
>     region?: string
>   }[]
> }
> ```

> [accordion] capabilities full type
>
> ```ts theme={null}
> Record<string, {
> }>
> ```

> [accordion] processing\_settings full type
>
> ```ts theme={null}
> {
>   html?: {
>     pretty_urls?: boolean
>   }
> }
> ```

> [accordion] build\_settings full type
>
> ```ts theme={null}
> {
>   id?: number,
>   provider?: string,
>   deploy_key_id?: string,
>   repo_path?: string,
>   repo_branch?: string,
>   dir?: string,
>   functions_dir?: string,
>   cmd?: string,
>   allowed_branches?: string[],
>   public_repo?: boolean,
>   private_logs?: boolean,
>   repo_url?: string,
>   env?: Record<string, string>,
>   installation_id?: number,
>   stop_builds?: boolean
> }
> ```

> [accordion] default\_hooks\_data full type
>
> ```ts theme={null}
> {
>   access_token?: string
> }
> ```

> [accordion] repo full type
>
> ```ts theme={null}
> {
>   id?: number,
>   provider?: string,
>   deploy_key_id?: string,
>   repo_path?: string,
>   repo_branch?: string,
>   dir?: string,
>   functions_dir?: string,
>   cmd?: string,
>   allowed_branches?: string[],
>   public_repo?: boolean,
>   private_logs?: boolean,
>   repo_url?: string,
>   env?: Record<string, string>,
>   installation_id?: number,
>   stop_builds?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `plan` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `custom_domain` | `string \| null` | No | — |
| `domain_aliases` | `string[] \| null` | No | — |
| `branch_deploy_custom_domain` | `string \| null` | No | — |
| `deploy_preview_custom_domain` | `string \| null` | No | — |
| `password` | `string \| null` | No | — |
| `notification_email` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `ssl_url` | `string \| null` | No | — |
| `admin_url` | `string \| null` | No | — |
| `screenshot_url` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `session_id` | `string \| null` | No | — |
| `ssl` | `boolean \| null` | No | — |
| `force_ssl` | `boolean \| null` | No | — |
| `managed_dns` | `boolean \| null` | No | — |
| `deploy_url` | `string \| null` | No | — |
| `published_deploy` | `object \| null` | No | — |
| `account_id` | `string \| null` | No | — |
| `account_name` | `string \| null` | No | — |
| `account_slug` | `string \| null` | No | — |
| `git_provider` | `string \| null` | No | — |
| `deploy_hook` | `string \| null` | No | — |
| `capabilities` | `object \| null` | No | Feature flags and limits of the site's plan (strings, booleans, numbers or objects). |
| `processing_settings` | `object \| null` | No | — |
| `build_settings` | `object \| null` | No | — |
| `id_domain` | `string \| null` | No | — |
| `default_hooks_data` | `object \| null` | No | — |
| `build_image` | `string \| null` | No | — |
| `prerender` | `string \| null` | No | — |
| `functions_region` | `string \| null` | No | — |
| `prevent_non_git_prod_deploys` | `boolean \| null` | No | — |
| `identity_instance_id` | `string \| null` | No | The site's Netlify Identity instance, when Identity is on (pass it to sites.identity.users.\*). |

> [accordion] published\_deploy full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   user_id?: string | null,
>   build_id?: string | null,
>   state?: string | null,
>   name?: string | null,
>   url?: string | null,
>   ssl_url?: string | null,
>   admin_url?: string | null,
>   deploy_url?: string | null,
>   deploy_ssl_url?: string | null,
>   screenshot_url?: string | null,
>   review_id?: number | null,
>   draft?: boolean | null,
>   required?: string[] | null,
>   required_functions?: string[] | null,
>   required_edge_functions?: string[] | null,
>   required_server?: string[] | null,
>   error_message?: string | null,
>   branch?: string | null,
>   commit_ref?: string | null,
>   commit_url?: string | null,
>   skipped?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   title?: string | null,
>   context?: string | null,
>   locked?: boolean | null,
>   review_url?: string | null,
>   framework?: string | null,
>   skew_protection_token?: string | null,
>   function_schedules?: {
>     name?: string | null,
>     cron?: string | null
>   }[] | null,
>   functions_region?: string | null,
>   functions_region_overrides?: {
>     name?: string | null,
>     region?: string | null
>   }[] | null
> } | null
> ```

> [accordion] capabilities full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] processing\_settings full type
>
> ```ts theme={null}
> {
>   html?: {
>     pretty_urls?: boolean | null
>   } | null
> } | null
> ```

> [accordion] build\_settings full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   provider?: string | null,
>   deploy_key_id?: string | null,
>   repo_path?: string | null,
>   repo_branch?: string | null,
>   dir?: string | null,
>   functions_dir?: string | null,
>   cmd?: string | null,
>   allowed_branches?: string[] | null,
>   public_repo?: boolean | null,
>   private_logs?: boolean | null,
>   repo_url?: string | null,
>   env?: Record<string, string> | null,
>   installation_id?: number | null,
>   stop_builds?: boolean | null
> } | null
> ```

> [accordion] default\_hooks\_data full type
>
> ```ts theme={null}
> {
>   access_token?: string | null
> } | null
> ```

***

### database.branches.create

`sites.database.branches.create`

Create a database branch: creates a new database branch

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.database.branches.create({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', branch_id: 'br-preview-a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `parent_branch_id` | `string` | No | The ID of the parent branch to create the new branch from. Defaults to the production branch if not specified. |
| `branch_id` | `string` | Yes | The branch identifier |
| `metadata` | `object` | No | Arbitrary metadata to associate with the branch |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `connection_string` | `string \| null` | No | The connection string for the database branch |
| `metadata` | `object \| null` | No | Metadata associated with the branch |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### database.branches.delete

`sites.database.branches.delete`

Delete a database branch: deletes a database branch

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.database.branches.delete({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', branch_id: 'br-preview-a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `branch_id` | `string` | Yes | The branch ID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### database.branches.get

`sites.database.branches.get`

Get a database branch: returns the database branch connection string for a specific branch

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.database.branches.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', branch_id: 'br-preview-a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `branch_id` | `string` | Yes | The branch ID |
| `role` | `netlifydb_owner \| netlifydb_readonly` | No | The database role to use for the connection string. Defaults to netlifydb\_owner if not specified. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `connection_string` | `string \| null` | No | The connection string for the database branch |
| `metadata` | `object \| null` | No | Metadata associated with the branch |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### database.branches.list

`sites.database.branches.list`

List database branches: returns all branches for the site's database with compute status and metadata

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.database.branches.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `branches` | `object[] \| null` | No | List of database branches |

> [accordion] branches full type
>
> ```ts theme={null}
> {
>   branch_id?: string | null,
>   name?: string | null,
>   connection_string?: string | null,
>   state?: string | null,
>   logical_size_bytes?: number | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   last_active_at?: string | null,
>   compute?: {
>     current_state?: string | null,
>     autoscaling_limit_min_cu?: number | null,
>     autoscaling_limit_max_cu?: number | null,
>     suspend_timeout_seconds?: number | null,
>     last_active?: string | null
>   } | null,
>   metadata?: {
>   } | null
> }[] | null
> ```

***

### database.branches.reset

`sites.database.branches.reset`

Reset a database branch: resets a non-production database branch by re-forking it from a source branch (defaults to the production branch)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.database.branches.reset({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', branch_id: 'br-preview-a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `branch_id` | `string` | Yes | The branch ID to reset |
| `force` | `boolean` | No | If true, resets the branch even when it is already in sync with the source. |
| `role` | `netlifydb_owner \| netlifydb_readonly` | No | The database role to use for the returned connection string. Defaults to netlifydb\_owner if not specified. |
| `source_branch_id` | `string` | No | The ID of the branch to re-fork the target branch from. Defaults to "production" if not specified. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `reset` | `boolean \| null` | No | Whether the branch was actually re-forked. False when the target was already in sync with the source and `force=true` was not set. |
| `connection_string` | `string \| null` | No | The connection string for the reset (or unchanged) branch |
| `metadata` | `object \| null` | No | Metadata associated with the branch |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### database.branches.setComputeSettings

`sites.database.branches.setComputeSettings`

Set a database branch's compute settings: sets compute settings for a specific database branch, overriding project-level settings

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.sites.database.branches.setComputeSettings({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', branch_id: 'br-preview-a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `branch_id` | `string` | Yes | The branch ID |
| `min_cu` | `number` | No | Minimum compute units (0.25 to 16.0). Must be less than or equal to max\_cu. |
| `max_cu` | `number` | No | Maximum compute units (0.25 to 16.0). Must be greater than or equal to min\_cu. max\_cu - min\_cu must not exceed 8.0. |
| `sleep_timeout_seconds` | `number` | No | Seconds of inactivity before the compute endpoint is suspended. Use -1 for always on, or a non-negative value. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `min_cu` | `number \| null` | No | Minimum compute units |
| `max_cu` | `number \| null` | No | Maximum compute units |
| `sleep_timeout_seconds` | `number \| null` | No | Seconds of inactivity before suspension |

***

### database.compute.clear

`sites.database.compute.clear`

Reset database compute settings to defaults: resets project-level compute settings to tier defaults

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.database.compute.clear({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### database.compute.get

`sites.database.compute.get`

Get database compute settings: returns the project-level compute settings for the database

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.database.compute.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `min_cu` | `number \| null` | No | Minimum compute units |
| `max_cu` | `number \| null` | No | Maximum compute units |
| `sleep_timeout_seconds` | `number \| null` | No | Seconds of inactivity before suspension |

***

### database.compute.set

`sites.database.compute.set`

Set database compute settings: sets project-level compute settings for the database

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.sites.database.compute.set({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `min_cu` | `number` | No | Minimum compute units (0.25 to 16.0). Must be less than or equal to max\_cu. |
| `max_cu` | `number` | No | Maximum compute units (0.25 to 16.0). Must be greater than or equal to min\_cu. max\_cu - min\_cu must not exceed 8.0. |
| `sleep_timeout_seconds` | `number` | No | Seconds of inactivity before the compute endpoint is suspended. Use -1 for always on, or a non-negative value. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `min_cu` | `number \| null` | No | Minimum compute units |
| `max_cu` | `number \| null` | No | Maximum compute units |
| `sleep_timeout_seconds` | `number \| null` | No | Seconds of inactivity before suspension |

***

### database.create

`sites.database.create`

Create a site database: creates a new database for the specified site

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.database.create({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `region` | `string` | No | The region where the database should be created. Defaults to the site's functions region if not specified. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `connection_string` | `string \| null` | No | The connection string for the database |

***

### database.delete

`sites.database.delete`

Delete a site database: deletes the database and all associated branches and snapshots for the specified site

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.database.delete({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### database.get

`sites.database.get`

Get a site database: returns the database connection string for the specified site

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.database.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `role` | `netlifydb_owner \| netlifydb_readonly` | No | The database role to use for the connection string. Defaults to netlifydb\_owner if not specified. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `connection_string` | `string \| null` | No | The connection string for the database |

***

### database.migrations.get

`sites.database.migrations.get`

Get a database migration: returns the contents of a named migration for the specified branch

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.database.migrations.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', name: 'example-site' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `name` | `string` | Yes | The migration name |
| `branch` | `string` | No | The branch ID to look up the migration on. Defaults to the currently published deploy's branch. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `version` | `number \| null` | No | The migration version number |
| `name` | `string \| null` | No | The migration name |
| `path` | `string \| null` | No | The path to the migration file in the deploy bundle |
| `content` | `string \| null` | No | The raw contents of the migration file |

***

### database.migrations.list

`sites.database.migrations.list`

List database migrations: returns the list of migrations available for the specified branch, indicating which ones have been applied to the database

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.database.migrations.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `branch` | `string` | No | The branch ID to list migrations for. Defaults to "production" if not specified. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `migrations` | `object[] \| null` | No | List of migrations |

> [accordion] migrations full type
>
> ```ts theme={null}
> {
>   version?: number | null,
>   name?: string | null,
>   path?: string | null,
>   applied?: boolean | null
> }[] | null
> ```

***

### database.migrations.run

`sites.database.migrations.run`

Run database migrations for a deploy: runs database migrations for the specified deploy

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.database.migrations.run({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', deploy_id: '6566a2a8c0b7f6005d3a1f22' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `deploy_id` | `string` | Yes | The deploy ID to run migrations for |
| `dry_run` | `boolean` | No | If true, validates migrations without applying them. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### database.snapshots.create

`sites.database.snapshots.create`

Create a database snapshot: creates a point-in-time snapshot of a database branch

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.database.snapshots.create({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `branch_id` | `string` | No | The ID of the branch to snapshot. Defaults to "production" if not specified. |
| `name` | `string` | No | A name for the snapshot |
| `metadata` | `object` | No | Metadata associated with a snapshot |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   deploy?: {
>   },
>   source?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | The unique identifier of the snapshot |
| `source_branch_id` | `string \| null` | No | The ID of the branch that was snapshotted |
| `manual` | `boolean \| null` | No | Whether this snapshot was manually created |
| `created_at` | `string \| null` | No | When the snapshot was created |
| `expires_at` | `string \| null` | No | When the snapshot expires |
| `timestamp` | `string \| null` | No | The point-in-time timestamp of the snapshot |
| `metadata` | `object \| null` | No | Metadata associated with a snapshot |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
>   deploy?: {
>   } | null,
>   source?: string | null
> } | null
> ```

***

### database.snapshots.delete

`sites.database.snapshots.delete`

Delete a database snapshot: deletes a database snapshot

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.database.snapshots.delete({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', snapshot_id: 'snap-a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `snapshot_id` | `string` | Yes | The snapshot ID |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### database.snapshots.list

`sites.database.snapshots.list`

List database snapshots: returns all snapshots for the site's database

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.database.snapshots.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `snapshots` | `object[] \| null` | No | List of database snapshots |

> [accordion] snapshots full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   source_branch_id?: string | null,
>   manual?: boolean | null,
>   created_at?: string | null,
>   expires_at?: string | null,
>   timestamp?: string | null,
>   metadata?: {
>     deploy?: {
>     } | null,
>     source?: string | null
>   } | null
> }[] | null
> ```

***

### database.snapshots.restore

`sites.database.snapshots.restore`

Restore a database snapshot: restores a snapshot to a database branch

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.database.snapshots.restore({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', snapshot_id: 'snap-a1b2c3' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `snapshot_id` | `string` | Yes | The snapshot ID to restore |
| `branch_id` | `string` | No | The ID of the branch to restore the snapshot to. Defaults to "production" if not specified. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### delete

`sites.delete`

Permanently delete a site with all its deploys, forms, functions and settings; its netlify.app subdomain is released

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.delete({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### deployedBranches.list

`sites.deployedBranches.list`

List a site's deployed branches

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.deployedBranches.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   deploy_id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   url?: string | null,
>   ssl_url?: string | null
> }[]
> ```

***

### deploys.create

`sites.deploys.create`

Create a deploy from a file digest (`files`: path -> SHA1) and function digests, or from one `zip` of the site. Netlify answers with `required` and `required_functions` (what it still needs); upload each with deploys.uploadFile and deploys.uploadFunction, then poll deploys.get until `state` is `ready`

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.deploys.create({
	site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17',
	title: 'Deploy from Corsair',
	files: { /index.html: '907d14fb3af2b0d4f18c2d46abe8aedce17367bd' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `deploy-previews` | `boolean` | No | — |
| `production` | `boolean` | No | — |
| `state` | `new \| pending_review \| accepted \| rejected \| enqueued \| building \| uploading \| uploaded \| preparing \| prepared \| processing \| processed \| ready \| error \| retrying` | No | — |
| `branch` | `string` | No | — |
| `latest-published` | `boolean` | No | — |
| `title` | `string` | No | — |
| `files` | `object` | No | A hash mapping file paths to SHA1 digests of the file contents. |
| `zip` | `string \| object \| custom` | No | A zip of the site files, sent as the whole request body (Content-Type application/zip) instead of a `files` digest; the other body fields are then left out. |
| `draft` | `boolean` | No | — |
| `async` | `boolean` | No | — |
| `functions` | `object` | No | — |
| `edge_functions` | `object` | No | A hash mapping edge-function bundle formats to the code\_sha of each bundle. The response's required\_edge\_functions lists which of these still need to be uploaded. |
| `server` | `object` | No | The deploy's Netlify Server. A deploy has at most one. The response's required\_server says whether it still needs to be uploaded. |
| `function_schedules` | `object[]` | No | — |
| `functions_config` | `object` | No | — |
| `framework` | `string` | No | — |
| `framework_version` | `string` | No | — |
| `environment` | `object[]` | No | A list of deploy-specific environment variable data. Data specified this way applies only to this specific deploy and is merged into any existing environment variables set on the account and site. Deploy-specific environment variable data takes precedence over account and site environment variable data: For example, a deploy-specific variable with the key `NODE_ENV` will take priority over any existing site- and account-level environment variable data with the key `NODE_ENV`. Environment variable data may be provided at one of two times: - When creating a new Deploy with deploy files (most common) - When finalizing an existing Deploy with deploy files Once set, environment variables for a specific deploy cannot be modified. Subsequent attempts to modify environment variable data for a deploy will be ignored. |

> [accordion] files full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] zip full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

> [accordion] functions full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] edge\_functions full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] server full type
>
> ```ts theme={null}
> {
>   sha: string,
>   region?: string,
>   instance_size?: small | medium | large,
>   routes?: {
>     pattern?: string,
>     literal?: string,
>     expression?: string,
>     methods?: (GET | POST | PUT | PATCH | DELETE | OPTIONS)[],
>     prefer_static?: boolean
>   }[],
>   excluded_routes?: {
>     pattern?: string,
>     literal?: string,
>     expression?: string
>   }[],
>   runtime_version?: string,
>   scale?: {
>     min?: number,
>     max?: number
>   }
> }
> ```

> [accordion] function\_schedules full type
>
> ```ts theme={null}
> {
>   name?: string,
>   cron?: string
> }[]
> ```

> [accordion] functions\_config full type
>
> ```ts theme={null}
> Record<string, {
>   display_name?: string,
>   generator?: string,
>   build_data?: {
>   },
>   memory?: number,
>   routes?: {
>     pattern?: string,
>     literal?: string,
>     expression?: string,
>     methods?: (GET | POST | PUT | PATCH | DELETE | OPTIONS)[],
>     prefer_static?: boolean
>   }[],
>   excluded_routes?: {
>     pattern?: string,
>     literal?: string,
>     expression?: string
>   }[],
>   priority?: number,
>   region?: string,
>   traffic_rules?: {
>     action?: {
>       type?: string,
>       config?: {
>         to?: string,
>         rate_limit_config?: {
>           algorithm?: sliding_window,
>           window_size?: number,
>           window_limit?: number
>         },
>         aggregate?: {
>           keys?: {
>             type?: ip | domain
>           }[]
>         }
>       }
>     }
>   },
>   vcpu?: number,
>   event_subscriptions?: string[]
> }>
> ```

> [accordion] environment full type
>
> ```ts theme={null}
> {
>   key: string,
>   value: string,
>   is_secret: boolean,
>   scopes: (builds | functions | runtime | post-processing)[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `build_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `ssl_url` | `string \| null` | No | — |
| `admin_url` | `string \| null` | No | — |
| `deploy_url` | `string \| null` | No | — |
| `deploy_ssl_url` | `string \| null` | No | — |
| `screenshot_url` | `string \| null` | No | — |
| `review_id` | `number \| null` | No | — |
| `draft` | `boolean \| null` | No | — |
| `required` | `string[] \| null` | No | — |
| `required_functions` | `string[] \| null` | No | — |
| `required_edge_functions` | `string[] \| null` | No | An array of code\_shas for the edge-function bundles that need to be uploaded to complete the deploy. |
| `required_server` | `string[] \| null` | No | The SHA256 digest of the deploy's Netlify Server bundle, when it still needs to be uploaded to complete the deploy. A deploy has at most one server, so this holds either nothing or a single digest. |
| `error_message` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `commit_ref` | `string \| null` | No | — |
| `commit_url` | `string \| null` | No | — |
| `skipped` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `published_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `context` | `string \| null` | No | — |
| `locked` | `boolean \| null` | No | — |
| `review_url` | `string \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `skew_protection_token` | `string \| null` | No | — |
| `function_schedules` | `object[] \| null` | No | — |
| `functions_region` | `string \| null` | No | The functions region for this deploy as an airport code. |
| `functions_region_overrides` | `object[] \| null` | No | Functions in the deploy that explicitly specify their own region (airport code). |

> [accordion] function\_schedules full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   cron?: string | null
> }[] | null
> ```

> [accordion] functions\_region\_overrides full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   region?: string | null
> }[] | null
> ```

***

### deploys.delete

`sites.deploys.delete`

Delete a site's deploy: marks a deploy for deletion

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.deploys.delete({ deploy_id: '6566a2a8c0b7f6005d3a1f22', site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `deploy_id` | `string` | Yes | — |
| `site_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### deploys.get

`sites.deploys.get`

Get a site's deploy

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.deploys.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', deploy_id: '6566a2a8c0b7f6005d3a1f22' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `deploy_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `build_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `ssl_url` | `string \| null` | No | — |
| `admin_url` | `string \| null` | No | — |
| `deploy_url` | `string \| null` | No | — |
| `deploy_ssl_url` | `string \| null` | No | — |
| `screenshot_url` | `string \| null` | No | — |
| `review_id` | `number \| null` | No | — |
| `draft` | `boolean \| null` | No | — |
| `required` | `string[] \| null` | No | — |
| `required_functions` | `string[] \| null` | No | — |
| `required_edge_functions` | `string[] \| null` | No | An array of code\_shas for the edge-function bundles that need to be uploaded to complete the deploy. |
| `required_server` | `string[] \| null` | No | The SHA256 digest of the deploy's Netlify Server bundle, when it still needs to be uploaded to complete the deploy. A deploy has at most one server, so this holds either nothing or a single digest. |
| `error_message` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `commit_ref` | `string \| null` | No | — |
| `commit_url` | `string \| null` | No | — |
| `skipped` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `published_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `context` | `string \| null` | No | — |
| `locked` | `boolean \| null` | No | — |
| `review_url` | `string \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `skew_protection_token` | `string \| null` | No | — |
| `function_schedules` | `object[] \| null` | No | — |
| `functions_region` | `string \| null` | No | The functions region for this deploy as an airport code. |
| `functions_region_overrides` | `object[] \| null` | No | Functions in the deploy that explicitly specify their own region (airport code). |

> [accordion] function\_schedules full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   cron?: string | null
> }[] | null
> ```

> [accordion] functions\_region\_overrides full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   region?: string | null
> }[] | null
> ```

***

### deploys.list

`sites.deploys.list`

List a site's deploys, one page at a time

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.deploys.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', per_page: 10 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `deploy-previews` | `boolean` | No | — |
| `production` | `boolean` | No | — |
| `state` | `new \| pending_review \| accepted \| rejected \| enqueued \| building \| uploading \| uploaded \| preparing \| prepared \| processing \| processed \| ready \| error \| retrying` | No | — |
| `branch` | `string` | No | — |
| `latest-published` | `boolean` | No | — |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while a page came back full (per\_page entries), null once a page comes back shorter. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   user_id?: string | null,
>   build_id?: string | null,
>   state?: string | null,
>   name?: string | null,
>   url?: string | null,
>   ssl_url?: string | null,
>   admin_url?: string | null,
>   deploy_url?: string | null,
>   deploy_ssl_url?: string | null,
>   screenshot_url?: string | null,
>   review_id?: number | null,
>   draft?: boolean | null,
>   required?: string[] | null,
>   required_functions?: string[] | null,
>   required_edge_functions?: string[] | null,
>   required_server?: string[] | null,
>   error_message?: string | null,
>   branch?: string | null,
>   commit_ref?: string | null,
>   commit_url?: string | null,
>   skipped?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   title?: string | null,
>   context?: string | null,
>   locked?: boolean | null,
>   review_url?: string | null,
>   framework?: string | null,
>   skew_protection_token?: string | null,
>   function_schedules?: {
>     name?: string | null,
>     cron?: string | null
>   }[] | null,
>   functions_region?: string | null,
>   functions_region_overrides?: {
>     name?: string | null,
>     region?: string | null
>   }[] | null
> }[]
> ```

***

### deploys.restore

`sites.deploys.restore`

Restore a previous deploy: publishes a previous deploy of the site

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.deploys.restore({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', deploy_id: '6566a2a8c0b7f6005d3a1f22' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `deploy_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `build_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `ssl_url` | `string \| null` | No | — |
| `admin_url` | `string \| null` | No | — |
| `deploy_url` | `string \| null` | No | — |
| `deploy_ssl_url` | `string \| null` | No | — |
| `screenshot_url` | `string \| null` | No | — |
| `review_id` | `number \| null` | No | — |
| `draft` | `boolean \| null` | No | — |
| `required` | `string[] \| null` | No | — |
| `required_functions` | `string[] \| null` | No | — |
| `required_edge_functions` | `string[] \| null` | No | An array of code\_shas for the edge-function bundles that need to be uploaded to complete the deploy. |
| `required_server` | `string[] \| null` | No | The SHA256 digest of the deploy's Netlify Server bundle, when it still needs to be uploaded to complete the deploy. A deploy has at most one server, so this holds either nothing or a single digest. |
| `error_message` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `commit_ref` | `string \| null` | No | — |
| `commit_url` | `string \| null` | No | — |
| `skipped` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `published_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `context` | `string \| null` | No | — |
| `locked` | `boolean \| null` | No | — |
| `review_url` | `string \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `skew_protection_token` | `string \| null` | No | — |
| `function_schedules` | `object[] \| null` | No | — |
| `functions_region` | `string \| null` | No | The functions region for this deploy as an airport code. |
| `functions_region_overrides` | `object[] \| null` | No | Functions in the deploy that explicitly specify their own region (airport code). |

> [accordion] function\_schedules full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   cron?: string | null
> }[] | null
> ```

> [accordion] functions\_region\_overrides full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   region?: string | null
> }[] | null
> ```

***

### deploys.rollback

`sites.deploys.rollback`

Roll back a site's production deploy: rolls back the production deploy to the deploy referenced by its `rollback_id`

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.deploys.rollback({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### deploys.update

`sites.deploys.update`

Update a deploy

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.deploys.update({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', deploy_id: '6566a2a8c0b7f6005d3a1f22' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `deploy_id` | `string` | Yes | — |
| `commit_ref` | `string` | No | — |
| `files` | `object` | No | A hash mapping file paths to SHA1 digests of the file contents. |
| `zip` | `string \| object \| custom` | No | A zip of the site files, sent as the whole request body (Content-Type application/zip) instead of a `files` digest; the other body fields are then left out. |
| `draft` | `boolean` | No | — |
| `async` | `boolean` | No | — |
| `functions` | `object` | No | — |
| `edge_functions` | `object` | No | A hash mapping edge-function bundle formats to the code\_sha of each bundle. The response's required\_edge\_functions lists which of these still need to be uploaded. |
| `server` | `object` | No | The deploy's Netlify Server. A deploy has at most one. The response's required\_server says whether it still needs to be uploaded. |
| `function_schedules` | `object[]` | No | — |
| `functions_config` | `object` | No | — |
| `branch` | `string` | No | — |
| `framework` | `string` | No | — |
| `framework_version` | `string` | No | — |
| `environment` | `object[]` | No | A list of deploy-specific environment variable data. Data specified this way applies only to this specific deploy and is merged into any existing environment variables set on the account and site. Deploy-specific environment variable data takes precedence over account and site environment variable data: For example, a deploy-specific variable with the key `NODE_ENV` will take priority over any existing site- and account-level environment variable data with the key `NODE_ENV`. Environment variable data may be provided at one of two times: - When creating a new Deploy with deploy files (most common) - When finalizing an existing Deploy with deploy files Once set, environment variables for a specific deploy cannot be modified. Subsequent attempts to modify environment variable data for a deploy will be ignored. |

> [accordion] files full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] zip full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

> [accordion] functions full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] edge\_functions full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] server full type
>
> ```ts theme={null}
> {
>   sha: string,
>   region?: string,
>   instance_size?: small | medium | large,
>   routes?: {
>     pattern?: string,
>     literal?: string,
>     expression?: string,
>     methods?: (GET | POST | PUT | PATCH | DELETE | OPTIONS)[],
>     prefer_static?: boolean
>   }[],
>   excluded_routes?: {
>     pattern?: string,
>     literal?: string,
>     expression?: string
>   }[],
>   runtime_version?: string,
>   scale?: {
>     min?: number,
>     max?: number
>   }
> }
> ```

> [accordion] function\_schedules full type
>
> ```ts theme={null}
> {
>   name?: string,
>   cron?: string
> }[]
> ```

> [accordion] functions\_config full type
>
> ```ts theme={null}
> Record<string, {
>   display_name?: string,
>   generator?: string,
>   build_data?: {
>   },
>   memory?: number,
>   routes?: {
>     pattern?: string,
>     literal?: string,
>     expression?: string,
>     methods?: (GET | POST | PUT | PATCH | DELETE | OPTIONS)[],
>     prefer_static?: boolean
>   }[],
>   excluded_routes?: {
>     pattern?: string,
>     literal?: string,
>     expression?: string
>   }[],
>   priority?: number,
>   region?: string,
>   traffic_rules?: {
>     action?: {
>       type?: string,
>       config?: {
>         to?: string,
>         rate_limit_config?: {
>           algorithm?: sliding_window,
>           window_size?: number,
>           window_limit?: number
>         },
>         aggregate?: {
>           keys?: {
>             type?: ip | domain
>           }[]
>         }
>       }
>     }
>   },
>   vcpu?: number,
>   event_subscriptions?: string[]
> }>
> ```

> [accordion] environment full type
>
> ```ts theme={null}
> {
>   key: string,
>   value: string,
>   is_secret: boolean,
>   scopes: (builds | functions | runtime | post-processing)[]
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `build_id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `ssl_url` | `string \| null` | No | — |
| `admin_url` | `string \| null` | No | — |
| `deploy_url` | `string \| null` | No | — |
| `deploy_ssl_url` | `string \| null` | No | — |
| `screenshot_url` | `string \| null` | No | — |
| `review_id` | `number \| null` | No | — |
| `draft` | `boolean \| null` | No | — |
| `required` | `string[] \| null` | No | — |
| `required_functions` | `string[] \| null` | No | — |
| `required_edge_functions` | `string[] \| null` | No | An array of code\_shas for the edge-function bundles that need to be uploaded to complete the deploy. |
| `required_server` | `string[] \| null` | No | The SHA256 digest of the deploy's Netlify Server bundle, when it still needs to be uploaded to complete the deploy. A deploy has at most one server, so this holds either nothing or a single digest. |
| `error_message` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `commit_ref` | `string \| null` | No | — |
| `commit_url` | `string \| null` | No | — |
| `skipped` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `published_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `context` | `string \| null` | No | — |
| `locked` | `boolean \| null` | No | — |
| `review_url` | `string \| null` | No | — |
| `framework` | `string \| null` | No | — |
| `skew_protection_token` | `string \| null` | No | — |
| `function_schedules` | `object[] \| null` | No | — |
| `functions_region` | `string \| null` | No | The functions region for this deploy as an airport code. |
| `functions_region_overrides` | `object[] \| null` | No | Functions in the deploy that explicitly specify their own region (airport code). |

> [accordion] function\_schedules full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   cron?: string | null
> }[] | null
> ```

> [accordion] functions\_region\_overrides full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   region?: string | null
> }[] | null
> ```

***

### devServerHooks.create

`sites.devServerHooks.create`

Create a dev server hook

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.devServerHooks.create({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `title` | `string` | No | — |
| `branch` | `string` | No | — |
| `type` | `new_dev_server \| content_refresh` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |

***

### devServerHooks.delete

`sites.devServerHooks.delete`

Delete a dev server hook

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.devServerHooks.delete({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', id: '6566a390c0b7f6005d3a1f3e' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### devServerHooks.get

`sites.devServerHooks.get`

Get a dev server hook

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.devServerHooks.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', id: '6566a390c0b7f6005d3a1f3e' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |

***

### devServerHooks.list

`sites.devServerHooks.list`

List a site's dev server hooks

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.devServerHooks.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   title?: string | null,
>   branch?: string | null,
>   url?: string | null,
>   site_id?: string | null,
>   created_at?: string | null,
>   type?: string | null
> }[]
> ```

***

### devServerHooks.update

`sites.devServerHooks.update`

Update a dev server hook

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.devServerHooks.update({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', id: '6566a390c0b7f6005d3a1f3e' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `id` | `string` | Yes | — |
| `title` | `string` | No | — |
| `branch` | `string` | No | — |
| `type` | `new_dev_server \| content_refresh` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### devServers.create

`sites.devServers.create`

Start a dev server

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.devServers.create({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `branch` | `string` | No | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   branch?: string | null,
>   url?: string | null,
>   state?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   starting_at?: string | null,
>   error_at?: string | null,
>   live_at?: string | null,
>   done_at?: string | null,
>   title?: string | null
> }[]
> ```

***

### devServers.deleteAll

`sites.devServers.deleteAll`

Stop a branch's dev servers: stops all dev servers for a branch

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.devServers.deleteAll({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `branch` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### devServers.get

`sites.devServers.get`

Get a dev server

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.devServers.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', dev_server_id: '6566a370c0b7f6005d3a1f3a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `dev_server_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `starting_at` | `string \| null` | No | — |
| `error_at` | `string \| null` | No | — |
| `live_at` | `string \| null` | No | — |
| `done_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |

***

### devServers.list

`sites.devServers.list`

List a site's dev servers, one page at a time

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.devServers.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while a page came back full (per\_page entries), null once a page comes back shorter. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   branch?: string | null,
>   url?: string | null,
>   state?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   starting_at?: string | null,
>   error_at?: string | null,
>   live_at?: string | null,
>   done_at?: string | null,
>   title?: string | null
> }[]
> ```

***

### devServers.markActivity

`sites.devServers.markActivity`

Record dev server activity

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.devServers.markActivity({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', dev_server_id: '6566a370c0b7f6005d3a1f3a' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `dev_server_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `starting_at` | `string \| null` | No | — |
| `error_at` | `string \| null` | No | — |
| `live_at` | `string \| null` | No | — |
| `done_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |

***

### devServers.updateState

`sites.devServers.updateState`

Update a dev server's state

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.devServers.updateState({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', dev_server_id: '6566a370c0b7f6005d3a1f3a', state: 'starting' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `dev_server_id` | `string` | Yes | — |
| `state` | `starting \| live \| error \| done` | Yes | — |
| `task_id` | `string` | No | — |
| `error` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `branch` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `starting_at` | `string \| null` | No | — |
| `error_at` | `string \| null` | No | — |
| `live_at` | `string \| null` | No | — |
| `done_at` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |

***

### disable

`sites.disable`

Disable a site: disables a site, preventing it from serving content

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.sites.disable({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', reason: 'Paused for maintenance' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `reason` | `string` | Yes | Reason for disabling the site |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### dns.configure

`sites.dns.configure`

Configure a site's DNS: creates any missing DNS zones and records for the site's custom domain and domain aliases

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.dns.configure({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   errors?: string[] | null,
>   supported_record_types?: string[] | null,
>   user_id?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   records?: {
>     id?: string | null,
>     hostname?: string | null,
>     type?: string | null,
>     value?: string | null,
>     ttl?: number | null,
>     priority?: number | null,
>     dns_zone_id?: string | null,
>     site_id?: string | null,
>     flag?: number | null,
>     tag?: string | null,
>     managed?: boolean | null
>   }[] | null,
>   dns_servers?: string[] | null,
>   account_id?: string | null,
>   site_id?: string | null,
>   account_slug?: string | null,
>   account_name?: string | null,
>   domain?: string | null,
>   ipv6_enabled?: boolean | null,
>   dedicated?: boolean | null
> }[]
> ```

***

### dns.get

`sites.dns.get`

Get a site's DNS configuration

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.dns.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   errors?: string[] | null,
>   supported_record_types?: string[] | null,
>   user_id?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   records?: {
>     id?: string | null,
>     hostname?: string | null,
>     type?: string | null,
>     value?: string | null,
>     ttl?: number | null,
>     priority?: number | null,
>     dns_zone_id?: string | null,
>     site_id?: string | null,
>     flag?: number | null,
>     tag?: string | null,
>     managed?: boolean | null
>   }[] | null,
>   dns_servers?: string[] | null,
>   account_id?: string | null,
>   site_id?: string | null,
>   account_slug?: string | null,
>   account_name?: string | null,
>   domain?: string | null,
>   ipv6_enabled?: boolean | null,
>   dedicated?: boolean | null
> }[]
> ```

***

### enable

`sites.enable`

Enable a site: re-enables a site that was previously disabled by the user

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.enable({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### files.get

`sites.files.get`

Get a site file by path

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.files.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', file_path: 'index.html' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `file_path` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `path` | `string \| null` | No | — |
| `sha` | `string \| null` | No | — |
| `mime_type` | `string \| null` | No | — |
| `size` | `number \| null` | No | — |

***

### files.list

`sites.files.list`

List a site's files

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.files.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   path?: string | null,
>   sha?: string | null,
>   mime_type?: string | null,
>   size?: number | null
> }[]
> ```

***

### forms.delete

`sites.forms.delete`

Delete a form: deletes a form and all of its submissions

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.forms.delete({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', form_id: '5f3e9d0a7a2d4e0012ab34ce' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `form_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### forms.list

`sites.forms.list`

List a site's forms

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.forms.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   name?: string | null,
>   paths?: string[] | null,
>   submission_count?: number | null,
>   fields?: {
>   }[] | null,
>   created_at?: string | null
> }[]
> ```

***

### functions.list

`sites.functions.list`

Search a site's functions

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.functions.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `filter` | `string` | No | — |

**Output:** `object[] \| object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   branch?: string | null,
>   created_at?: string | null,
>   functions?: {
>   }[] | null,
>   id?: string | null,
>   log_type?: string | null,
>   provider?: string | null
> }[] | {
> }
> ```

***

### get

`sites.get`

Get a site

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `feature_flags` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `plan` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `custom_domain` | `string \| null` | No | — |
| `domain_aliases` | `string[] \| null` | No | — |
| `branch_deploy_custom_domain` | `string \| null` | No | — |
| `deploy_preview_custom_domain` | `string \| null` | No | — |
| `password` | `string \| null` | No | — |
| `notification_email` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `ssl_url` | `string \| null` | No | — |
| `admin_url` | `string \| null` | No | — |
| `screenshot_url` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `session_id` | `string \| null` | No | — |
| `ssl` | `boolean \| null` | No | — |
| `force_ssl` | `boolean \| null` | No | — |
| `managed_dns` | `boolean \| null` | No | — |
| `deploy_url` | `string \| null` | No | — |
| `published_deploy` | `object \| null` | No | — |
| `account_id` | `string \| null` | No | — |
| `account_name` | `string \| null` | No | — |
| `account_slug` | `string \| null` | No | — |
| `git_provider` | `string \| null` | No | — |
| `deploy_hook` | `string \| null` | No | — |
| `capabilities` | `object \| null` | No | Feature flags and limits of the site's plan (strings, booleans, numbers or objects). |
| `processing_settings` | `object \| null` | No | — |
| `build_settings` | `object \| null` | No | — |
| `id_domain` | `string \| null` | No | — |
| `default_hooks_data` | `object \| null` | No | — |
| `build_image` | `string \| null` | No | — |
| `prerender` | `string \| null` | No | — |
| `functions_region` | `string \| null` | No | — |
| `prevent_non_git_prod_deploys` | `boolean \| null` | No | — |
| `identity_instance_id` | `string \| null` | No | The site's Netlify Identity instance, when Identity is on (pass it to sites.identity.users.\*). |

> [accordion] published\_deploy full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   user_id?: string | null,
>   build_id?: string | null,
>   state?: string | null,
>   name?: string | null,
>   url?: string | null,
>   ssl_url?: string | null,
>   admin_url?: string | null,
>   deploy_url?: string | null,
>   deploy_ssl_url?: string | null,
>   screenshot_url?: string | null,
>   review_id?: number | null,
>   draft?: boolean | null,
>   required?: string[] | null,
>   required_functions?: string[] | null,
>   required_edge_functions?: string[] | null,
>   required_server?: string[] | null,
>   error_message?: string | null,
>   branch?: string | null,
>   commit_ref?: string | null,
>   commit_url?: string | null,
>   skipped?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   title?: string | null,
>   context?: string | null,
>   locked?: boolean | null,
>   review_url?: string | null,
>   framework?: string | null,
>   skew_protection_token?: string | null,
>   function_schedules?: {
>     name?: string | null,
>     cron?: string | null
>   }[] | null,
>   functions_region?: string | null,
>   functions_region_overrides?: {
>     name?: string | null,
>     region?: string | null
>   }[] | null
> } | null
> ```

> [accordion] capabilities full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] processing\_settings full type
>
> ```ts theme={null}
> {
>   html?: {
>     pretty_urls?: boolean | null
>   } | null
> } | null
> ```

> [accordion] build\_settings full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   provider?: string | null,
>   deploy_key_id?: string | null,
>   repo_path?: string | null,
>   repo_branch?: string | null,
>   dir?: string | null,
>   functions_dir?: string | null,
>   cmd?: string | null,
>   allowed_branches?: string[] | null,
>   public_repo?: boolean | null,
>   private_logs?: boolean | null,
>   repo_url?: string | null,
>   env?: Record<string, string> | null,
>   installation_id?: number | null,
>   stop_builds?: boolean | null
> } | null
> ```

> [accordion] default\_hooks\_data full type
>
> ```ts theme={null}
> {
>   access_token?: string | null
> } | null
> ```

***

### identity.users.get

`sites.identity.users.get`

Get an Identity user: returns one Identity user by ID

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.identity.users.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', identity_id: '6566a380c0b7f6005d3a1f3c', user_id: '6566a385c0b7f6005d3a1f3d' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `identity_id` | `string` | Yes | The site's Identity instance ID, returned as `identity_instance_id` by `getSite`. |
| `user_id` | `string` | Yes | The Identity user's UUID. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `aud` | `string \| null` | No | — |
| `role` | `string \| null` | No | — |
| `confirmed_at` | `string \| null` | No | — |
| `invited_at` | `string \| null` | No | — |
| `confirmation_sent_at` | `string \| null` | No | — |
| `recovery_sent_at` | `string \| null` | No | — |
| `email_change_sent_at` | `string \| null` | No | — |
| `last_sign_in_at` | `string \| null` | No | — |
| `app_metadata` | `object \| null` | No | — |
| `user_metadata` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

> [accordion] app\_metadata full type
>
> ```ts theme={null}
> {
>   provider?: string | null,
>   roles?: string[] | null
> } | null
> ```

> [accordion] user\_metadata full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### identity.users.lookup

`sites.identity.users.lookup`

Look up an Identity user by email: returns the one Identity user with this exact email

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.identity.users.lookup({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', identity_id: '6566a380c0b7f6005d3a1f3c', email: 'ada@example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `identity_id` | `string` | Yes | The site's Identity instance ID, returned as `identity_instance_id` by `getSite`. |
| `email` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `aud` | `string \| null` | No | — |
| `role` | `string \| null` | No | — |
| `confirmed_at` | `string \| null` | No | — |
| `invited_at` | `string \| null` | No | — |
| `confirmation_sent_at` | `string \| null` | No | — |
| `recovery_sent_at` | `string \| null` | No | — |
| `email_change_sent_at` | `string \| null` | No | — |
| `last_sign_in_at` | `string \| null` | No | — |
| `app_metadata` | `object \| null` | No | — |
| `user_metadata` | `object \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

> [accordion] app\_metadata full type
>
> ```ts theme={null}
> {
>   provider?: string | null,
>   roles?: string[] | null
> } | null
> ```

> [accordion] user\_metadata full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### list

`sites.list`

List the sites the token can see, filterable by name and by owner (`filter`: all, owner or guest), one page at a time

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.list({ filter: 'owner', per_page: 20 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | — |
| `filter` | `all \| owner \| guest` | No | — |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while a page came back full (per\_page entries), null once a page comes back shorter. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   state?: string | null,
>   plan?: string | null,
>   name?: string | null,
>   custom_domain?: string | null,
>   domain_aliases?: string[] | null,
>   branch_deploy_custom_domain?: string | null,
>   deploy_preview_custom_domain?: string | null,
>   password?: string | null,
>   notification_email?: string | null,
>   url?: string | null,
>   ssl_url?: string | null,
>   admin_url?: string | null,
>   screenshot_url?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   user_id?: string | null,
>   session_id?: string | null,
>   ssl?: boolean | null,
>   force_ssl?: boolean | null,
>   managed_dns?: boolean | null,
>   deploy_url?: string | null,
>   published_deploy?: {
>     id?: string | null,
>     site_id?: string | null,
>     user_id?: string | null,
>     build_id?: string | null,
>     state?: string | null,
>     name?: string | null,
>     url?: string | null,
>     ssl_url?: string | null,
>     admin_url?: string | null,
>     deploy_url?: string | null,
>     deploy_ssl_url?: string | null,
>     screenshot_url?: string | null,
>     review_id?: number | null,
>     draft?: boolean | null,
>     required?: string[] | null,
>     required_functions?: string[] | null,
>     required_edge_functions?: string[] | null,
>     required_server?: string[] | null,
>     error_message?: string | null,
>     branch?: string | null,
>     commit_ref?: string | null,
>     commit_url?: string | null,
>     skipped?: boolean | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     published_at?: string | null,
>     title?: string | null,
>     context?: string | null,
>     locked?: boolean | null,
>     review_url?: string | null,
>     framework?: string | null,
>     skew_protection_token?: string | null,
>     function_schedules?: {
>       name?: string | null,
>       cron?: string | null
>     }[] | null,
>     functions_region?: string | null,
>     functions_region_overrides?: {
>       name?: string | null,
>       region?: string | null
>     }[] | null
>   } | null,
>   account_id?: string | null,
>   account_name?: string | null,
>   account_slug?: string | null,
>   git_provider?: string | null,
>   deploy_hook?: string | null,
>   capabilities?: {
>   } | null,
>   processing_settings?: {
>     html?: {
>       pretty_urls?: boolean | null
>     } | null
>   } | null,
>   build_settings?: {
>     id?: number | null,
>     provider?: string | null,
>     deploy_key_id?: string | null,
>     repo_path?: string | null,
>     repo_branch?: string | null,
>     dir?: string | null,
>     functions_dir?: string | null,
>     cmd?: string | null,
>     allowed_branches?: string[] | null,
>     public_repo?: boolean | null,
>     private_logs?: boolean | null,
>     repo_url?: string | null,
>     env?: Record<string, string> | null,
>     installation_id?: number | null,
>     stop_builds?: boolean | null
>   } | null,
>   id_domain?: string | null,
>   default_hooks_data?: {
>     access_token?: string | null
>   } | null,
>   build_image?: string | null,
>   prerender?: string | null,
>   functions_region?: string | null,
>   prevent_non_git_prod_deploys?: boolean | null,
>   identity_instance_id?: string | null
> }[]
> ```

***

### metadata.get

`sites.metadata.get`

Get a site's metadata

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.metadata.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output:** *empty object*

***

### metadata.update

`sites.metadata.update`

Replace the site's metadata with the `metadata` object (`{}` clears it)

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.metadata.update({
	site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17',
	metadata: { owner: 'docs-team' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `metadata` | `object` | Yes | — |

> [accordion] metadata full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### serviceInstances.create

`sites.serviceInstances.create`

Create an add-on instance

**Risk:** `destructive`

```ts theme={null}
await corsair.netlify.api.sites.serviceInstances.create({
	site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17',
	addon: 'example-addon',
	config: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `addon` | `string` | Yes | — |
| `config` | `object` | Yes | — |

> [accordion] config full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `config` | `object \| null` | No | — |
| `external_attributes` | `object \| null` | No | — |
| `service_slug` | `string \| null` | No | — |
| `service_path` | `string \| null` | No | — |
| `service_name` | `string \| null` | No | — |
| `env` | `object \| null` | No | — |
| `snippets` | `object[] \| null` | No | — |
| `auth_url` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

> [accordion] config full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] external\_attributes full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] env full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] snippets full type
>
> ```ts theme={null}
> {
> }[] | null
> ```

***

### serviceInstances.delete

`sites.serviceInstances.delete`

Delete an add-on instance

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.serviceInstances.delete({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', addon: 'example-addon', instance_id: '6566a375c0b7f6005d3a1f3b' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `addon` | `string` | Yes | — |
| `instance_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### serviceInstances.get

`sites.serviceInstances.get`

Get an add-on instance

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.serviceInstances.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', addon: 'example-addon', instance_id: '6566a375c0b7f6005d3a1f3b' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `addon` | `string` | Yes | — |
| `instance_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `config` | `object \| null` | No | — |
| `external_attributes` | `object \| null` | No | — |
| `service_slug` | `string \| null` | No | — |
| `service_path` | `string \| null` | No | — |
| `service_name` | `string \| null` | No | — |
| `env` | `object \| null` | No | — |
| `snippets` | `object[] \| null` | No | — |
| `auth_url` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |

> [accordion] config full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] external\_attributes full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] env full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] snippets full type
>
> ```ts theme={null}
> {
> }[] | null
> ```

***

### serviceInstances.list

`sites.serviceInstances.list`

List a site's add-on instances

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.serviceInstances.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   url?: string | null,
>   config?: {
>   } | null,
>   external_attributes?: {
>   } | null,
>   service_slug?: string | null,
>   service_path?: string | null,
>   service_name?: string | null,
>   env?: {
>   } | null,
>   snippets?: {
>   }[] | null,
>   auth_url?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[]
> ```

***

### serviceInstances.update

`sites.serviceInstances.update`

Update an add-on instance

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.serviceInstances.update({
	site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17',
	addon: 'example-addon',
	instance_id: '6566a375c0b7f6005d3a1f3b',
	config: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `addon` | `string` | Yes | — |
| `instance_id` | `string` | Yes | — |
| `config` | `object` | Yes | — |

> [accordion] config full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### snippets.create

`sites.snippets.create`

Create a snippet

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.snippets.create({
	site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17',
	title: 'Analytics',
	general: '<script src="/a.js"></script>',
	general_position: 'footer',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `id` | `number` | No | — |
| `title` | `string` | No | — |
| `general` | `string` | No | — |
| `general_position` | `string` | No | — |
| `goal` | `string` | No | — |
| `goal_position` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string \| null` | No | The snippet's id (Netlify sends it as a string). |
| `site_id` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `general` | `string \| null` | No | — |
| `general_position` | `string \| null` | No | — |
| `goal` | `string \| null` | No | — |
| `goal_position` | `string \| null` | No | — |

***

### snippets.delete

`sites.snippets.delete`

Delete a snippet

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.snippets.delete({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', snippet_id: '0' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `snippet_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### snippets.get

`sites.snippets.get`

Get a snippet

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.snippets.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', snippet_id: '0' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `snippet_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string \| null` | No | The snippet's id (Netlify sends it as a string). |
| `site_id` | `string \| null` | No | — |
| `title` | `string \| null` | No | — |
| `general` | `string \| null` | No | — |
| `general_position` | `string \| null` | No | — |
| `goal` | `string \| null` | No | — |
| `goal_position` | `string \| null` | No | — |

***

### snippets.list

`sites.snippets.list`

List a site's snippets

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.snippets.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: number | string | null,
>   site_id?: string | null,
>   title?: string | null,
>   general?: string | null,
>   general_position?: string | null,
>   goal?: string | null,
>   goal_position?: string | null
> }[]
> ```

***

### snippets.update

`sites.snippets.update`

Update a snippet

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.snippets.update({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', snippet_id: '0' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `snippet_id` | `string` | Yes | — |
| `id` | `number` | No | — |
| `title` | `string` | No | — |
| `general` | `string` | No | — |
| `general_position` | `string` | No | — |
| `goal` | `string` | No | — |
| `goal_position` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### splitTests.create

`sites.splitTests.create`

Create a split test

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.splitTests.create({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `branch_tests` | `object` | No | — |

> [accordion] branch\_tests full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `path` | `string \| null` | No | — |
| `branches` | `object[] \| null` | No | — |
| `active` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `unpublished_at` | `string \| null` | No | — |

> [accordion] branches full type
>
> ```ts theme={null}
> {
> }[] | null
> ```

***

### splitTests.get

`sites.splitTests.get`

Get a split test

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.splitTests.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', split_test_id: '6566a345c0b7f6005d3a1f36' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `split_test_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `path` | `string \| null` | No | — |
| `branches` | `object[] \| null` | No | — |
| `active` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `unpublished_at` | `string \| null` | No | — |

> [accordion] branches full type
>
> ```ts theme={null}
> {
> }[] | null
> ```

***

### splitTests.list

`sites.splitTests.list`

List a site's split tests

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.splitTests.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   name?: string | null,
>   path?: string | null,
>   branches?: {
>   }[] | null,
>   active?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   unpublished_at?: string | null
> }[]
> ```

***

### splitTests.publish

`sites.splitTests.publish`

Publish a split test

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.splitTests.publish({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', split_test_id: '6566a345c0b7f6005d3a1f36' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `split_test_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### splitTests.unpublish

`sites.splitTests.unpublish`

Unpublish a split test

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.splitTests.unpublish({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', split_test_id: '6566a345c0b7f6005d3a1f36' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `split_test_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### splitTests.update

`sites.splitTests.update`

Update a split test

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.splitTests.update({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', split_test_id: '6566a345c0b7f6005d3a1f36' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `split_test_id` | `string` | Yes | — |
| `branch_tests` | `object` | No | — |

> [accordion] branch\_tests full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `site_id` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `path` | `string \| null` | No | — |
| `branches` | `object[] \| null` | No | — |
| `active` | `boolean \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `unpublished_at` | `string \| null` | No | — |

> [accordion] branches full type
>
> ```ts theme={null}
> {
> }[] | null
> ```

***

### ssl.get

`sites.ssl.get`

Get a site's TLS certificate

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.ssl.get({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `state` | `string \| null` | No | — |
| `domains` | `string[] \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `expires_at` | `string \| null` | No | — |

***

### ssl.listCertificates

`sites.ssl.listCertificates`

List TLS certificates for a site's domain: returns details about the certificates associated with a domain

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.ssl.listCertificates({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', domain: 'example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `domain` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   state?: string | null,
>   domains?: string[] | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   expires_at?: string | null
> }[]
> ```

***

### ssl.provision

`sites.ssl.provision`

Provision or update a site's TLS certificate: provisions or updates a TLS certificate for the site

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.ssl.provision({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `certificate` | `string` | No | PEM-encoded certificate. Required when updating an existing certificate. |
| `key` | `string` | No | PEM-encoded private key. Required when updating an existing certificate. |
| `ca_certificates` | `string` | No | PEM-encoded CA certificate chain. Required when updating an existing certificate. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `state` | `string \| null` | No | — |
| `domains` | `string[] \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `expires_at` | `string \| null` | No | — |

***

### submissions.list

`sites.submissions.list`

List a site's form submissions, one page at a time

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.sites.submissions.list({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', per_page: 20 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while a page came back full (per\_page entries), null once a page comes back shorter. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   number?: number | null,
>   email?: string | null,
>   name?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   company?: string | null,
>   summary?: string | null,
>   body?: string | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   site_url?: string | null
> }[]
> ```

***

### unlinkRepo

`sites.unlinkRepo`

Unlink the site from its Git repository (beta): this also deletes the deploy key, build hooks and Git notifications that came with the link

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.sites.unlinkRepo({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `plan` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `custom_domain` | `string \| null` | No | — |
| `domain_aliases` | `string[] \| null` | No | — |
| `branch_deploy_custom_domain` | `string \| null` | No | — |
| `deploy_preview_custom_domain` | `string \| null` | No | — |
| `password` | `string \| null` | No | — |
| `notification_email` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `ssl_url` | `string \| null` | No | — |
| `admin_url` | `string \| null` | No | — |
| `screenshot_url` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `session_id` | `string \| null` | No | — |
| `ssl` | `boolean \| null` | No | — |
| `force_ssl` | `boolean \| null` | No | — |
| `managed_dns` | `boolean \| null` | No | — |
| `deploy_url` | `string \| null` | No | — |
| `published_deploy` | `object \| null` | No | — |
| `account_id` | `string \| null` | No | — |
| `account_name` | `string \| null` | No | — |
| `account_slug` | `string \| null` | No | — |
| `git_provider` | `string \| null` | No | — |
| `deploy_hook` | `string \| null` | No | — |
| `capabilities` | `object \| null` | No | Feature flags and limits of the site's plan (strings, booleans, numbers or objects). |
| `processing_settings` | `object \| null` | No | — |
| `build_settings` | `object \| null` | No | — |
| `id_domain` | `string \| null` | No | — |
| `default_hooks_data` | `object \| null` | No | — |
| `build_image` | `string \| null` | No | — |
| `prerender` | `string \| null` | No | — |
| `functions_region` | `string \| null` | No | — |
| `prevent_non_git_prod_deploys` | `boolean \| null` | No | — |
| `identity_instance_id` | `string \| null` | No | The site's Netlify Identity instance, when Identity is on (pass it to sites.identity.users.\*). |

> [accordion] published\_deploy full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   user_id?: string | null,
>   build_id?: string | null,
>   state?: string | null,
>   name?: string | null,
>   url?: string | null,
>   ssl_url?: string | null,
>   admin_url?: string | null,
>   deploy_url?: string | null,
>   deploy_ssl_url?: string | null,
>   screenshot_url?: string | null,
>   review_id?: number | null,
>   draft?: boolean | null,
>   required?: string[] | null,
>   required_functions?: string[] | null,
>   required_edge_functions?: string[] | null,
>   required_server?: string[] | null,
>   error_message?: string | null,
>   branch?: string | null,
>   commit_ref?: string | null,
>   commit_url?: string | null,
>   skipped?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   title?: string | null,
>   context?: string | null,
>   locked?: boolean | null,
>   review_url?: string | null,
>   framework?: string | null,
>   skew_protection_token?: string | null,
>   function_schedules?: {
>     name?: string | null,
>     cron?: string | null
>   }[] | null,
>   functions_region?: string | null,
>   functions_region_overrides?: {
>     name?: string | null,
>     region?: string | null
>   }[] | null
> } | null
> ```

> [accordion] capabilities full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] processing\_settings full type
>
> ```ts theme={null}
> {
>   html?: {
>     pretty_urls?: boolean | null
>   } | null
> } | null
> ```

> [accordion] build\_settings full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   provider?: string | null,
>   deploy_key_id?: string | null,
>   repo_path?: string | null,
>   repo_branch?: string | null,
>   dir?: string | null,
>   functions_dir?: string | null,
>   cmd?: string | null,
>   allowed_branches?: string[] | null,
>   public_repo?: boolean | null,
>   private_logs?: boolean | null,
>   repo_url?: string | null,
>   env?: Record<string, string> | null,
>   installation_id?: number | null,
>   stop_builds?: boolean | null
> } | null
> ```

> [accordion] default\_hooks\_data full type
>
> ```ts theme={null}
> {
>   access_token?: string | null
> } | null
> ```

***

### update

`sites.update`

Update a site

**Risk:** `write`

```ts theme={null}
await corsair.netlify.api.sites.update({ site_id: '5b2f8a51-7c1e-4d8a-9f43-2b6e1c0a9d17', name: 'acme-docs-v2' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `site_id` | `string` | Yes | — |
| `id` | `string` | No | — |
| `state` | `string` | No | — |
| `plan` | `string` | No | — |
| `name` | `string` | No | — |
| `custom_domain` | `string` | No | — |
| `domain_aliases` | `string[]` | No | — |
| `branch_deploy_custom_domain` | `string` | No | — |
| `deploy_preview_custom_domain` | `string` | No | — |
| `password` | `string` | No | — |
| `notification_email` | `string` | No | — |
| `url` | `string` | No | — |
| `ssl_url` | `string` | No | — |
| `admin_url` | `string` | No | — |
| `screenshot_url` | `string` | No | — |
| `created_at` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `user_id` | `string` | No | — |
| `session_id` | `string` | No | — |
| `ssl` | `boolean` | No | — |
| `force_ssl` | `boolean` | No | — |
| `managed_dns` | `boolean` | No | — |
| `deploy_url` | `string` | No | — |
| `published_deploy` | `object` | No | — |
| `account_id` | `string` | No | — |
| `account_name` | `string` | No | — |
| `account_slug` | `string` | No | — |
| `git_provider` | `string` | No | — |
| `deploy_hook` | `string` | No | — |
| `capabilities` | `object` | No | — |
| `processing_settings` | `object` | No | — |
| `build_settings` | `object` | No | — |
| `id_domain` | `string` | No | — |
| `default_hooks_data` | `object` | No | — |
| `build_image` | `string` | No | — |
| `prerender` | `string` | No | — |
| `functions_region` | `string` | No | — |
| `prevent_non_git_prod_deploys` | `boolean` | No | — |
| `repo` | `object` | No | — |

> [accordion] published\_deploy full type
>
> ```ts theme={null}
> {
>   id?: string,
>   site_id?: string,
>   user_id?: string,
>   build_id?: string,
>   state?: string,
>   name?: string,
>   url?: string,
>   ssl_url?: string,
>   admin_url?: string,
>   deploy_url?: string,
>   deploy_ssl_url?: string,
>   screenshot_url?: string,
>   review_id?: number,
>   draft?: boolean,
>   required?: string[],
>   required_functions?: string[],
>   required_edge_functions?: string[],
>   required_server?: string[],
>   error_message?: string,
>   branch?: string,
>   commit_ref?: string,
>   commit_url?: string,
>   skipped?: boolean,
>   created_at?: string,
>   updated_at?: string,
>   published_at?: string,
>   title?: string,
>   context?: string,
>   locked?: boolean,
>   review_url?: string,
>   framework?: string,
>   skew_protection_token?: string,
>   function_schedules?: {
>     name?: string,
>     cron?: string
>   }[],
>   functions_region?: string,
>   functions_region_overrides?: {
>     name?: string,
>     region?: string
>   }[]
> }
> ```

> [accordion] capabilities full type
>
> ```ts theme={null}
> Record<string, {
> }>
> ```

> [accordion] processing\_settings full type
>
> ```ts theme={null}
> {
>   html?: {
>     pretty_urls?: boolean
>   }
> }
> ```

> [accordion] build\_settings full type
>
> ```ts theme={null}
> {
>   id?: number,
>   provider?: string,
>   deploy_key_id?: string,
>   repo_path?: string,
>   repo_branch?: string,
>   dir?: string,
>   functions_dir?: string,
>   cmd?: string,
>   allowed_branches?: string[],
>   public_repo?: boolean,
>   private_logs?: boolean,
>   repo_url?: string,
>   env?: Record<string, string>,
>   installation_id?: number,
>   stop_builds?: boolean
> }
> ```

> [accordion] default\_hooks\_data full type
>
> ```ts theme={null}
> {
>   access_token?: string
> }
> ```

> [accordion] repo full type
>
> ```ts theme={null}
> {
>   id?: number,
>   provider?: string,
>   deploy_key_id?: string,
>   repo_path?: string,
>   repo_branch?: string,
>   dir?: string,
>   functions_dir?: string,
>   cmd?: string,
>   allowed_branches?: string[],
>   public_repo?: boolean,
>   private_logs?: boolean,
>   repo_url?: string,
>   env?: Record<string, string>,
>   installation_id?: number,
>   stop_builds?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `state` | `string \| null` | No | — |
| `plan` | `string \| null` | No | — |
| `name` | `string \| null` | No | — |
| `custom_domain` | `string \| null` | No | — |
| `domain_aliases` | `string[] \| null` | No | — |
| `branch_deploy_custom_domain` | `string \| null` | No | — |
| `deploy_preview_custom_domain` | `string \| null` | No | — |
| `password` | `string \| null` | No | — |
| `notification_email` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |
| `ssl_url` | `string \| null` | No | — |
| `admin_url` | `string \| null` | No | — |
| `screenshot_url` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `user_id` | `string \| null` | No | — |
| `session_id` | `string \| null` | No | — |
| `ssl` | `boolean \| null` | No | — |
| `force_ssl` | `boolean \| null` | No | — |
| `managed_dns` | `boolean \| null` | No | — |
| `deploy_url` | `string \| null` | No | — |
| `published_deploy` | `object \| null` | No | — |
| `account_id` | `string \| null` | No | — |
| `account_name` | `string \| null` | No | — |
| `account_slug` | `string \| null` | No | — |
| `git_provider` | `string \| null` | No | — |
| `deploy_hook` | `string \| null` | No | — |
| `capabilities` | `object \| null` | No | Feature flags and limits of the site's plan (strings, booleans, numbers or objects). |
| `processing_settings` | `object \| null` | No | — |
| `build_settings` | `object \| null` | No | — |
| `id_domain` | `string \| null` | No | — |
| `default_hooks_data` | `object \| null` | No | — |
| `build_image` | `string \| null` | No | — |
| `prerender` | `string \| null` | No | — |
| `functions_region` | `string \| null` | No | — |
| `prevent_non_git_prod_deploys` | `boolean \| null` | No | — |
| `identity_instance_id` | `string \| null` | No | The site's Netlify Identity instance, when Identity is on (pass it to sites.identity.users.\*). |

> [accordion] published\_deploy full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   site_id?: string | null,
>   user_id?: string | null,
>   build_id?: string | null,
>   state?: string | null,
>   name?: string | null,
>   url?: string | null,
>   ssl_url?: string | null,
>   admin_url?: string | null,
>   deploy_url?: string | null,
>   deploy_ssl_url?: string | null,
>   screenshot_url?: string | null,
>   review_id?: number | null,
>   draft?: boolean | null,
>   required?: string[] | null,
>   required_functions?: string[] | null,
>   required_edge_functions?: string[] | null,
>   required_server?: string[] | null,
>   error_message?: string | null,
>   branch?: string | null,
>   commit_ref?: string | null,
>   commit_url?: string | null,
>   skipped?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   title?: string | null,
>   context?: string | null,
>   locked?: boolean | null,
>   review_url?: string | null,
>   framework?: string | null,
>   skew_protection_token?: string | null,
>   function_schedules?: {
>     name?: string | null,
>     cron?: string | null
>   }[] | null,
>   functions_region?: string | null,
>   functions_region_overrides?: {
>     name?: string | null,
>     region?: string | null
>   }[] | null
> } | null
> ```

> [accordion] capabilities full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] processing\_settings full type
>
> ```ts theme={null}
> {
>   html?: {
>     pretty_urls?: boolean | null
>   } | null
> } | null
> ```

> [accordion] build\_settings full type
>
> ```ts theme={null}
> {
>   id?: number | null,
>   provider?: string | null,
>   deploy_key_id?: string | null,
>   repo_path?: string | null,
>   repo_branch?: string | null,
>   dir?: string | null,
>   functions_dir?: string | null,
>   cmd?: string | null,
>   allowed_branches?: string[] | null,
>   public_repo?: boolean | null,
>   private_logs?: boolean | null,
>   repo_url?: string | null,
>   env?: Record<string, string> | null,
>   installation_id?: number | null,
>   stop_builds?: boolean | null
> } | null
> ```

> [accordion] default\_hooks\_data full type
>
> ```ts theme={null}
> {
>   access_token?: string | null
> } | null
> ```

***

## Submissions

### delete

`submissions.delete`

Delete a form submission

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.netlify.api.submissions.delete({ submission_id: '6566a30fc0b7f6005d3a1f30' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `submission_id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Netlify accepted the call; it answered with no body. |

***

### get

`submissions.get`

Get a form submission, one page at a time

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.submissions.get({ submission_id: '6566a30fc0b7f6005d3a1f30' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `submission_id` | `string` | Yes | — |
| `query` | `string` | No | — |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `items` | `object[]` | Yes | One page of results. |
| `next_page` | `number \| null` | Yes | The page to ask for next: set while a page came back full (per\_page entries), null once a page comes back shorter. |

> [accordion] items full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   number?: number | null,
>   email?: string | null,
>   name?: string | null,
>   first_name?: string | null,
>   last_name?: string | null,
>   company?: string | null,
>   summary?: string | null,
>   body?: string | null,
>   data?: {
>   } | null,
>   created_at?: string | null,
>   site_url?: string | null
> }[]
> ```

***

## User

### me

`user.me`

Get the user the token belongs to: name, email, teams and connected accounts

**Risk:** `read`

```ts theme={null}
await corsair.netlify.api.user.me({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `uid` | `string \| null` | No | — |
| `full_name` | `string \| null` | No | — |
| `avatar_url` | `string \| null` | No | — |
| `email` | `string \| null` | No | — |
| `affiliate_id` | `string \| null` | No | — |
| `site_count` | `number \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `last_login` | `string \| null` | No | — |
| `login_providers` | `string[] \| null` | No | — |
| `onboarding_progress` | `object \| null` | No | — |

> [accordion] onboarding\_progress full type
>
> ```ts theme={null}
> {
>   slides?: string | null
> } | null
> ```

***


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