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

# API

> API reference for Cloudflare API token: every `cloudflareapikey.api.*` operation with input and output types.

Every `cloudflareapikey.api.*` operation is listed below with parameter shapes and return types from the plugin Zod schemas.

<Info>
  **New to Corsair?** See [API access](/concepts/api), [authentication](/concepts/auth), and [error handling](/concepts/error-handling).
</Info>

## Cache

### getRegionalTieredCache

`cache.getRegionalTieredCache`

Get the regional tiered cache setting for a zone

**Risk:** `read`

```ts theme={null}
await corsair.cloudflareapikey.api.cache.getRegionalTieredCache({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `tc_regional \| string` | Yes | — |
| `editable` | `boolean` | No | — |
| `value` | `on \| off` | Yes | — |
| `modified_on` | `string` | No | — |

***

## Dns

### create

`dns.create`

Create a DNS record in a zone

**Risk:** `write`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone_id` | `string` | Yes | — |
| `type` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `content` | `string` | Yes | — |
| `ttl` | `number` | No | — |
| `proxied` | `boolean` | No | — |
| `priority` | `number` | No | — |
| `comment` | `string` | No | — |
| `tags` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `zone_id` | `string` | No | — |
| `zone_name` | `string` | No | — |
| `type` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `content` | `string` | Yes | — |
| `proxiable` | `boolean` | No | — |
| `proxied` | `boolean` | No | — |
| `ttl` | `number` | No | — |
| `priority` | `number` | No | — |
| `locked` | `boolean` | No | — |
| `created_on` | `string` | No | — |
| `modified_on` | `string` | No | — |

***

### delete

`dns.delete`

Delete a DNS record \[DESTRUCTIVE]

**Risk:** `destructive`

```ts theme={null}
await corsair.cloudflareapikey.api.dns.delete({});
```

**Input**

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

**Output**

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

***

### list

`dns.list`

List, search, sort, and filter DNS records for a zone

**Risk:** `read`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |
| `zone_id` | `string` | Yes | — |
| `type` | `string` | No | — |
| `name` | `string` | No | — |
| `content` | `string` | No | — |
| `proxied` | `boolean` | No | — |
| `search` | `string` | No | — |
| `direction` | `asc \| desc` | No | — |
| `order` | `string` | No | — |
| `match` | `any \| all` | No | — |

**Output:** `object[]`

<AccordionGroup>
  <Accordion title="Output full type">
    ```ts theme={null}
    {
      id: string,
      zone_id?: string,
      zone_name?: string,
      type: string,
      name: string,
      content: string,
      proxiable?: boolean,
      proxied?: boolean,
      ttl?: number,
      priority?: number,
      locked?: boolean,
      created_on?: string,
      modified_on?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### overwrite

`dns.overwrite`

Completely overwrite a DNS record

**Risk:** `write`

```ts theme={null}
await corsair.cloudflareapikey.api.dns.overwrite({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone_id` | `string` | Yes | — |
| `dns_record_id` | `string` | Yes | — |
| `type` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `content` | `string` | Yes | — |
| `ttl` | `number` | No | — |
| `proxied` | `boolean` | No | — |
| `priority` | `number` | No | — |
| `comment` | `string` | No | — |
| `tags` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `zone_id` | `string` | No | — |
| `zone_name` | `string` | No | — |
| `type` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `content` | `string` | Yes | — |
| `proxiable` | `boolean` | No | — |
| `proxied` | `boolean` | No | — |
| `ttl` | `number` | No | — |
| `priority` | `number` | No | — |
| `locked` | `boolean` | No | — |
| `created_on` | `string` | No | — |
| `modified_on` | `string` | No | — |

***

## Dnssec

### delete

`dnssec.delete`

Delete DNSSEC configuration for a zone \[DESTRUCTIVE]

**Risk:** `destructive`

```ts theme={null}
await corsair.cloudflareapikey.api.dnssec.delete({});
```

**Input**

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

**Output:** `string`

***

### update

`dnssec.update`

Enable or disable DNSSEC for a zone

**Risk:** `write`

```ts theme={null}
await corsair.cloudflareapikey.api.dnssec.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone_id` | `string` | Yes | — |
| `status` | `active \| disabled` | No | — |
| `dnssec_multi_signer` | `boolean` | No | — |
| `dnssec_presigned` | `boolean` | No | — |
| `dnssec_use_nsec3` | `boolean` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | No | — |
| `algorithm` | `string` | No | — |
| `digest` | `string` | No | — |
| `digest_algorithm` | `string` | No | — |
| `digest_type` | `string` | No | — |
| `ds` | `string` | No | — |
| `flags` | `number` | No | — |
| `key_tag` | `number` | No | — |
| `key_type` | `string` | No | — |
| `public_key` | `string` | No | — |
| `dnssec_multi_signer` | `boolean` | No | — |
| `dnssec_presigned` | `boolean` | No | — |
| `dnssec_use_nsec3` | `boolean` | No | — |
| `modified_on` | `string` | No | — |

***

## Ips

### get

`ips.get`

Retrieve Cloudflare or JD Cloud IP CIDR blocks

**Risk:** `read`

```ts theme={null}
await corsair.cloudflareapikey.api.ips.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string` | No | — |
| `ipv4_cidrs` | `string[]` | No | — |
| `ipv6_cidrs` | `string[]` | No | — |
| `jdcloud_cidrs` | `string[]` | No | — |

***

## Lockdowns

### create

`lockdowns.create`

Create a Zone Lockdown rule

**Risk:** `write`

```ts theme={null}
await corsair.cloudflareapikey.api.lockdowns.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone_id` | `string` | Yes | — |
| `urls` | `string[]` | Yes | — |
| `configurations` | `object[]` | Yes | — |
| `description` | `string` | No | — |
| `paused` | `boolean` | No | — |
| `priority` | `number` | No | — |

<AccordionGroup>
  <Accordion title="configurations full type">
    ```ts theme={null}
    {
      target?: ip | ip_range,
      value?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `urls` | `string[]` | Yes | — |
| `configurations` | `object[]` | Yes | — |
| `description` | `string` | No | — |
| `paused` | `boolean` | No | — |
| `priority` | `number` | No | — |
| `created_on` | `string` | No | — |
| `modified_on` | `string` | No | — |

<AccordionGroup>
  <Accordion title="configurations full type">
    ```ts theme={null}
    {
      target?: ip | ip_range,
      value?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### get

`lockdowns.get`

Get a Zone Lockdown rule by ID

**Risk:** `read`

```ts theme={null}
await corsair.cloudflareapikey.api.lockdowns.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `urls` | `string[]` | Yes | — |
| `configurations` | `object[]` | Yes | — |
| `description` | `string` | No | — |
| `paused` | `boolean` | No | — |
| `priority` | `number` | No | — |
| `created_on` | `string` | No | — |
| `modified_on` | `string` | No | — |

<AccordionGroup>
  <Accordion title="configurations full type">
    ```ts theme={null}
    {
      target?: ip | ip_range,
      value?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### update

`lockdowns.update`

Update a Zone Lockdown rule

**Risk:** `write`

```ts theme={null}
await corsair.cloudflareapikey.api.lockdowns.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone_id` | `string` | Yes | — |
| `lockdown_id` | `string` | Yes | — |
| `urls` | `string[]` | No | — |
| `configurations` | `object[]` | No | — |
| `description` | `string` | No | — |
| `paused` | `boolean` | No | — |
| `priority` | `number` | No | — |

<AccordionGroup>
  <Accordion title="configurations full type">
    ```ts theme={null}
    {
      target?: ip | ip_range,
      value?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `urls` | `string[]` | Yes | — |
| `configurations` | `object[]` | Yes | — |
| `description` | `string` | No | — |
| `paused` | `boolean` | No | — |
| `priority` | `number` | No | — |
| `created_on` | `string` | No | — |
| `modified_on` | `string` | No | — |

<AccordionGroup>
  <Accordion title="configurations full type">
    ```ts theme={null}
    {
      target?: ip | ip_range,
      value?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Rulesets

### create

`rulesets.create`

Create a ruleset at account or zone scope

**Risk:** `write`

```ts theme={null}
await corsair.cloudflareapikey.api.rulesets.create({});
```

**Input:** `object`

<AccordionGroup>
  <Accordion title="Input full type">
    ```ts theme={null}
    {
      account_id?: string,
      zone_id?: string
    }& {
      name: string,
      kind: string,
      phase: string,
      description?: string,
      rules?: {
      }[]
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `description` | `string` | No | — |
| `kind` | `string` | Yes | — |
| `version` | `string` | No | — |
| `last_updated` | `string` | No | — |
| `phase` | `string` | Yes | — |
| `rules` | `object[]` | No | — |

<AccordionGroup>
  <Accordion title="rules full type">
    ```ts theme={null}
    {
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### createRule

`rulesets.createRule`

Add a rule to an existing ruleset

**Risk:** `write`

```ts theme={null}
await corsair.cloudflareapikey.api.rulesets.createRule({});
```

**Input:** `object`

<AccordionGroup>
  <Accordion title="Input full type">
    ```ts theme={null}
    {
      account_id?: string,
      zone_id?: string
    }& {
      ruleset_id: string,
      action: string,
      expression: string,
      description?: string,
      enabled?: boolean,
      action_parameters?: {
      },
      position?: {
        index?: number,
        before?: string,
        after?: string
      }
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `description` | `string` | No | — |
| `kind` | `string` | Yes | — |
| `version` | `string` | No | — |
| `last_updated` | `string` | No | — |
| `phase` | `string` | Yes | — |
| `rules` | `object[]` | No | — |

<AccordionGroup>
  <Accordion title="rules full type">
    ```ts theme={null}
    {
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### delete

`rulesets.delete`

Delete all versions of a ruleset \[DESTRUCTIVE]

**Risk:** `destructive`

```ts theme={null}
await corsair.cloudflareapikey.api.rulesets.delete({});
```

**Input:** `object`

<AccordionGroup>
  <Accordion title="Input full type">
    ```ts theme={null}
    {
      account_id?: string,
      zone_id?: string
    }& {
      ruleset_id: string
    }
    ```
  </Accordion>
</AccordionGroup>

**Output:** `null`

***

### deleteRule

`rulesets.deleteRule`

Delete a rule from a ruleset \[DESTRUCTIVE]

**Risk:** `destructive`

```ts theme={null}
await corsair.cloudflareapikey.api.rulesets.deleteRule({});
```

**Input:** `object`

<AccordionGroup>
  <Accordion title="Input full type">
    ```ts theme={null}
    {
      account_id?: string,
      zone_id?: string
    }& {
      ruleset_id: string,
      rule_id: string
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `description` | `string` | No | — |
| `kind` | `string` | Yes | — |
| `version` | `string` | No | — |
| `last_updated` | `string` | No | — |
| `phase` | `string` | Yes | — |
| `rules` | `object[]` | No | — |

<AccordionGroup>
  <Accordion title="rules full type">
    ```ts theme={null}
    {
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### get

`rulesets.get`

Fetch the latest version of a ruleset by ID

**Risk:** `read`

```ts theme={null}
await corsair.cloudflareapikey.api.rulesets.get({});
```

**Input:** `object`

<AccordionGroup>
  <Accordion title="Input full type">
    ```ts theme={null}
    {
      account_id?: string,
      zone_id?: string
    }& {
      ruleset_id: string
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `description` | `string` | No | — |
| `kind` | `string` | Yes | — |
| `version` | `string` | No | — |
| `last_updated` | `string` | No | — |
| `phase` | `string` | Yes | — |
| `rules` | `object[]` | No | — |

<AccordionGroup>
  <Accordion title="rules full type">
    ```ts theme={null}
    {
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### getEntrypointVersion

`rulesets.getEntrypointVersion`

Get a historical entrypoint ruleset version

**Risk:** `read`

```ts theme={null}
await corsair.cloudflareapikey.api.rulesets.getEntrypointVersion({});
```

**Input:** `object`

<AccordionGroup>
  <Accordion title="Input full type">
    ```ts theme={null}
    {
      account_id?: string,
      zone_id?: string
    }& {
      ruleset_phase: string,
      ruleset_version: string
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `description` | `string` | No | — |
| `kind` | `string` | Yes | — |
| `version` | `string` | No | — |
| `last_updated` | `string` | No | — |
| `phase` | `string` | Yes | — |
| `rules` | `object[]` | No | — |

<AccordionGroup>
  <Accordion title="rules full type">
    ```ts theme={null}
    {
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### update

`rulesets.update`

Update a ruleset (include every rule you want to keep)

**Risk:** `write`

```ts theme={null}
await corsair.cloudflareapikey.api.rulesets.update({});
```

**Input:** `object`

<AccordionGroup>
  <Accordion title="Input full type">
    ```ts theme={null}
    {
      account_id?: string,
      zone_id?: string
    }& {
      ruleset_id: string,
      name?: string,
      description?: string,
      rules: {
      }[]
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `description` | `string` | No | — |
| `kind` | `string` | Yes | — |
| `version` | `string` | No | — |
| `last_updated` | `string` | No | — |
| `phase` | `string` | Yes | — |
| `rules` | `object[]` | No | — |

<AccordionGroup>
  <Accordion title="rules full type">
    ```ts theme={null}
    {
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### updateRule

`rulesets.updateRule`

Update a specific rule in a ruleset

**Risk:** `write`

```ts theme={null}
await corsair.cloudflareapikey.api.rulesets.updateRule({});
```

**Input:** `object`

<AccordionGroup>
  <Accordion title="Input full type">
    ```ts theme={null}
    {
      account_id?: string,
      zone_id?: string
    }& {
      ruleset_id: string,
      rule_id: string,
      action?: string,
      expression?: string,
      description?: string,
      enabled?: boolean,
      action_parameters?: {
      },
      position?: {
        index?: number,
        before?: string,
        after?: string
      }
    }
    ```
  </Accordion>
</AccordionGroup>

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `description` | `string` | No | — |
| `kind` | `string` | Yes | — |
| `version` | `string` | No | — |
| `last_updated` | `string` | No | — |
| `phase` | `string` | Yes | — |
| `rules` | `object[]` | No | — |

<AccordionGroup>
  <Accordion title="rules full type">
    ```ts theme={null}
    {
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## S3

### upload

`s3.upload`

Upload file content to an R2 bucket (S3-compatible object storage)

**Risk:** `write`

```ts theme={null}
await corsair.cloudflareapikey.api.s3.upload({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `account_id` | `string` | Yes | — |
| `bucket_name` | `string` | Yes | — |
| `object_key` | `string` | Yes | — |
| `content` | `string` | Yes | — |
| `content_type` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `etag` | `string` | No | — |
| `key` | `string` | No | — |
| `size` | `string \| number` | No | — |
| `storage_class` | `string` | No | — |
| `uploaded` | `string` | No | — |
| `version` | `string` | No | — |

***

## Zones

### delete

`zones.delete`

Delete an existing zone \[DESTRUCTIVE]

**Risk:** `destructive`

```ts theme={null}
await corsair.cloudflareapikey.api.zones.delete({});
```

**Input**

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

**Output**

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

***

### get

`zones.get`

Get details for a specific zone

**Risk:** `read`

```ts theme={null}
await corsair.cloudflareapikey.api.zones.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `status` | `string` | No | — |
| `paused` | `boolean` | No | — |
| `type` | `string` | No | — |
| `account` | `object` | No | — |
| `name_servers` | `string[]` | No | — |
| `original_name_servers` | `string[]` | No | — |
| `vanity_name_servers` | `string[]` | No | — |
| `created_on` | `string` | No | — |
| `modified_on` | `string` | No | — |
| `activated_on` | `string` | No | — |

<AccordionGroup>
  <Accordion title="account full type">
    ```ts theme={null}
    {
      id: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### list

`zones.list`

List, search, sort, and filter Cloudflare zones

**Risk:** `read`

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

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `number` | No | — |
| `per_page` | `number` | No | — |
| `name` | `string` | No | — |
| `status` | `string` | No | — |
| `account_id` | `string` | No | — |
| `direction` | `asc \| desc` | No | — |
| `order` | `string` | No | — |
| `match` | `any \| all` | No | — |

**Output:** `object[]`

<AccordionGroup>
  <Accordion title="Output full type">
    ```ts theme={null}
    {
      id: string,
      name: string,
      status?: string,
      paused?: boolean,
      type?: string,
      account?: {
        id: string
      },
      name_servers?: string[],
      original_name_servers?: string[],
      vanity_name_servers?: string[],
      created_on?: string,
      modified_on?: string,
      activated_on?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### rerunActivationCheck

`zones.rerunActivationCheck`

Trigger a new activation check for a pending zone

**Risk:** `write`

```ts theme={null}
await corsair.cloudflareapikey.api.zones.rerunActivationCheck({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `status` | `string` | No | — |
| `paused` | `boolean` | No | — |
| `type` | `string` | No | — |
| `account` | `object` | No | — |
| `name_servers` | `string[]` | No | — |
| `original_name_servers` | `string[]` | No | — |
| `vanity_name_servers` | `string[]` | No | — |
| `created_on` | `string` | No | — |
| `modified_on` | `string` | No | — |
| `activated_on` | `string` | No | — |

<AccordionGroup>
  <Accordion title="account full type">
    ```ts theme={null}
    {
      id: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### update

`zones.update`

Edit a Cloudflare zone (one of paused, type, or vanity\_name\_servers)

**Risk:** `write`

```ts theme={null}
await corsair.cloudflareapikey.api.zones.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `zone_id` | `string` | Yes | — |
| `paused` | `boolean` | No | — |
| `type` | `string` | No | — |
| `vanity_name_servers` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `status` | `string` | No | — |
| `paused` | `boolean` | No | — |
| `type` | `string` | No | — |
| `account` | `object` | No | — |
| `name_servers` | `string[]` | No | — |
| `original_name_servers` | `string[]` | No | — |
| `vanity_name_servers` | `string[]` | No | — |
| `created_on` | `string` | No | — |
| `modified_on` | `string` | No | — |
| `activated_on` | `string` | No | — |

<AccordionGroup>
  <Accordion title="account full type">
    ```ts theme={null}
    {
      id: string
    }
    ```
  </Accordion>
</AccordionGroup>

***


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