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

> Spoki integration for Corsair local sync: searchable entities, `.search()` filters, and operators.

The Spoki integration for Corsair plugin syncs data locally. Use `corsair.spoki.db.<entity>.search({ data, limit?, offset? })` with the filters listed per entity.

<Info>
  **New to Corsair?** See [database operations](/concepts/database), [data synchronization](/concepts/integrations), and [multi-tenancy](/concepts/multi-tenancy).
</Info>

## Accounts

Path: `spoki.db.accounts.search`

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

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `id` | `number` | equals, gt, gte, lt, lte, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `current_credit` | `number` | equals, gt, gte, lt, lte, in |
| `status` | `string` | equals, contains, startsWith, endsWith, in |
| `default_language` | `string` | equals, contains, startsWith, endsWith, in |
| `phone` | `string` | equals, contains, startsWith, endsWith, in |
| `has_official_verification` | `boolean` | equals |
| `daily_limit` | `number` | equals, gt, gte, lt, lte, in |
| `phone_status` | `string` | equals, contains, startsWith, endsWith, in |
| `quality_score` | `number` | equals, gt, gte, lt, lte, in |
| `is_active` | `boolean` | equals |
| `country_code` | `string` | equals, contains, startsWith, endsWith, in |
| `estimated_available_conversations` | `number` | equals, gt, gte, lt, lte, in |
| `account_type` | `number` | equals, gt, gte, lt, lte, in |
| `default_pricing_delta` | `number` | equals, gt, gte, lt, lte, in |
| `low_credit_threshold` | `number` | equals, gt, gte, lt, lte, in |
| `has_low_credit_alert` | `boolean` | equals |
| `default_prefix` | `string` | equals, contains, startsWith, endsWith, in |
| `default_country_code` | `string` | equals, contains, startsWith, endsWith, in |
| `timezone` | `string` | equals, contains, startsWith, endsWith, in |
| `contacted_in_24h` | `number` | equals, gt, gte, lt, lte, in |
| `contacted_in_7d` | `number` | equals, gt, gte, lt, lte, in |
| `primary_channel_id` | `number` | equals, gt, gte, lt, lte, 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](/concepts/database).*

***

## Channels

Path: `spoki.db.channels.search`

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

### Searchable filters

| Field | Type | Operators |
| - | - | - |
| `entity_id` | `string` | equals, contains, startsWith, endsWith, in |
| `name` | `string` | equals, contains, startsWith, endsWith, in |
| `identifier` | `string` | equals, contains, startsWith, endsWith, in |
| `platform` | `string` | equals, contains, startsWith, endsWith, in |
| `status` | `string` | equals, contains, startsWith, endsWith, in |
| `phone_status` | `string` | equals, contains, startsWith, endsWith, in |
| `quality_score` | `string` | equals, contains, startsWith, endsWith, in |
| `is_primary` | `boolean` | equals |

*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](/concepts/database).*

***


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