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

# Database

> Instantly local sync: searchable entities, `.search()` filters, and operators.

The Instantly plugin syncs data locally. Use `corsair.instantly.db.<entity>.search({ data, limit?, offset? })` with the filters listed per entity.

> [!NOTE]
>
> **New to Corsair?** See [database operations](https://docs.corsair.dev/concepts/database.md), [data synchronization](https://docs.corsair.dev/concepts/integrations.md), and [multi-tenancy](https://docs.corsair.dev/concepts/multi-tenancy.md).

## Accounts

Path: `instantly.db.accounts.search`

```ts theme={null}
const rows = await corsair.instantly.db.accounts.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `email` | `string` | equals, contains, startsWith, endsWith, in |
| `first_name` | `string` | equals, contains, startsWith, endsWith, in |
| `last_name` | `string` | equals, contains, startsWith, endsWith, in |
| `status` | `number` | equals, gt, gte, lt, lte, in |
| `warmup_status` | `number` | equals, gt, gte, lt, lte, in |
| `provider_code` | `number` | equals, gt, gte, lt, lte, in |
| `daily_limit` | `number` | equals, gt, gte, lt, lte, in |
| `stat_warmup_score` | `number` | equals, gt, gte, lt, lte, in |
| `timestamp_created` | `string` | equals, contains, startsWith, endsWith, in |
| `timestamp_updated` | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***

## Campaigns

Path: `instantly.db.campaigns.search`

```ts theme={null}
const rows = await corsair.instantly.db.campaigns.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `status` | `number` | equals, gt, gte, lt, lte, in |
| `daily_limit` | `number` | equals, gt, gte, lt, lte, in |
| `stop_on_reply` | `boolean` | equals |
| `stop_for_company` | `boolean` | equals |
| `timestamp_created` | `string` | equals, contains, startsWith, endsWith, in |
| `timestamp_updated` | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***

## Emails

Path: `instantly.db.emails.search`

```ts theme={null}
const rows = await corsair.instantly.db.emails.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `thread_id` | `string` | equals, contains, startsWith, endsWith, in |
| `subject` | `string` | equals, contains, startsWith, endsWith, in |
| `from_address_email` | `string` | equals, contains, startsWith, endsWith, in |
| `to_address_email_list` | `string` | equals, contains, startsWith, endsWith, in |
| `eaccount` | `string` | equals, contains, startsWith, endsWith, in |
| `lead` | `string` | equals, contains, startsWith, endsWith, in |
| `campaign_id` | `string` | equals, contains, startsWith, endsWith, in |
| `ue_type` | `number` | equals, gt, gte, lt, lte, in |
| `is_unread` | `number` | equals, gt, gte, lt, lte, in |
| `i_status` | `number` | equals, gt, gte, lt, lte, in |
| `content_preview` | `string` | equals, contains, startsWith, endsWith, in |
| `timestamp_email` | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***

## Leads

Path: `instantly.db.leads.search`

```ts theme={null}
const rows = await corsair.instantly.db.leads.search({
    data: { /* filters below */ },
    limit: 100,
    offset: 0,
});
```

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `string` | equals, contains, startsWith, endsWith, in |
| `email` | `string` | equals, contains, startsWith, endsWith, in |
| `first_name` | `string` | equals, contains, startsWith, endsWith, in |
| `last_name` | `string` | equals, contains, startsWith, endsWith, in |
| `company_name` | `string` | equals, contains, startsWith, endsWith, in |
| `company_domain` | `string` | equals, contains, startsWith, endsWith, in |
| `job_title` | `string` | equals, contains, startsWith, endsWith, in |
| `campaign` | `string` | equals, contains, startsWith, endsWith, in |
| `list_id` | `string` | equals, contains, startsWith, endsWith, in |
| `status` | `number` | equals, gt, gte, lt, lte, in |
| `lt_interest_status` | `number` | equals, gt, gte, lt, lte, in |
| `email_reply_count` | `number` | equals, gt, gte, lt, lte, in |
| `timestamp_last_contact` | `string` | equals, contains, startsWith, endsWith, in |
| `timestamp_last_reply` | `string` | equals, contains, startsWith, endsWith, in |
| `timestamp_created` | `string` | equals, contains, startsWith, endsWith, in |
| `timestamp_updated` | `string` | equals, contains, startsWith, endsWith, in |

*Every `.search()` also accepts `limit` and `offset` for pagination. `.list()` is available on the same path without the `.search` suffix in code — see [database operations](https://docs.corsair.dev/concepts/database.md).*

***


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