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

# Sender database

> Sender local sync in Corsair: the entities stored in your database, the `.search()` filters each one accepts, and the filter operators.

The Sender plugin syncs data locally. Use `corsair.sender.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).

## Campaigns

Path: `sender.db.campaigns.search`

```ts theme={null}
const rows = await corsair.sender.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 |
| `title` | `string` | equals, contains, startsWith, endsWith, in |
| `subject` | `string` | equals, contains, startsWith, endsWith, in |
| `status` | `string` | equals, contains, startsWith, endsWith, in |
| `schedule_time` | `string` | equals, contains, startsWith, endsWith, in |
| `sent_time` | `string` | equals, contains, startsWith, endsWith, in |
| `created` | `string` | equals, contains, startsWith, endsWith, in |
| `modified` | `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).*

***

## Fields

Path: `sender.db.fields.search`

```ts theme={null}
const rows = await corsair.sender.db.fields.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 |
| `title` | `string` | equals, contains, startsWith, endsWith, in |
| `type` | `string` | equals, contains, startsWith, endsWith, in |
| `field_name` | `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).*

***

## Groups

Path: `sender.db.groups.search`

```ts theme={null}
const rows = await corsair.sender.db.groups.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 |
| `title` | `string` | equals, contains, startsWith, endsWith, in |
| `recipient_count` | `number` | equals, gt, gte, lt, lte, in |
| `active_subscribers` | `number` | equals, gt, gte, lt, lte, in |
| `created` | `string` | equals, contains, startsWith, endsWith, in |
| `modified` | `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).*

***

## Segments

Path: `sender.db.segments.search`

```ts theme={null}
const rows = await corsair.sender.db.segments.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 |
| `subscribers` | `number` | equals, gt, gte, lt, lte, in |
| `created` | `string` | equals, contains, startsWith, endsWith, in |
| `modified` | `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).*

***

## Transactional Campaigns

Path: `sender.db.transactionalCampaigns.search`

```ts theme={null}
const rows = await corsair.sender.db.transactionalCampaigns.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 |
| `title` | `string` | equals, contains, startsWith, endsWith, in |
| `subject` | `string` | equals, contains, startsWith, endsWith, in |
| `created` | `string` | equals, contains, startsWith, endsWith, in |
| `modified` | `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).*

***

## Webhooks

Path: `sender.db.webhooks.search`

```ts theme={null}
const rows = await corsair.sender.db.webhooks.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 |
| `url` | `string` | equals, contains, startsWith, endsWith, in |
| `topic` | `string` | equals, contains, startsWith, endsWith, in |
| `status` | `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).*

***

## Workflows

Path: `sender.db.workflows.search`

```ts theme={null}
const rows = await corsair.sender.db.workflows.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 |
| `title` | `string` | equals, contains, startsWith, endsWith, in |
| `status` | `string` | equals, contains, startsWith, endsWith, in |
| `created` | `string` | equals, contains, startsWith, endsWith, in |
| `modified` | `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.