> ## 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 Vercel: every `vercel.api.*` operation with input and output types.

Every `vercel.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>

## Aliases

### assignAlias

`aliases.assignAlias`

Assign an alias

**Risk:** `write`

```ts theme={null}
await corsair.vercel.api.aliases.assignAlias({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `deploymentId` | `string` | Yes | — |
| `alias` | `string` | Yes | — |
| `redirect` | `string` | No | — |
| `teamId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uid` | `string` | Yes | — |
| `alias` | `string` | Yes | — |
| `created` | `string` | Yes | — |
| `oldDeploymentId` | `string` | No | — |

***

### getAliases

`aliases.getAliases`

Get all aliases

**Risk:** `read`

```ts theme={null}
await corsair.vercel.api.aliases.getAliases({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `until` | `number` | No | — |
| `since` | `number` | No | — |
| `teamId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `aliases` | `object[]` | Yes | — |
| `pagination` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="aliases full type">
    ```ts theme={null}
    {
      uid: string,
      alias: string,
      created: string,
      createdAt: number,
      deploymentId?: string | null,
      projectId?: string | null,
      redirect?: string | null
    }[]
    ```
  </Accordion>

  <Accordion title="pagination full type">
    ```ts theme={null}
    {
      count: number,
      next?: number | null,
      prev?: number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Deployments

### createDeployment

`deployments.createDeployment`

Create a deployment

**Risk:** `write`

```ts theme={null}
await corsair.vercel.api.deployments.createDeployment({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `project` | `string` | No | — |
| `target` | `production \| staging` | No | — |
| `gitSource` | `object` | No | — |
| `files` | `any[]` | No | — |
| `meta` | `object` | No | — |
| `env` | `object` | No | — |
| `teamId` | `string` | No | — |

<AccordionGroup>
  <Accordion title="gitSource full type">
    ```ts theme={null}
    {
      type: github | gitlab | bitbucket,
      ref?: string,
      repoId?: string | number,
      sha?: string
    }
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uid` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `url` | `string` | Yes | — |
| `created` | `number` | Yes | — |
| `readyState` | `string` | Yes | — |
| `type` | `LAMBDAS \| PREBUILT \| STATIC \| string` | Yes | — |
| `creator` | `object` | No | — |
| `meta` | `object` | No | — |
| `target` | `production \| staging \| string` | No | — |
| `aliasError` | `object` | No | — |
| `aliasAssigned` | `number` | No | — |
| `inspectorUrl` | `string` | No | — |

<AccordionGroup>
  <Accordion title="creator full type">
    ```ts theme={null}
    {
      uid: string,
      email: string,
      username: string
    }
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="aliasError full type">
    ```ts theme={null}
    {
      code: string,
      message: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getDeployment

`deployments.getDeployment`

Get deployment details

**Risk:** `read`

```ts theme={null}
await corsair.vercel.api.deployments.getDeployment({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `idOrUrl` | `string` | Yes | — |
| `teamId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uid` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `url` | `string` | Yes | — |
| `created` | `number` | Yes | — |
| `readyState` | `string` | Yes | — |
| `type` | `LAMBDAS \| PREBUILT \| STATIC \| string` | Yes | — |
| `creator` | `object` | No | — |
| `meta` | `object` | No | — |
| `target` | `production \| staging \| string` | No | — |
| `aliasError` | `object` | No | — |
| `aliasAssigned` | `number` | No | — |
| `inspectorUrl` | `string` | No | — |

<AccordionGroup>
  <Accordion title="creator full type">
    ```ts theme={null}
    {
      uid: string,
      email: string,
      username: string
    }
    ```
  </Accordion>

  <Accordion title="meta full type">
    ```ts theme={null}
    {
    }
    ```
  </Accordion>

  <Accordion title="aliasError full type">
    ```ts theme={null}
    {
      code: string,
      message: string
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getDeployments

`deployments.getDeployments`

Get all deployments

**Risk:** `read`

```ts theme={null}
await corsair.vercel.api.deployments.getDeployments({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `projectId` | `string` | No | — |
| `limit` | `number` | No | — |
| `until` | `number` | No | — |
| `teamId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `deployments` | `object[]` | Yes | — |
| `pagination` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="deployments full type">
    ```ts theme={null}
    {
      uid: string,
      name: string,
      url: string,
      created: number,
      readyState: string,
      type: LAMBDAS | PREBUILT | STATIC | string,
      creator?: {
        uid: string,
        email: string,
        username: string
      } | null,
      meta?: {
      } | null,
      target?: production | staging | string | null,
      aliasError?: {
        code: string,
        message: string
      } | null,
      aliasAssigned?: number | null,
      inspectorUrl?: string | null
    }[]
    ```
  </Accordion>

  <Accordion title="pagination full type">
    ```ts theme={null}
    {
      count: number,
      next?: number | null,
      prev?: number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Domains

### getDomains

`domains.getDomains`

Get all domains

**Risk:** `read`

```ts theme={null}
await corsair.vercel.api.domains.getDomains({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `until` | `number` | No | — |
| `since` | `number` | No | — |
| `teamId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `domains` | `object[]` | Yes | — |
| `pagination` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="domains full type">
    ```ts theme={null}
    {
      id: string,
      name: string,
      createdAt: number,
      boughtAt?: number | null,
      expiresAt?: number | null,
      transferredAt?: number | null,
      verified: boolean,
      nameservers: string[],
      intendedNameservers: string[]
    }[]
    ```
  </Accordion>

  <Accordion title="pagination full type">
    ```ts theme={null}
    {
      count: number,
      next?: number | null,
      prev?: number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

### getProjectDomains

`domains.getProjectDomains`

Get project domains

**Risk:** `read`

```ts theme={null}
await corsair.vercel.api.domains.getProjectDomains({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `idOrName` | `string` | Yes | — |
| `limit` | `number` | No | — |
| `until` | `number` | No | — |
| `since` | `number` | No | — |
| `teamId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `domains` | `object[]` | Yes | — |
| `pagination` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="domains full type">
    ```ts theme={null}
    {
      name: string,
      apexName: string,
      projectId: string,
      redirect?: string | null,
      redirectStatusCode?: number | null,
      gitBranch?: string | null,
      updatedAt: number,
      createdAt: number,
      verified: boolean
    }[]
    ```
  </Accordion>

  <Accordion title="pagination full type">
    ```ts theme={null}
    {
      count: number,
      next?: number | null,
      prev?: number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Envs

### createEnvVariable

`envs.createEnvVariable`

Create an environment variable for a project (supports plain, secret, encrypted, and sensitive types)

**Risk:** `write`

```ts theme={null}
await corsair.vercel.api.envs.createEnvVariable({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `idOrName` | `string` | Yes | — |
| `key` | `string` | Yes | — |
| `value` | `string` | Yes | — |
| `type` | `plain \| secret \| encrypted \| sensitive` | Yes | — |
| `target` | `production \| preview \| development[]` | Yes | — |
| `gitBranch` | `string` | No | — |
| `comment` | `string` | No | — |
| `teamId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `key` | `string` | Yes | — |
| `value` | `string` | Yes | — |
| `type` | `plain \| secret \| encrypted \| sensitive` | Yes | — |
| `target` | `production \| preview \| development[]` | Yes | — |
| `gitBranch` | `string` | No | — |
| `configurationId` | `string` | No | — |
| `createdAt` | `number` | Yes | — |
| `updatedAt` | `number` | Yes | — |
| `createdBy` | `string` | No | — |
| `updatedBy` | `string` | No | — |

***

### getEnvVariables

`envs.getEnvVariables`

Get environment variables for a project (may include secret/sensitive values)

**Risk:** `read`

```ts theme={null}
await corsair.vercel.api.envs.getEnvVariables({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `idOrName` | `string` | Yes | — |
| `teamId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `envs` | `object[]` | No | — |

<AccordionGroup>
  <Accordion title="envs full type">
    ```ts theme={null}
    {
      id: string,
      key: string,
      value: string,
      type: plain | secret | encrypted | sensitive,
      target: production | preview | development[],
      gitBranch?: string | null,
      configurationId?: string | null,
      createdAt: number,
      updatedAt: number,
      createdBy?: string | null,
      updatedBy?: string | null
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Projects

### getProject

`projects.getProject`

Get project details

**Risk:** `read`

```ts theme={null}
await corsair.vercel.api.projects.getProject({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `idOrName` | `string` | Yes | — |
| `teamId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `accountId` | `string` | Yes | — |
| `createdAt` | `number` | Yes | — |
| `updatedAt` | `number` | Yes | — |
| `framework` | `string` | No | — |
| `link` | `object` | No | — |
| `latestDeployments` | `any[]` | No | — |
| `targets` | `object` | No | — |

<AccordionGroup>
  <Accordion title="link full type">
    ```ts theme={null}
    {
      type: string,
      repo: string,
      repoId?: number,
      org?: string | null,
      gitCredentialId?: string | null,
      productionBranch?: string | null,
      createdAt?: number | null,
      updatedAt?: number | null,
      deployHooks?: any[] | null
    }
    ```
  </Accordion>

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

***

### getProjects

`projects.getProjects`

Get all projects

**Risk:** `read`

```ts theme={null}
await corsair.vercel.api.projects.getProjects({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `until` | `number` | No | — |
| `since` | `number` | No | — |
| `teamId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `projects` | `object[]` | Yes | — |
| `pagination` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="projects full type">
    ```ts theme={null}
    {
      id: string,
      name: string,
      accountId: string,
      createdAt: number,
      updatedAt: number,
      framework?: string | null,
      link?: {
        type: string,
        repo: string,
        repoId?: number,
        org?: string | null,
        gitCredentialId?: string | null,
        productionBranch?: string | null,
        createdAt?: number | null,
        updatedAt?: number | null,
        deployHooks?: any[] | null
      } | null,
      latestDeployments?: any[] | null,
      targets?: {
      } | null
    }[]
    ```
  </Accordion>

  <Accordion title="pagination full type">
    ```ts theme={null}
    {
      count: number,
      next?: number | null,
      prev?: number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Teams

### getTeams

`teams.getTeams`

Get all teams

**Risk:** `read`

```ts theme={null}
await corsair.vercel.api.teams.getTeams({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `teams` | `object[]` | Yes | — |
| `pagination` | `object` | Yes | — |

<AccordionGroup>
  <Accordion title="teams full type">
    ```ts theme={null}
    {
      id: string,
      slug: string,
      name: string,
      createdAt: number,
      updatedAt?: number | null,
      avatar?: string | null,
      membership: {
        uid: string,
        role: OWNER | MEMBER | DEVELOPER | BILLING | VIEWER | string,
        createdAt: number
      }
    }[]
    ```
  </Accordion>

  <Accordion title="pagination full type">
    ```ts theme={null}
    {
      count: number,
      next?: number | null,
      prev?: number | null
    }
    ```
  </Accordion>
</AccordionGroup>

***

## Webhooks

### createWebhook

`webhooks.createWebhook`

Create a webhook

**Risk:** `write`

```ts theme={null}
await corsair.vercel.api.webhooks.createWebhook({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | — |
| `events` | `(deployment.created \| deployment.succeeded \| deployment.ready \| deployment.error \| deployment.canceled \| deployment.promoted \| project.created \| project.removed \| domain.created \| integration-configuration.scope-change-confirmed \| integration-configuration.removed \| integration-configuration.permission-upgraded \| string)[]` | Yes | — |
| `projectIds` | `string[]` | No | — |
| `teamId` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `url` | `string` | Yes | — |
| `events` | `(deployment.created \| deployment.succeeded \| deployment.ready \| deployment.error \| deployment.canceled \| deployment.promoted \| project.created \| project.removed \| domain.created \| integration-configuration.scope-change-confirmed \| integration-configuration.removed \| integration-configuration.permission-upgraded \| string)[]` | Yes | — |
| `ownerId` | `string` | Yes | — |
| `projectIds` | `string[]` | No | — |
| `createdAt` | `number` | Yes | — |
| `updatedAt` | `number` | Yes | — |

***

### getWebhooks

`webhooks.getWebhooks`

Get all webhooks

**Risk:** `read`

```ts theme={null}
await corsair.vercel.api.webhooks.getWebhooks({});
```

**Input**

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

**Output:** `object[]`

<AccordionGroup>
  <Accordion title="Output full type">
    ```ts theme={null}
    {
      id: string,
      url: string,
      events: (
        deployment.created | deployment.succeeded | deployment.ready | deployment.error | deployment.canceled | deployment.promoted | project.created | project.removed | domain.created | integration-configuration.scope-change-confirmed | integration-configuration.removed | integration-configuration.permission-upgraded | string
      )[],
      ownerId: string,
      projectIds?: string[],
      createdAt: number,
      updatedAt: number
    }[]
    ```
  </Accordion>
</AccordionGroup>

***


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