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

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

## Contacts

### create

`contacts.create`

Create a new contact

**Risk:** `write`

```ts theme={null}
await corsair.resend.api.contacts.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `unsubscribed` | `boolean` | No | — |
| `properties` | `object` | No | — |
| `segments` | `object[]` | No | — |
| `topics` | `object[]` | No | — |

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

  <Accordion title="segments full type">
    ```ts theme={null}
    {
      id: string
    }[]
    ```
  </Accordion>

  <Accordion title="topics full type">
    ```ts theme={null}
    {
      id: string,
      subscription: opt_in | opt_out
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

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

***

### delete

`contacts.delete`

Delete a contact \[DESTRUCTIVE · IRREVERSIBLE]

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

```ts theme={null}
await corsair.resend.api.contacts.delete({});
```

**Input**

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

**Output**

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

***

### get

`contacts.get`

Get info about a contact

**Risk:** `read`

```ts theme={null}
await corsair.resend.api.contacts.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `object` | `string` | No | — |
| `id` | `string` | Yes | — |
| `email` | `string` | Yes | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `created_at` | `Date` | No | — |
| `unsubscribed` | `boolean` | No | — |

***

### list

`contacts.list`

List all contacts

**Risk:** `read`

```ts theme={null}
await corsair.resend.api.contacts.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `cursor` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `object` | `string` | No | — |
| `has_more` | `boolean` | No | — |
| `data` | `object[]` | Yes | — |

<AccordionGroup>
  <Accordion title="data full type">
    ```ts theme={null}
    {
      object?: string,
      id: string,
      email: string,
      first_name?: string | null,
      last_name?: string | null,
      created_at?: Date | null,
      unsubscribed?: boolean
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### update

`contacts.update`

Update an existing contact

**Risk:** `write`

```ts theme={null}
await corsair.resend.api.contacts.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `first_name` | `string` | No | — |
| `last_name` | `string` | No | — |
| `unsubscribed` | `boolean` | No | — |
| `properties` | `object` | No | — |

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

**Output**

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

***

## Domains

### create

`domains.create`

Add a new sending domain

**Risk:** `write`

```ts theme={null}
await corsair.resend.api.domains.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `region` | `us-east-1 \| eu-west-1 \| sa-east-1` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `status` | `not_started \| validation \| scheduled \| ready \| error \| verified \| pending \| failed \| partially_verified \| partially_failed` | Yes | — |
| `created_at` | `Date` | No | — |
| `region` | `string` | No | — |

***

### delete

`domains.delete`

Remove a sending domain \[DESTRUCTIVE · IRREVERSIBLE]

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

```ts theme={null}
await corsair.resend.api.domains.delete({});
```

**Input**

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

**Output**

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

***

### get

`domains.get`

Get info about a sending domain

**Risk:** `read`

```ts theme={null}
await corsair.resend.api.domains.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | Yes | — |
| `status` | `not_started \| validation \| scheduled \| ready \| error \| verified \| pending \| failed \| partially_verified \| partially_failed` | Yes | — |
| `created_at` | `Date` | No | — |
| `region` | `string` | No | — |

***

### list

`domains.list`

List all sending domains

**Risk:** `read`

```ts theme={null}
await corsair.resend.api.domains.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `cursor` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `object` | `string` | No | — |
| `has_more` | `boolean` | No | — |
| `data` | `object[]` | Yes | — |

<AccordionGroup>
  <Accordion title="data full type">
    ```ts theme={null}
    {
      id: string,
      name: string,
      status: not_started | validation | scheduled | ready | error | verified | pending | failed | partially_verified | partially_failed,
      created_at?: Date | null,
      region?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### verify

`domains.verify`

Trigger DNS verification for a domain

**Risk:** `write`

```ts theme={null}
await corsair.resend.api.domains.verify({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `object` | `string` | No | — |
| `id` | `string` | No | — |
| `records` | `object[]` | No | — |
| `status` | `not_started \| validation \| scheduled \| ready \| error \| verified \| pending` | No | — |
| `created_at` | `Date` | No | — |
| `region` | `string` | No | — |

<AccordionGroup>
  <Accordion title="records full type">
    ```ts theme={null}
    {
      record: string,
      name: string,
      type: string,
      value: string,
      status: not_started | validation | scheduled | ready | error | verified | pending,
      ttl?: string,
      priority?: number
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

## Emails

### batch

`emails.batch`

Send up to 100 emails in a single API call

**Risk:** `write`

```ts theme={null}
await corsair.resend.api.emails.batch({});
```

**Input**

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

<AccordionGroup>
  <Accordion title="emails full type">
    ```ts theme={null}
    {
      from: string,
      to: string | string[],
      subject: string,
      html?: string,
      text?: string,
      cc?: string | string[],
      bcc?: string | string[],
      reply_to?: string | string[],
      scheduled_at?: string,
      tags?: {
        name: string,
        value: string
      }[],
      headers?: {
      }
    }[]
    ```
  </Accordion>
</AccordionGroup>

**Output**

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

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

***

### cancel

`emails.cancel`

Cancel a scheduled email

**Risk:** `write`

```ts theme={null}
await corsair.resend.api.emails.cancel({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `object` | `string` | No | — |
| `cancelled` | `boolean` | No | — |

***

### get

`emails.get`

Get info about a sent email

**Risk:** `read`

```ts theme={null}
await corsair.resend.api.emails.get({});
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `from` | `string` | Yes | — |
| `to` | `string[]` | Yes | — |
| `created_at` | `Date` | No | — |
| `subject` | `string` | No | — |

***

### list

`emails.list`

List sent emails

**Risk:** `read`

```ts theme={null}
await corsair.resend.api.emails.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `limit` | `number` | No | — |
| `cursor` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `object` | `string` | No | — |
| `has_more` | `boolean` | No | — |
| `data` | `object[]` | Yes | — |

<AccordionGroup>
  <Accordion title="data full type">
    ```ts theme={null}
    {
      id: string,
      from: string,
      to: string[],
      created_at?: Date | null,
      subject?: string
    }[]
    ```
  </Accordion>
</AccordionGroup>

***

### send

`emails.send`

Send an email to one or more recipients

**Risk:** `write`

```ts theme={null}
await corsair.resend.api.emails.send({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `from` | `string` | Yes | — |
| `to` | `string \| string[]` | Yes | — |
| `subject` | `string` | Yes | — |
| `html` | `string` | No | — |
| `text` | `string` | No | — |
| `cc` | `string \| string[]` | No | — |
| `bcc` | `string \| string[]` | No | — |
| `reply_to` | `string \| string[]` | No | — |
| `scheduled_at` | `string` | No | — |
| `attachments` | `object[]` | No | — |
| `tags` | `object[]` | No | — |
| `headers` | `object` | No | — |

<AccordionGroup>
  <Accordion title="attachments full type">
    ```ts theme={null}
    {
      filename: string,
      content: string | custom,
      path?: string
    }[]
    ```
  </Accordion>

  <Accordion title="tags full type">
    ```ts theme={null}
    {
      name: string,
      value: string
    }[]
    ```
  </Accordion>

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

**Output**

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

***


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