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

# ngrok API reference

> API reference for the ngrok plugin in Corsair: every `ngrok.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).

## Api Keys

### create

`apiKeys.create`

Mint an API key; the token is returned once in this response and never again, so it must be stored now

**Risk:** `write`

```ts theme={null}
await corsair.ngrok.api.apiKeys.create({ description: 'CI deploy' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `description` | `string` | No | — |
| `metadata` | `string` | No | — |
| `owner_id` | `string` | No | Create the key for this user instead of the caller. |

The token appears only in this response and never on a later read, so store it now.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `metadata` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `token` | `string \| null` | No | — |
| `owner_id` | `string \| null` | No | — |

***

### delete

`apiKeys.delete`

Revoke an API key permanently; anything still using it stops authenticating

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

```ts theme={null}
await corsair.ngrok.api.apiKeys.delete({ id: 'ak_2f1c8d9e3a5b4c6d' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The resource id. |

**Output**

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

***

### list

`apiKeys.list`

List the account’s API keys without their tokens, with owner and creation time

**Risk:** `read`

```ts theme={null}
await corsair.ngrok.api.apiKeys.list({ limit: 10 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `before_id` | `string` | No | The page cursor: the before\_id from the last next\_page\_uri, or that whole URL. |
| `limit` | `number` | No | Most results to return. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `keys` | `object[]` | Yes | — |
| `uri` | `string \| null` | No | — |
| `next_page_uri` | `string \| null` | No | — |

> [accordion] keys full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null,
>   description?: string | null,
>   metadata?: string | null,
>   created_at?: string | null,
>   token?: string | null,
>   owner_id?: string | null
> }[]
> ```

***

## Domains

### create

`domains.create`

Reserve a hostname and return the CNAME target to point DNS at; certificate issuance starts once it resolves

**Risk:** `write`

```ts theme={null}
await corsair.ngrok.api.domains.create({ domain: 'acme.example.com', description: 'Acme production' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `domain` | `string` | Yes | The hostname to reserve, e.g. app.example.com. |
| `region` | `string` | No | — |
| `description` | `string` | No | — |
| `metadata` | `string` | No | — |
| `certificate_id` | `string` | No | Attach an uploaded certificate instead of an automatic one. |
| `certificate_management_policy` | `object` | No | Automatic certificate issuance and renewal; an empty object takes the defaults. |
| `resolves_to` | `object[]` | No | Only serve the domain from these points of presence, e.g. \[\{ value: 'us-cal-1' }, \{ value: 'eu' }]. |

Reserving returns a cname\_target to point DNS at; certificate issuance starts once the record resolves.

> [accordion] certificate\_management\_policy full type
>
> ```ts theme={null}
> {
>   authority?: string,
>   private_key_type?: string
> }
> ```

> [accordion] resolves\_to full type
>
> ```ts theme={null}
> {
>   value: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `metadata` | `string \| null` | No | — |
| `domain` | `string \| null` | No | — |
| `region` | `string \| null` | No | — |
| `cname_target` | `string \| null` | No | — |
| `certificate` | `object \| null` | No | — |
| `certificate_management_policy` | `object \| null` | No | — |
| `resolves_to` | `object[] \| null` | No | — |
| `is_dev` | `boolean \| null` | No | — |
| `certificate_management_status` | `object \| null` | No | — |
| `acme_challenge_cname_target` | `string \| null` | No | — |

> [accordion] certificate full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] certificate\_management\_policy full type
>
> ```ts theme={null}
> {
>   authority?: string | null,
>   private_key_type?: string | null
> } | null
> ```

> [accordion] resolves\_to full type
>
> ```ts theme={null}
> {
>   value?: string | null
> }[] | null
> ```

> [accordion] certificate\_management\_status full type
>
> ```ts theme={null}
> {
>   renews_at?: string | null,
>   provisioning_job?: {
>     error_code?: string | null,
>     started_at?: string | null,
>     finished_at?: string | null
>   } | null
> } | null
> ```

***

### delete

`domains.delete`

Release a reserved domain, which stops it resolving through ngrok; another account can then claim it

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

```ts theme={null}
await corsair.ngrok.api.domains.delete({ id: 'rd_2f1c8d9e3a5b4c6d' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The resource id. |

**Output**

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

***

### get

`domains.get`

Read one reserved domain, including its certificate provisioning status

**Risk:** `read`

```ts theme={null}
await corsair.ngrok.api.domains.get({ id: 'rd_2f1c8d9e3a5b4c6d' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The resource id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `metadata` | `string \| null` | No | — |
| `domain` | `string \| null` | No | — |
| `region` | `string \| null` | No | — |
| `cname_target` | `string \| null` | No | — |
| `certificate` | `object \| null` | No | — |
| `certificate_management_policy` | `object \| null` | No | — |
| `resolves_to` | `object[] \| null` | No | — |
| `is_dev` | `boolean \| null` | No | — |
| `certificate_management_status` | `object \| null` | No | — |
| `acme_challenge_cname_target` | `string \| null` | No | — |

> [accordion] certificate full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] certificate\_management\_policy full type
>
> ```ts theme={null}
> {
>   authority?: string | null,
>   private_key_type?: string | null
> } | null
> ```

> [accordion] resolves\_to full type
>
> ```ts theme={null}
> {
>   value?: string | null
> }[] | null
> ```

> [accordion] certificate\_management\_status full type
>
> ```ts theme={null}
> {
>   renews_at?: string | null,
>   provisioning_job?: {
>     error_code?: string | null,
>     started_at?: string | null,
>     finished_at?: string | null
>   } | null
> } | null
> ```

***

### list

`domains.list`

List reserved domains with their CNAME target and certificate state

**Risk:** `read`

```ts theme={null}
await corsair.ngrok.api.domains.list({ limit: 10 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `before_id` | `string` | No | The page cursor: the before\_id from the last next\_page\_uri, or that whole URL. |
| `limit` | `number` | No | Most results to return. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `reserved_domains` | `object[]` | Yes | — |
| `uri` | `string \| null` | No | — |
| `next_page_uri` | `string \| null` | No | — |

> [accordion] reserved\_domains full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null,
>   created_at?: string | null,
>   description?: string | null,
>   metadata?: string | null,
>   domain?: string | null,
>   region?: string | null,
>   cname_target?: string | null,
>   certificate?: {
>     id?: string | null,
>     uri?: string | null
>   } | null,
>   certificate_management_policy?: {
>     authority?: string | null,
>     private_key_type?: string | null
>   } | null,
>   resolves_to?: {
>     value?: string | null
>   }[] | null,
>   is_dev?: boolean | null,
>   certificate_management_status?: {
>     renews_at?: string | null,
>     provisioning_job?: {
>       error_code?: string | null,
>       started_at?: string | null,
>       finished_at?: string | null
>     } | null
>   } | null,
>   acme_challenge_cname_target?: string | null
> }[]
> ```

***

### update

`domains.update`

Change a reserved domain’s description, certificate, management policy or allowed IPs

**Risk:** `write`

```ts theme={null}
await corsair.ngrok.api.domains.update({ id: 'rd_2f1c8d9e3a5b4c6d', description: 'Renamed', resolves_to: [{ value: 'eu' }] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The resource id. |
| `description` | `string` | No | — |
| `metadata` | `string` | No | — |
| `certificate_id` | `string` | No | — |
| `certificate_management_policy` | `object` | No | Automatic certificate issuance and renewal; an empty object takes the defaults. |
| `resolves_to` | `object[]` | No | Only serve the domain from these points of presence, e.g. \[\{ value: 'us-cal-1' }, \{ value: 'eu' }]. |

> [accordion] certificate\_management\_policy full type
>
> ```ts theme={null}
> {
>   authority?: string,
>   private_key_type?: string
> }
> ```

> [accordion] resolves\_to full type
>
> ```ts theme={null}
> {
>   value: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `metadata` | `string \| null` | No | — |
| `domain` | `string \| null` | No | — |
| `region` | `string \| null` | No | — |
| `cname_target` | `string \| null` | No | — |
| `certificate` | `object \| null` | No | — |
| `certificate_management_policy` | `object \| null` | No | — |
| `resolves_to` | `object[] \| null` | No | — |
| `is_dev` | `boolean \| null` | No | — |
| `certificate_management_status` | `object \| null` | No | — |
| `acme_challenge_cname_target` | `string \| null` | No | — |

> [accordion] certificate full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] certificate\_management\_policy full type
>
> ```ts theme={null}
> {
>   authority?: string | null,
>   private_key_type?: string | null
> } | null
> ```

> [accordion] resolves\_to full type
>
> ```ts theme={null}
> {
>   value?: string | null
> }[] | null
> ```

> [accordion] certificate\_management\_status full type
>
> ```ts theme={null}
> {
>   renews_at?: string | null,
>   provisioning_job?: {
>     error_code?: string | null,
>     started_at?: string | null,
>     finished_at?: string | null
>   } | null
> } | null
> ```

***

## Endpoints

### create

`endpoints.create`

Create a cloud endpoint at a URL you own (e.g. your ngrok dev domain); its required Traffic Policy decides what happens to requests, and it serves immediately

**Risk:** `write`

```ts theme={null}
await corsair.ngrok.api.endpoints.create({ url: 'https://acme.ngrok-free.dev', type: 'cloud', traffic_policy: '{"on_http_request":[{"actions":[{"type":"forward-internal","config":{"url":"https://api.internal"}}]}]}', description: 'Acme API' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | The endpoint's own address, the URL clients connect to, e.g. [https://your-domain.ngrok-free.dev](https://your-domain.ngrok-free.dev). Where traffic goes is set in traffic\_policy. |
| `type` | `string` | No | The endpoint type. Only 'cloud' is supported; defaults to it. |
| `traffic_policy` | `string` | Yes | The Traffic Policy, as YAML or JSON text. Required for a cloud endpoint, and it must end in a terminal action such as forward-internal, redirect or custom-response. |
| `description` | `string` | No | — |
| `metadata` | `string` | No | — |
| `bindings` | `string[]` | No | — |

The endpoint starts forwarding on its public URL as soon as it exists.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `region` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_url` | `string \| null` | No | — |
| `proto` | `string \| null` | No | — |
| `scheme` | `string \| null` | No | — |
| `hostport` | `string \| null` | No | — |
| `host` | `string \| null` | No | — |
| `port` | `number \| null` | No | — |
| `type` | `string \| null` | No | — |
| `metadata` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `domain` | `object \| null` | No | — |
| `tcp_addr` | `object \| null` | No | — |
| `tunnel` | `object \| null` | No | — |
| `url` | `string \| null` | No | — |
| `upstream_url` | `string \| null` | No | — |
| `upstream_protocol` | `string \| null` | No | — |
| `traffic_policy` | `string \| null` | No | — |
| `bindings` | `string[] \| null` | No | — |
| `principal` | `object \| null` | No | — |
| `tunnel_session` | `object \| null` | No | — |

> [accordion] domain full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] tcp\_addr full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] tunnel full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] principal full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] tunnel\_session full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

***

### delete

`endpoints.delete`

Delete a cloud endpoint; its public URL stops resolving and ngrok has no restore call

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

```ts theme={null}
await corsair.ngrok.api.endpoints.delete({ id: 'ep_2f1c8d9e3a5b4c6d8e9f0a1b2c3d4e5f' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The resource id. |

**Output**

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

***

### get

`endpoints.get`

Read one cloud endpoint by id

**Risk:** `read`

```ts theme={null}
await corsair.ngrok.api.endpoints.get({ id: 'ep_2f1c8d9e3a5b4c6d8e9f0a1b2c3d4e5f' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The resource id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `region` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_url` | `string \| null` | No | — |
| `proto` | `string \| null` | No | — |
| `scheme` | `string \| null` | No | — |
| `hostport` | `string \| null` | No | — |
| `host` | `string \| null` | No | — |
| `port` | `number \| null` | No | — |
| `type` | `string \| null` | No | — |
| `metadata` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `domain` | `object \| null` | No | — |
| `tcp_addr` | `object \| null` | No | — |
| `tunnel` | `object \| null` | No | — |
| `url` | `string \| null` | No | — |
| `upstream_url` | `string \| null` | No | — |
| `upstream_protocol` | `string \| null` | No | — |
| `traffic_policy` | `string \| null` | No | — |
| `bindings` | `string[] \| null` | No | — |
| `principal` | `object \| null` | No | — |
| `tunnel_session` | `object \| null` | No | — |

> [accordion] domain full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] tcp\_addr full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] tunnel full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] principal full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] tunnel\_session full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

***

### list

`endpoints.list`

List cloud endpoints with their public URL, upstream and traffic policy, newest first

**Risk:** `read`

```ts theme={null}
await corsair.ngrok.api.endpoints.list({ limit: 10, filter: 'obj.proto == "https"' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `before_id` | `string` | No | The page cursor: the before\_id from the last next\_page\_uri, or that whole URL. |
| `limit` | `number` | No | Most results to return. |
| `filter` | `string` | No | A CEL expression over each item as `obj`, e.g. obj.description == "my app" or obj.proto == "https". |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `endpoints` | `object[]` | Yes | — |
| `uri` | `string \| null` | No | — |
| `next_page_uri` | `string \| null` | No | The next page URL, null on the last page; pass it (or its before\_id) as before\_id. |

> [accordion] endpoints full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   region?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   public_url?: string | null,
>   proto?: string | null,
>   scheme?: string | null,
>   hostport?: string | null,
>   host?: string | null,
>   port?: number | null,
>   type?: string | null,
>   metadata?: string | null,
>   description?: string | null,
>   domain?: {
>     id?: string | null,
>     uri?: string | null
>   } | null,
>   tcp_addr?: {
>     id?: string | null,
>     uri?: string | null
>   } | null,
>   tunnel?: {
>     id?: string | null,
>     uri?: string | null
>   } | null,
>   url?: string | null,
>   upstream_url?: string | null,
>   upstream_protocol?: string | null,
>   traffic_policy?: string | null,
>   bindings?: string[] | null,
>   principal?: {
>     id?: string | null,
>     uri?: string | null
>   } | null,
>   tunnel_session?: {
>     id?: string | null,
>     uri?: string | null
>   } | null
> }[]
> ```

***

### update

`endpoints.update`

Change an endpoint’s description, metadata, traffic policy or bindings, leaving fields that are omitted alone

**Risk:** `write`

```ts theme={null}
await corsair.ngrok.api.endpoints.update({ id: 'ep_2f1c8d9e3a5b4c6d8e9f0a1b2c3d4e5f', description: 'Renamed' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The resource id. |
| `description` | `string` | No | A new description. An empty string clears it. |
| `metadata` | `string` | No | — |
| `traffic_policy` | `string` | No | — |
| `bindings` | `string[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `region` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `updated_at` | `string \| null` | No | — |
| `public_url` | `string \| null` | No | — |
| `proto` | `string \| null` | No | — |
| `scheme` | `string \| null` | No | — |
| `hostport` | `string \| null` | No | — |
| `host` | `string \| null` | No | — |
| `port` | `number \| null` | No | — |
| `type` | `string \| null` | No | — |
| `metadata` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `domain` | `object \| null` | No | — |
| `tcp_addr` | `object \| null` | No | — |
| `tunnel` | `object \| null` | No | — |
| `url` | `string \| null` | No | — |
| `upstream_url` | `string \| null` | No | — |
| `upstream_protocol` | `string \| null` | No | — |
| `traffic_policy` | `string \| null` | No | — |
| `bindings` | `string[] \| null` | No | — |
| `principal` | `object \| null` | No | — |
| `tunnel_session` | `object \| null` | No | — |

> [accordion] domain full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] tcp\_addr full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] tunnel full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] principal full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

> [accordion] tunnel\_session full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null
> } | null
> ```

***

## Events

### create

`events.create`

Subscribe to event types and deliver them to existing destination ids, which are created through a separate API

**Risk:** `write`

```ts theme={null}
await corsair.ngrok.api.events.create({ sources: [{ type: 'endpoint.created' }], destination_ids: ['ed_1'] });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `sources` | `object[]` | Yes | Event types that trigger the subscription, e.g. \[\{ type: "endpoint.created" }]. |
| `destination_ids` | `string[]` | Yes | Where to deliver the events. A destination is created separately and is not wrapped here. |
| `description` | `string` | No | — |
| `metadata` | `string` | No | — |

Destination ids must already exist; destinations are created through a separate ngrok API.

> [accordion] sources full type
>
> ```ts theme={null}
> {
>   type: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `metadata` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `sources` | `object[] \| null` | No | — |
| `destinations` | `object[] \| null` | No | — |

> [accordion] sources full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   uri?: string | null
> }[] | null
> ```

> [accordion] destinations full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null,
>   description?: string | null,
>   metadata?: string | null,
>   created_at?: string | null,
>   target?: {
>     id?: string | null,
>     uri?: string | null
>   } | null
> }[] | null
> ```

***

### delete

`events.delete`

Delete an event subscription, which stops those events being delivered

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

```ts theme={null}
await corsair.ngrok.api.events.delete({ id: 'es_2f1c8d9e3a5b4c6d' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The resource id. |

**Output**

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

***

### get

`events.get`

Read one event subscription by id

**Risk:** `read`

```ts theme={null}
await corsair.ngrok.api.events.get({ id: 'es_2f1c8d9e3a5b4c6d' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | The resource id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| null` | No | — |
| `uri` | `string \| null` | No | — |
| `created_at` | `string \| null` | No | — |
| `metadata` | `string \| null` | No | — |
| `description` | `string \| null` | No | — |
| `sources` | `object[] \| null` | No | — |
| `destinations` | `object[] \| null` | No | — |

> [accordion] sources full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   uri?: string | null
> }[] | null
> ```

> [accordion] destinations full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null,
>   description?: string | null,
>   metadata?: string | null,
>   created_at?: string | null,
>   target?: {
>     id?: string | null,
>     uri?: string | null
>   } | null
> }[] | null
> ```

***

### list

`events.list`

List event subscriptions with their sources and destinations

**Risk:** `read`

```ts theme={null}
await corsair.ngrok.api.events.list({ limit: 10 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `before_id` | `string` | No | The page cursor: the before\_id from the last next\_page\_uri, or that whole URL. |
| `limit` | `number` | No | Most results to return. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `event_subscriptions` | `object[]` | Yes | — |
| `uri` | `string \| null` | No | — |
| `next_page_uri` | `string \| null` | No | — |

> [accordion] event\_subscriptions full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uri?: string | null,
>   created_at?: string | null,
>   metadata?: string | null,
>   description?: string | null,
>   sources?: {
>     type?: string | null,
>     uri?: string | null
>   }[] | null,
>   destinations?: {
>     id?: string | null,
>     uri?: string | null,
>     description?: string | null,
>     metadata?: string | null,
>     created_at?: string | null,
>     target?: {
>       id?: string | null,
>       uri?: string | null
>     } | null
>   }[] | null
> }[]
> ```

***

## Tunnels

### list

`tunnels.list`

List the tunnels open agent sessions and their public URLs

**Risk:** `read`

```ts theme={null}
await corsair.ngrok.api.tunnels.list({ limit: 10 });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `before_id` | `string` | No | The page cursor: the before\_id from the last next\_page\_uri, or that whole URL. |
| `limit` | `number` | No | Most results to return. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tunnels` | `object[]` | Yes | — |
| `uri` | `string \| null` | No | — |
| `next_page_uri` | `string \| null` | No | — |

> [accordion] tunnels full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   public_url?: string | null,
>   started_at?: string | null,
>   metadata?: string | null,
>   proto?: string | null,
>   region?: string | null,
>   tunnel_session?: {
>     id?: string | null,
>     uri?: string | null
>   } | null,
>   endpoint?: {
>     id?: string | null,
>     uri?: string | null
>   } | null,
>   labels?: Record<string, string> | null,
>   backends?: {
>     id?: string | null,
>     uri?: string | null
>   }[] | null,
>   forwards_to?: string | null
> }[]
> ```

***


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