> ## Documentation Index
> Fetch the complete documentation index at: https://sippet.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# HTTP RPC reference

> Public HTTP RPC transport and full function, input, output, and field-selection types.

## What This Page Covers

Use this page when your backend calls Sippet's org API directly over HTTP.

* Execute actions with `POST /rpc/public/run`
* Validate action payloads with `POST /rpc/public/validate`
* Every request sends an `action` key plus optional `input`, `identity`, `fields`, `filter`, `sort`, `page`, and `metadataFields`
* Request JSON uses the same `camelCase` keys as Sippet's generated JavaScript RPC helpers

If you are building a browser calling experience with sockets, voice, or realtime events, start with the frontend SDK docs instead:

* Frontend SDK overview: `/sdk-js/introduction`
* Realtime session tokens: `/guides/realtime-session-tokens`

## HTTP Examples

### Run an action

```bash theme={null}
curl -X POST https://api.sippet.ai/rpc/public/run \
  -H "content-type: application/json" \
  -H "x-api-key: $SIPPET_SECRET_KEY" \
  -d '{
    "action": "list_contacts",
    "fields": ["id", "fullName"],
    "page": { "limit": 20 }
  }'
```

### Validate a payload

```bash theme={null}
curl -X POST https://api.sippet.ai/rpc/public/validate \
  -H "content-type: application/json" \
  -H "x-api-key: $SIPPET_SECRET_KEY" \
  -d '{
    "action": "create_contact",
    "input": {
      "fullName": "Ada Lovelace",
      "phoneE164": "+15555550123"
    }
  }'
```

## Common transport types

#### Validation result

```ts theme={null}
/**
 * Represents the result of a validation RPC call.
 *
 * All validation actions return this same structure, indicating either
 * successful validation or a list of validation errors.
 *
 * @example
 * // Successful validation
 * const result: ValidationResult = { success: true };
 *
 * // Failed validation
 * const result: ValidationResult = {
 *   success: false,
 *   errors: [
 *     {
 *       type: "required",
 *       message: "is required",
 *       shortMessage: "Required field",
 *       vars: { field: "email" },
 *       fields: ["email"],
 *       path: []
 *     }
 *   ]
 * };
 */
export type ValidationResult =
  | { success: true }
  | { success: false; errors: AshRpcError[]; };
```

#### Error envelope

```ts theme={null}
/**
 * Represents an error from an unsuccessful RPC call.
 *
 * This type matches the error structure defined in the AshTypescript.Rpc.Error protocol.
 *
 * @example
 * const error: AshRpcError = {
 *   type: "invalid_changes",
 *   message: "Invalid value for field %{field}",
 *   shortMessage: "Invalid changes",
 *   vars: { field: "email" },
 *   fields: ["email"],
 *   path: ["user", "email"],
 *   details: { suggestion: "Provide a valid email address" }
 * }
 */
export type AshRpcError = {
  /** Machine-readable error type (e.g., "invalid_changes", "not_found") */
  type: string;
  /** Full error message (may contain template variables like %{key}) */
  message: string;
  /** Concise version of the message */
  shortMessage: string;
  /** Variables to interpolate into the message template */
  vars: Record<string, any>;
  /** List of affected field names (for field-level errors) */
  fields: string[];
  /** Path to the error location in the data structure */
  path: string[];
  /** Optional map with extra details (e.g., suggestions, hints) */
  details?: Record<string, any>;
}
```

## Public actions

| RPC action                           | SDK function                      | Payload keys                          |
| ------------------------------------ | --------------------------------- | ------------------------------------- |
| `list_conversations`                 | `listConversations`               | `fields`, `filter?`, `sort?`, `page?` |
| `list_email_classifications`         | `listEmailClassifications`        | `fields`, `filter?`, `sort?`          |
| `list_call_participants`             | `listCallParticipants`            | `fields`, `filter?`, `sort?`, `page?` |
| `list_bulk_outbound_call_entries`    | `listBulkOutboundCallEntries`     | `fields`, `filter?`, `sort?`, `page?` |
| `list_call_ai_audit_events`          | `listCallAiAuditEvents`           | `fields`, `filter?`, `sort?`          |
| `list_bulk_outbound_calls`           | `listBulkOutboundCalls`           | `fields`, `filter?`, `sort?`, `page?` |
| `list_campaigns`                     | `listCampaigns`                   | none                                  |
| `get_campaign`                       | `getCampaign`                     | `input`                               |
| `list_call_queue_entries`            | `listCallQueueEntries`            | `fields`, `filter?`, `sort?`, `page?` |
| `accept_call_queue_entry`            | `acceptCallQueueEntry`            | `identity`, `fields?`                 |
| `get_call_queue_entry`               | `getCallQueueEntry`               | `input`, `fields`                     |
| `list_conversation_events`           | `listConversationEvents`          | `fields`, `filter?`, `sort?`          |
| `who_am_i`                           | `whoAmI`                          | `fields`                              |
| `issue_operator_access_token`        | `issueOperatorAccessToken`        | `input`                               |
| `list_ai_agents`                     | `listAiAgents`                    | `fields`, `filter?`, `sort?`, `page?` |
| `list_operator_statuses`             | `listOperatorStatuses`            | `fields`, `filter?`, `sort?`, `page?` |
| `set_operator_status`                | `setOperatorStatus`               | `input`, `fields?`                    |
| `list_email_mailboxes`               | `listEmailMailboxes`              | `fields`, `filter?`, `sort?`, `page?` |
| `create_email_mailbox`               | `createEmailMailbox`              | `input`, `fields?`                    |
| `update_email_mailbox`               | `updateEmailMailbox`              | `identity`, `input`, `fields?`        |
| `delete_email_mailbox`               | `deleteEmailMailbox`              | `identity`                            |
| `import_inbound_email`               | `importInboundEmail`              | `input`, `fields`                     |
| `list_email_templates`               | `listEmailTemplates`              | `fields`, `filter?`, `sort?`, `page?` |
| `create_email_template`              | `createEmailTemplate`             | `input`, `fields?`                    |
| `update_email_template`              | `updateEmailTemplate`             | `identity`, `input`, `fields?`        |
| `delete_email_template`              | `deleteEmailTemplate`             | `identity`                            |
| `list_calls`                         | `listCalls`                       | `fields`, `filter?`, `sort?`          |
| `create_call`                        | `createCall`                      | `input`, `fields?`                    |
| `flag_call_for_review`               | `flagCallForReview`               | `identity`, `fields?`                 |
| `clear_call_review_flag`             | `clearCallReviewFlag`             | `identity`, `fields?`                 |
| `call_codec`                         | `callCodec`                       | `input`                               |
| `barge_call`                         | `bargeCall`                       | `input`                               |
| `issue_operator_media_access`        | `issueOperatorMediaAccess`        | `input`                               |
| `resume_ai_call`                     | `resumeAiCall`                    | `input`                               |
| `transfer_call_to_queue`             | `transferCallToQueue`             | `input`                               |
| `leave_call`                         | `leaveCall`                       | `input`                               |
| `end_call`                           | `endCall`                         | `input`                               |
| `start_outbound_call`                | `startOutboundCall`               | `input?`                              |
| `start_bulk_outbound_call`           | `startBulkOutboundCall`           | `input?`                              |
| `list_call_classifications`          | `listCallClassifications`         | `fields`, `filter?`, `sort?`          |
| `override_call_classification`       | `overrideCallClassification`      | `identity`, `input`, `fields?`        |
| `clear_call_classification_override` | `clearCallClassificationOverride` | `identity`, `fields?`                 |
| `list_call_transcripts`              | `listCallTranscripts`             | `fields`, `filter?`, `sort?`, `page?` |
| `list_email_identities`              | `listEmailIdentities`             | `fields`, `filter?`, `sort?`, `page?` |
| `create_email_identity`              | `createEmailIdentity`             | `input`, `fields?`                    |
| `update_email_identity`              | `updateEmailIdentity`             | `identity`, `input`, `fields?`        |
| `delete_email_identity`              | `deleteEmailIdentity`             | `identity`                            |
| `list_contacts`                      | `listContacts`                    | `fields`, `filter?`, `sort?`, `page?` |
| `create_contact`                     | `createContact`                   | `input`, `fields?`                    |
| `update_contact`                     | `updateContact`                   | `identity`, `input`, `fields?`        |
| `archive_contact`                    | `archiveContact`                  | `identity`, `fields?`                 |
| `delete_contact`                     | `deleteContact`                   | `input`, `fields`                     |

## Action reference

### `list_conversations`

* SDK function: `listConversations`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`, `page?`

#### Function signature

```ts theme={null}
export async function listConversations<Fields extends ListConversationsFields, Config extends ListConversationsConfig = ListConversationsConfig>(
  config: Config & { fields: Fields }
): Promise<ListConversationsResult<Fields, Config["page"]>>
```

#### Example request body

```json theme={null}
{
  "action": "list_conversations",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt",
  "page": {
    "limit": 20
  }
}
```

#### Request config type

```ts theme={null}
export type ListConversationsConfig = {
  fields: ListConversationsFields;
  filter?: ConversationFilterInput;
  sort?: string;
  page?: (
    {
      limit?: number;
      offset?: number;
      count?: boolean;
    } | {
      limit?: number;
      after?: string;
      before?: string;
    }
  );
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
};
```

#### Field selection type

```ts theme={null}
export type ListConversationsFields = UnifiedFieldSelection<ConversationResourceSchema>[];
```

#### Selectable resource fields (`Conversation`)

* `id`, `status`, `sessionDate`, `timezone`, `startedAt`, `lastActivityAt`, `endedAt`, `workingSummary`, `runtimeState`, `runtimeMemory`, `outcome`, `summary`, `channel`, `mode`, `transport`, `sessionScopeKey`, `publicId`, `metadata`, `aiAgentId`, `contactId`, `communicationThreadId`, `insertedAt`, `updatedAt`

#### Inferred success result type

```ts theme={null}
export type InferListConversationsResult<
  Fields extends ListConversationsFields | undefined,
  Page extends ListConversationsConfig["page"] = undefined
> = ConditionalPaginatedResultMixed<Page, Array<InferResult<ConversationResourceSchema, Fields>>, {
  results: Array<InferResult<ConversationResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  offset: number;
  count?: number | null;
  type: "offset";
}, {
  results: Array<InferResult<ConversationResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  after: string | null;
  before: string | null;
  previousPage: string;
  nextPage: string;
  count?: number | null;
  type: "keyset";
}>;
```

#### Result envelope type

```ts theme={null}
export type ListConversationsResult<Fields extends ListConversationsFields, Page extends ListConversationsConfig["page"] = undefined> = | { success: true; data: InferListConversationsResult<Fields, Page>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListConversations(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_email_classifications`

* SDK function: `listEmailClassifications`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`

#### Function signature

```ts theme={null}
export async function listEmailClassifications<Fields extends ListEmailClassificationsFields>(
  config: {
  fields: Fields;
  filter?: EmailClassificationFilterInput;
  sort?: string;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ListEmailClassificationsResult<Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "list_email_classifications",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt"
}
```

#### Field selection type

```ts theme={null}
export type ListEmailClassificationsFields = UnifiedFieldSelection<EmailClassificationResourceSchema>[];
```

#### Selectable resource fields (`EmailClassification`)

* `id`, `communicationMessageId`, `status`, `predictedLabel`, `predictedConfidence`, `effectiveLabel`, `effectiveSource`, `provider`, `model`, `taxonomyVersion`, `promptVersion`, `tokenUsage`, `estimatedCost`, `providerResponseId`, `lastError`, `classifiedAt`, `overriddenAt`, `overriddenByUserId`, `insertedAt`, `updatedAt`

#### Inferred success result type

```ts theme={null}
export type InferListEmailClassificationsResult<
  Fields extends ListEmailClassificationsFields,
> = Array<InferResult<EmailClassificationResourceSchema, Fields>>;
```

#### Result envelope type

```ts theme={null}
export type ListEmailClassificationsResult<Fields extends ListEmailClassificationsFields> = | { success: true; data: InferListEmailClassificationsResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListEmailClassifications(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_call_participants`

* SDK function: `listCallParticipants`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`, `page?`

#### Function signature

```ts theme={null}
export async function listCallParticipants<Fields extends ListCallParticipantsFields, Config extends ListCallParticipantsConfig = ListCallParticipantsConfig>(
  config: Config & { fields: Fields }
): Promise<ListCallParticipantsResult<Fields, Config["page"]>>
```

#### Example request body

```json theme={null}
{
  "action": "list_call_participants",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt",
  "page": {
    "limit": 20
  }
}
```

#### Request config type

```ts theme={null}
export type ListCallParticipantsConfig = {
  fields: ListCallParticipantsFields;
  filter?: CallParticipantFilterInput;
  sort?: string;
  page?: (
    {
      limit?: number;
      offset?: number;
      count?: boolean;
    } | {
      limit?: number;
      after?: string;
      before?: string;
    }
  );
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
};
```

#### Field selection type

```ts theme={null}
export type ListCallParticipantsFields = UnifiedFieldSelection<CallParticipantResourceSchema>[];
```

#### Selectable resource fields (`CallParticipant`)

* `id`, `memberUuid`, `role`, `joinedAt`, `leftAt`, `callId`, `organisationId`

#### Inferred success result type

```ts theme={null}
export type InferListCallParticipantsResult<
  Fields extends ListCallParticipantsFields | undefined,
  Page extends ListCallParticipantsConfig["page"] = undefined
> = ConditionalPaginatedResultMixed<Page, Array<InferResult<CallParticipantResourceSchema, Fields>>, {
  results: Array<InferResult<CallParticipantResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  offset: number;
  count?: number | null;
  type: "offset";
}, {
  results: Array<InferResult<CallParticipantResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  after: string | null;
  before: string | null;
  previousPage: string;
  nextPage: string;
  count?: number | null;
  type: "keyset";
}>;
```

#### Result envelope type

```ts theme={null}
export type ListCallParticipantsResult<Fields extends ListCallParticipantsFields, Page extends ListCallParticipantsConfig["page"] = undefined> = | { success: true; data: InferListCallParticipantsResult<Fields, Page>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListCallParticipants(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_bulk_outbound_call_entries`

* SDK function: `listBulkOutboundCallEntries`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`, `page?`

#### Function signature

```ts theme={null}
export async function listBulkOutboundCallEntries<Fields extends ListBulkOutboundCallEntriesFields, Config extends ListBulkOutboundCallEntriesConfig = ListBulkOutboundCallEntriesConfig>(
  config: Config & { fields: Fields }
): Promise<ListBulkOutboundCallEntriesResult<Fields, Config["page"]>>
```

#### Example request body

```json theme={null}
{
  "action": "list_bulk_outbound_call_entries",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt",
  "page": {
    "limit": 20
  }
}
```

#### Request config type

```ts theme={null}
export type ListBulkOutboundCallEntriesConfig = {
  fields: ListBulkOutboundCallEntriesFields;
  filter?: BulkOutboundCallEntryFilterInput;
  sort?: string;
  page?: (
    {
      limit?: number;
      offset?: number;
      count?: boolean;
    } | {
      limit?: number;
      after?: string;
      before?: string;
    }
  );
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
};
```

#### Field selection type

```ts theme={null}
export type ListBulkOutboundCallEntriesFields = UnifiedFieldSelection<BulkOutboundCallEntryResourceSchema>[];
```

#### Selectable resource fields (`BulkOutboundCallEntry`)

* `id`, `position`, `status`, `callUuid`, `errorMessage`, `startedAt`, `completedAt`, `bulkOutboundCallId`, `contactId`, `callId`, `insertedAt`, `updatedAt`

#### Inferred success result type

```ts theme={null}
export type InferListBulkOutboundCallEntriesResult<
  Fields extends ListBulkOutboundCallEntriesFields | undefined,
  Page extends ListBulkOutboundCallEntriesConfig["page"] = undefined
> = ConditionalPaginatedResultMixed<Page, Array<InferResult<BulkOutboundCallEntryResourceSchema, Fields>>, {
  results: Array<InferResult<BulkOutboundCallEntryResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  offset: number;
  count?: number | null;
  type: "offset";
}, {
  results: Array<InferResult<BulkOutboundCallEntryResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  after: string | null;
  before: string | null;
  previousPage: string;
  nextPage: string;
  count?: number | null;
  type: "keyset";
}>;
```

#### Result envelope type

```ts theme={null}
export type ListBulkOutboundCallEntriesResult<Fields extends ListBulkOutboundCallEntriesFields, Page extends ListBulkOutboundCallEntriesConfig["page"] = undefined> = | { success: true; data: InferListBulkOutboundCallEntriesResult<Fields, Page>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListBulkOutboundCallEntries(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_call_ai_audit_events`

* SDK function: `listCallAiAuditEvents`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`

#### Function signature

```ts theme={null}
export async function listCallAiAuditEvents<Fields extends ListCallAiAuditEventsFields>(
  config: {
  fields: Fields;
  filter?: CallAiAuditEventFilterInput;
  sort?: string;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ListCallAiAuditEventsResult<Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "list_call_ai_audit_events",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt"
}
```

#### Field selection type

```ts theme={null}
export type ListCallAiAuditEventsFields = UnifiedFieldSelection<CallAiAuditEventResourceSchema>[];
```

#### Selectable resource fields (`CallAiAuditEvent`)

* `id`, `eventType`, `toolName`, `toolCallId`, `toolArgumentsRaw`, `toolArguments`, `toolOutput`, `error`, `success`, `stateId`, `stateLabel`, `stepIndex`, `totalSteps`, `progressPercent`, `tokenUsage`, `inputTokens`, `outputTokens`, `totalTokens`, `inputTextTokens`, `inputAudioTokens`, `inputImageTokens`, `inputCachedTokens`, `inputCachedTextTokens`, `inputCachedAudioTokens`, `inputCachedImageTokens`, `outputTextTokens`, `outputAudioTokens`, `outputImageTokens`, `model`, `payload`, `callUuid`, `roomId`, `agentId`, `occurredAt`, `callId`, `organisationId`

#### Inferred success result type

```ts theme={null}
export type InferListCallAiAuditEventsResult<
  Fields extends ListCallAiAuditEventsFields,
> = Array<InferResult<CallAiAuditEventResourceSchema, Fields>>;
```

#### Result envelope type

```ts theme={null}
export type ListCallAiAuditEventsResult<Fields extends ListCallAiAuditEventsFields> = | { success: true; data: InferListCallAiAuditEventsResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListCallAiAuditEvents(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_bulk_outbound_calls`

* SDK function: `listBulkOutboundCalls`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`, `page?`

#### Function signature

```ts theme={null}
export async function listBulkOutboundCalls<Fields extends ListBulkOutboundCallsFields, Config extends ListBulkOutboundCallsConfig = ListBulkOutboundCallsConfig>(
  config: Config & { fields: Fields }
): Promise<ListBulkOutboundCallsResult<Fields, Config["page"]>>
```

#### Example request body

```json theme={null}
{
  "action": "list_bulk_outbound_calls",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt",
  "page": {
    "limit": 20
  }
}
```

#### Request config type

```ts theme={null}
export type ListBulkOutboundCallsConfig = {
  fields: ListBulkOutboundCallsFields;
  filter?: BulkOutboundCallFilterInput;
  sort?: string;
  page?: (
    {
      limit?: number;
      offset?: number;
      count?: boolean;
    } | {
      limit?: number;
      after?: string;
      before?: string;
    }
  );
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
};
```

#### Field selection type

```ts theme={null}
export type ListBulkOutboundCallsFields = UnifiedFieldSelection<BulkOutboundCallResourceSchema>[];
```

#### Selectable resource fields (`BulkOutboundCall`)

* `id`, `status`, `targetType`, `contactLimit`, `concurrency`, `totalCount`, `startedCount`, `completedCount`, `failedCount`, `startedAt`, `completedAt`, `aiAgentId`, `initiatedByUserId`, `contactGroupId`, `insertedAt`, `updatedAt`

#### Inferred success result type

```ts theme={null}
export type InferListBulkOutboundCallsResult<
  Fields extends ListBulkOutboundCallsFields | undefined,
  Page extends ListBulkOutboundCallsConfig["page"] = undefined
> = ConditionalPaginatedResultMixed<Page, Array<InferResult<BulkOutboundCallResourceSchema, Fields>>, {
  results: Array<InferResult<BulkOutboundCallResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  offset: number;
  count?: number | null;
  type: "offset";
}, {
  results: Array<InferResult<BulkOutboundCallResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  after: string | null;
  before: string | null;
  previousPage: string;
  nextPage: string;
  count?: number | null;
  type: "keyset";
}>;
```

#### Result envelope type

```ts theme={null}
export type ListBulkOutboundCallsResult<Fields extends ListBulkOutboundCallsFields, Page extends ListBulkOutboundCallsConfig["page"] = undefined> = | { success: true; data: InferListBulkOutboundCallsResult<Fields, Page>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListBulkOutboundCalls(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_campaigns`

* SDK function: `listCampaigns`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: none

#### Function signature

```ts theme={null}
export async function listCampaigns(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ListCampaignsResult>
```

#### Example request body

```json theme={null}
{
  "action": "list_campaigns"
}
```

#### Inferred success result type

```ts theme={null}
export type InferListCampaignsResult = Record<string, any>;
```

#### Result envelope type

```ts theme={null}
export type ListCampaignsResult = | { success: true; data: InferListCampaignsResult; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListCampaigns(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `get_campaign`

* SDK function: `getCampaign`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`

#### Function signature

```ts theme={null}
export async function getCampaign(
  config: {
  input: GetCampaignInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<GetCampaignResult>
```

#### Example request body

```json theme={null}
{
  "action": "get_campaign",
  "input": {
    "id": "<uuid>"
  }
}
```

#### Input type

```ts theme={null}
export type GetCampaignInput = {
  id: UUID;
};
```

#### Inferred success result type

```ts theme={null}
export type InferGetCampaignResult = Record<string, any>;
```

#### Result envelope type

```ts theme={null}
export type GetCampaignResult = | { success: true; data: InferGetCampaignResult; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateGetCampaign(
  config: {
  input: GetCampaignInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_call_queue_entries`

* SDK function: `listCallQueueEntries`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`, `page?`

#### Function signature

```ts theme={null}
export async function listCallQueueEntries<Fields extends ListCallQueueEntriesFields, Config extends ListCallQueueEntriesConfig = ListCallQueueEntriesConfig>(
  config: Config & { fields: Fields }
): Promise<ListCallQueueEntriesResult<Fields, Config["page"]>>
```

#### Example request body

```json theme={null}
{
  "action": "list_call_queue_entries",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt",
  "page": {
    "limit": 20
  }
}
```

#### Request config type

```ts theme={null}
export type ListCallQueueEntriesConfig = {
  fields: ListCallQueueEntriesFields;
  filter?: CallQueueEntryFilterInput;
  sort?: string;
  page?: (
    {
      limit?: number;
      offset?: number;
      count?: boolean;
    } | {
      limit?: number;
      after?: string;
      before?: string;
    }
  );
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
};
```

#### Field selection type

```ts theme={null}
export type ListCallQueueEntriesFields = UnifiedFieldSelection<CallQueueEntryResourceSchema>[];
```

#### Selectable resource fields (`CallQueueEntry`)

* `id`, `callUuid`, `queueName`, `callerIdNumber`, `callerIdName`, `state`, `agentName`, `waitStartedAt`, `answeredAt`, `completedAt`, `abandonedAt`

#### Inferred success result type

```ts theme={null}
export type InferListCallQueueEntriesResult<
  Fields extends ListCallQueueEntriesFields | undefined,
  Page extends ListCallQueueEntriesConfig["page"] = undefined
> = ConditionalPaginatedResultMixed<Page, Array<InferResult<CallQueueEntryResourceSchema, Fields>>, {
  results: Array<InferResult<CallQueueEntryResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  offset: number;
  count?: number | null;
  type: "offset";
}, {
  results: Array<InferResult<CallQueueEntryResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  after: string | null;
  before: string | null;
  previousPage: string;
  nextPage: string;
  count?: number | null;
  type: "keyset";
}>;
```

#### Result envelope type

```ts theme={null}
export type ListCallQueueEntriesResult<Fields extends ListCallQueueEntriesFields, Page extends ListCallQueueEntriesConfig["page"] = undefined> = | { success: true; data: InferListCallQueueEntriesResult<Fields, Page>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListCallQueueEntries(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `accept_call_queue_entry`

* SDK function: `acceptCallQueueEntry`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `identity`, `fields?`

#### Function signature

```ts theme={null}
export async function acceptCallQueueEntry<Fields extends AcceptCallQueueEntryFields | undefined = undefined>(
  config: {
  identity: UUID;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<AcceptCallQueueEntryResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "accept_call_queue_entry",
  "identity": "<uuid>",
  "fields": [
    "id"
  ]
}
```

#### Field selection type

```ts theme={null}
export type AcceptCallQueueEntryFields = UnifiedFieldSelection<CallQueueEntryResourceSchema>[];
```

#### Selectable resource fields (`CallQueueEntry`)

* `id`, `callUuid`, `queueName`, `callerIdNumber`, `callerIdName`, `state`, `agentName`, `waitStartedAt`, `answeredAt`, `completedAt`, `abandonedAt`

#### Inferred success result type

```ts theme={null}
export type InferAcceptCallQueueEntryResult<
  Fields extends AcceptCallQueueEntryFields | undefined,
> = InferResult<CallQueueEntryResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type AcceptCallQueueEntryResult<Fields extends AcceptCallQueueEntryFields | undefined = undefined> = | { success: true; data: InferAcceptCallQueueEntryResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateAcceptCallQueueEntry(
  config: {
  identity: UUID | string;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `get_call_queue_entry`

* SDK function: `getCallQueueEntry`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`, `fields`

#### Function signature

```ts theme={null}
export async function getCallQueueEntry<Fields extends GetCallQueueEntryFields>(
  config: {
  input: GetCallQueueEntryInput;
  fields: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<GetCallQueueEntryResult<Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "get_call_queue_entry",
  "input": {
    "id": "<uuid>"
  },
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type GetCallQueueEntryInput = {
  id: UUID;
};
```

#### Field selection type

```ts theme={null}
export type GetCallQueueEntryFields = UnifiedFieldSelection<CallQueueEntryResourceSchema>[];
```

#### Selectable resource fields (`CallQueueEntry`)

* `id`, `callUuid`, `queueName`, `callerIdNumber`, `callerIdName`, `state`, `agentName`, `waitStartedAt`, `answeredAt`, `completedAt`, `abandonedAt`

#### Inferred success result type

```ts theme={null}
export type InferGetCallQueueEntryResult<
  Fields extends GetCallQueueEntryFields,
> = InferResult<CallQueueEntryResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type GetCallQueueEntryResult<Fields extends GetCallQueueEntryFields> = | { success: true; data: InferGetCallQueueEntryResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateGetCallQueueEntry(
  config: {
  input: GetCallQueueEntryInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_conversation_events`

* SDK function: `listConversationEvents`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`

#### Function signature

```ts theme={null}
export async function listConversationEvents<Fields extends ListConversationEventsFields>(
  config: {
  fields: Fields;
  filter?: ConversationEventFilterInput;
  sort?: string;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ListConversationEventsResult<Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "list_conversation_events",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt"
}
```

#### Field selection type

```ts theme={null}
export type ListConversationEventsFields = UnifiedFieldSelection<ConversationEventResourceSchema>[];
```

#### Selectable resource fields (`ConversationEvent`)

* `id`, `eventType`, `source`, `summary`, `metadata`, `payload`, `callUuid`, `roomId`, `actorType`, `actorId`, `speaker`, `toolName`, `toolCallId`, `success`, `error`, `stateId`, `stateLabel`, `tokenUsage`, `model`, `occurredAt`, `callId`, `conversationId`, `agentId`

#### Inferred success result type

```ts theme={null}
export type InferListConversationEventsResult<
  Fields extends ListConversationEventsFields,
> = Array<InferResult<ConversationEventResourceSchema, Fields>>;
```

#### Result envelope type

```ts theme={null}
export type ListConversationEventsResult<Fields extends ListConversationEventsFields> = | { success: true; data: InferListConversationEventsResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListConversationEvents(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `who_am_i`

* SDK function: `whoAmI`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`

#### Function signature

```ts theme={null}
export async function whoAmI<Fields extends WhoAmIFields>(
  config: {
  fields: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<WhoAmIResult<Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "who_am_i",
  "fields": [
    "id"
  ]
}
```

#### Field selection type

```ts theme={null}
export type WhoAmIFields = UnifiedFieldSelection<UserResourceSchema>[];
```

#### Selectable resource fields (`User`)

* `id`, `fullName`, `email`, `confirmedAt`, `sipUsername`

#### Inferred success result type

```ts theme={null}
export type InferWhoAmIResult<
  Fields extends WhoAmIFields,
> = InferResult<UserResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type WhoAmIResult<Fields extends WhoAmIFields> = | { success: true; data: InferWhoAmIResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateWhoAmI(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `issue_operator_access_token`

* SDK function: `issueOperatorAccessToken`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`

#### Function signature

```ts theme={null}
export async function issueOperatorAccessToken(
  config: {
  input: IssueOperatorAccessTokenInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<IssueOperatorAccessTokenResult>
```

#### Example request body

```json theme={null}
{
  "action": "issue_operator_access_token",
  "input": {
    "operatorEmail": "<string>"
  }
}
```

#### Input type

```ts theme={null}
export type IssueOperatorAccessTokenInput = {
  operatorEmail: string;
};
```

#### Inferred success result type

```ts theme={null}
export type InferIssueOperatorAccessTokenResult = Record<string, any>;
```

#### Result envelope type

```ts theme={null}
export type IssueOperatorAccessTokenResult = | { success: true; data: InferIssueOperatorAccessTokenResult; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateIssueOperatorAccessToken(
  config: {
  input: IssueOperatorAccessTokenInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_ai_agents`

* SDK function: `listAiAgents`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`, `page?`

#### Function signature

```ts theme={null}
export async function listAiAgents<Fields extends ListAiAgentsFields, Config extends ListAiAgentsConfig = ListAiAgentsConfig>(
  config: Config & { fields: Fields }
): Promise<ListAiAgentsResult<Fields, Config["page"]>>
```

#### Example request body

```json theme={null}
{
  "action": "list_ai_agents",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt",
  "page": {
    "limit": 20
  }
}
```

#### Request config type

```ts theme={null}
export type ListAiAgentsConfig = {
  fields: ListAiAgentsFields;
  filter?: AiAgentFilterInput;
  sort?: string;
  page?: (
    {
      limit?: number;
      offset?: number;
      count?: boolean;
    } | {
      limit?: number;
      after?: string;
      before?: string;
    }
  );
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
};
```

#### Field selection type

```ts theme={null}
export type ListAiAgentsFields = UnifiedFieldSelection<AiAgentResourceSchema>[];
```

#### Selectable resource fields (`AiAgent`)

* `id`, `name`, `realtimeProvider`, `realtimeModel`, `callerNameVerificationMode`, `identityVerificationFactors`, `inactivityEnabled`, `inactivityFirstReminderMs`, `inactivityFollowUpMs`, `inactivityCallEnabled`, `inactivityCallFirstReminderMs`, `inactivityCallFollowUpMs`, `inactivityEmailEnabled`, `inactivityEmailFirstReminderMs`, `inactivityEmailFollowUpMs`, `inactivityWhatsappEnabled`, `inactivityWhatsappFirstReminderMs`, `inactivityWhatsappFollowUpMs`, `inactivityDiscordEnabled`, `inactivityDiscordFirstReminderMs`, `inactivityDiscordFollowUpMs`, `inactivityCallAutoEndEnabled`, `inactivityCallAutoEndMessage`, `inactivityWhatsappAutoEndEnabled`, `inactivityWhatsappAutoEndMessage`, `contactMemoryEnabled`, `contactMemoryWriteMode`, `contactMemoryMaxResults`, `scriptOpeningMode`, `voice`, `tone`, `languages`, `workflow`, `scriptComposition`, `scriptExamples`, `promptSecurityMiddlewareEnabled`, `promptSecurityTimeoutMs`, `systemPrompt`, `safetyGuardrails`, `enabledToolIds`, `toolSettings`, `published`

#### Inferred success result type

```ts theme={null}
export type InferListAiAgentsResult<
  Fields extends ListAiAgentsFields | undefined,
  Page extends ListAiAgentsConfig["page"] = undefined
> = ConditionalPaginatedResultMixed<Page, Array<InferResult<AiAgentResourceSchema, Fields>>, {
  results: Array<InferResult<AiAgentResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  offset: number;
  count?: number | null;
  type: "offset";
}, {
  results: Array<InferResult<AiAgentResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  after: string | null;
  before: string | null;
  previousPage: string;
  nextPage: string;
  count?: number | null;
  type: "keyset";
}>;
```

#### Result envelope type

```ts theme={null}
export type ListAiAgentsResult<Fields extends ListAiAgentsFields, Page extends ListAiAgentsConfig["page"] = undefined> = | { success: true; data: InferListAiAgentsResult<Fields, Page>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListAiAgents(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_operator_statuses`

* SDK function: `listOperatorStatuses`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`, `page?`

#### Function signature

```ts theme={null}
export async function listOperatorStatuses<Fields extends ListOperatorStatusesFields, Config extends ListOperatorStatusesConfig = ListOperatorStatusesConfig>(
  config: Config & { fields: Fields }
): Promise<ListOperatorStatusesResult<Fields, Config["page"]>>
```

#### Example request body

```json theme={null}
{
  "action": "list_operator_statuses",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt",
  "page": {
    "limit": 20
  }
}
```

#### Request config type

```ts theme={null}
export type ListOperatorStatusesConfig = {
  fields: ListOperatorStatusesFields;
  filter?: OperatorStatusFilterInput;
  sort?: string;
  page?: (
    {
      limit?: number;
      offset?: number;
      count?: boolean;
    } | {
      limit?: number;
      after?: string;
      before?: string;
    }
  );
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
};
```

#### Field selection type

```ts theme={null}
export type ListOperatorStatusesFields = UnifiedFieldSelection<OperatorStatusResourceSchema>[];
```

#### Selectable resource fields (`OperatorStatus`)

* `id`, `sipUserId`, `agentName`, `status`, `source`, `changedByUserId`

#### Inferred success result type

```ts theme={null}
export type InferListOperatorStatusesResult<
  Fields extends ListOperatorStatusesFields | undefined,
  Page extends ListOperatorStatusesConfig["page"] = undefined
> = ConditionalPaginatedResultMixed<Page, Array<InferResult<OperatorStatusResourceSchema, Fields>>, {
  results: Array<InferResult<OperatorStatusResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  offset: number;
  count?: number | null;
  type: "offset";
}, {
  results: Array<InferResult<OperatorStatusResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  after: string | null;
  before: string | null;
  previousPage: string;
  nextPage: string;
  count?: number | null;
  type: "keyset";
}>;
```

#### Result envelope type

```ts theme={null}
export type ListOperatorStatusesResult<Fields extends ListOperatorStatusesFields, Page extends ListOperatorStatusesConfig["page"] = undefined> = | { success: true; data: InferListOperatorStatusesResult<Fields, Page>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListOperatorStatuses(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `set_operator_status`

* SDK function: `setOperatorStatus`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`, `fields?`

#### Function signature

```ts theme={null}
export async function setOperatorStatus<Fields extends SetOperatorStatusFields | undefined = undefined>(
  config: {
  input: SetOperatorStatusInput;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<SetOperatorStatusResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "set_operator_status",
  "input": {
    "sipUserId": "<uuid>"
  },
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type SetOperatorStatusInput = {
  sipUserId: UUID;
  status?: "available" | "on_break" | "logged_out";
  source?: "widget" | "api" | "system" | null;
};
```

#### Field selection type

```ts theme={null}
export type SetOperatorStatusFields = UnifiedFieldSelection<OperatorStatusResourceSchema>[];
```

#### Selectable resource fields (`OperatorStatus`)

* `id`, `sipUserId`, `agentName`, `status`, `source`, `changedByUserId`

#### Inferred success result type

```ts theme={null}
export type InferSetOperatorStatusResult<
  Fields extends SetOperatorStatusFields | undefined,
> = InferResult<OperatorStatusResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type SetOperatorStatusResult<Fields extends SetOperatorStatusFields | undefined = undefined> = | { success: true; data: InferSetOperatorStatusResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateSetOperatorStatus(
  config: {
  input: SetOperatorStatusInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_email_mailboxes`

* SDK function: `listEmailMailboxes`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`, `page?`

#### Function signature

```ts theme={null}
export async function listEmailMailboxes<Fields extends ListEmailMailboxesFields, Config extends ListEmailMailboxesConfig = ListEmailMailboxesConfig>(
  config: Config & { fields: Fields }
): Promise<ListEmailMailboxesResult<Fields, Config["page"]>>
```

#### Example request body

```json theme={null}
{
  "action": "list_email_mailboxes",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt",
  "page": {
    "limit": 20
  }
}
```

#### Request config type

```ts theme={null}
export type ListEmailMailboxesConfig = {
  fields: ListEmailMailboxesFields;
  filter?: EmailMailboxFilterInput;
  sort?: string;
  page?: (
    {
      limit?: number;
      offset?: number;
      count?: boolean;
    } | {
      limit?: number;
      after?: string;
      before?: string;
    }
  );
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
};
```

#### Field selection type

```ts theme={null}
export type ListEmailMailboxesFields = UnifiedFieldSelection<EmailMailboxResourceSchema>[];
```

#### Selectable resource fields (`EmailMailbox`)

* `id`, `inboundDomain`, `mxTarget`, `listenerEnabled`, `listenerStatus`, `listenerHost`, `listenerPort`, `tlsMode`, `maxSessions`, `lastInboundAt`, `metadata`

#### Inferred success result type

```ts theme={null}
export type InferListEmailMailboxesResult<
  Fields extends ListEmailMailboxesFields | undefined,
  Page extends ListEmailMailboxesConfig["page"] = undefined
> = ConditionalPaginatedResultMixed<Page, Array<InferResult<EmailMailboxResourceSchema, Fields>>, {
  results: Array<InferResult<EmailMailboxResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  offset: number;
  count?: number | null;
  type: "offset";
}, {
  results: Array<InferResult<EmailMailboxResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  after: string | null;
  before: string | null;
  previousPage: string;
  nextPage: string;
  count?: number | null;
  type: "keyset";
}>;
```

#### Result envelope type

```ts theme={null}
export type ListEmailMailboxesResult<Fields extends ListEmailMailboxesFields, Page extends ListEmailMailboxesConfig["page"] = undefined> = | { success: true; data: InferListEmailMailboxesResult<Fields, Page>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListEmailMailboxes(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `create_email_mailbox`

* SDK function: `createEmailMailbox`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`, `fields?`

#### Function signature

```ts theme={null}
export async function createEmailMailbox<Fields extends CreateEmailMailboxFields | undefined = undefined>(
  config: {
  input: CreateEmailMailboxInput;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<CreateEmailMailboxResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "create_email_mailbox",
  "input": {
    "inboundDomain": "<string>",
    "organisationId": "<uuid>"
  },
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type CreateEmailMailboxInput = {
  inboundDomain: string;
  mxTarget?: string | null;
  listenerEnabled?: boolean;
  listenerStatus?: "disabled" | "starting" | "running" | "degraded" | "failed";
  listenerHost?: string | null;
  listenerPort?: number;
  tlsMode?: "disabled" | "optional" | "required";
  maxSessions?: number;
  lastInboundAt?: UtcDateTimeUsec | null;
  metadata?: Record<string, any>;
  organisationId: UUID;
};
```

#### Field selection type

```ts theme={null}
export type CreateEmailMailboxFields = UnifiedFieldSelection<EmailMailboxResourceSchema>[];
```

#### Selectable resource fields (`EmailMailbox`)

* `id`, `inboundDomain`, `mxTarget`, `listenerEnabled`, `listenerStatus`, `listenerHost`, `listenerPort`, `tlsMode`, `maxSessions`, `lastInboundAt`, `metadata`

#### Inferred success result type

```ts theme={null}
export type InferCreateEmailMailboxResult<
  Fields extends CreateEmailMailboxFields | undefined,
> = InferResult<EmailMailboxResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type CreateEmailMailboxResult<Fields extends CreateEmailMailboxFields | undefined = undefined> = | { success: true; data: InferCreateEmailMailboxResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateCreateEmailMailbox(
  config: {
  input: CreateEmailMailboxInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `update_email_mailbox`

* SDK function: `updateEmailMailbox`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `identity`, `input`, `fields?`

#### Function signature

```ts theme={null}
export async function updateEmailMailbox<Fields extends UpdateEmailMailboxFields | undefined = undefined>(
  config: {
  identity: UUID;
  input: UpdateEmailMailboxInput;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<UpdateEmailMailboxResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "update_email_mailbox",
  "identity": "<uuid>",
  "input": {},
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type UpdateEmailMailboxInput = {
  inboundDomain?: string;
  mxTarget?: string | null;
  listenerEnabled?: boolean;
  listenerStatus?: "disabled" | "starting" | "running" | "degraded" | "failed";
  listenerHost?: string | null;
  listenerPort?: number;
  tlsMode?: "disabled" | "optional" | "required";
  maxSessions?: number;
  lastInboundAt?: UtcDateTimeUsec | null;
  metadata?: Record<string, any>;
};
```

#### Field selection type

```ts theme={null}
export type UpdateEmailMailboxFields = UnifiedFieldSelection<EmailMailboxResourceSchema>[];
```

#### Selectable resource fields (`EmailMailbox`)

* `id`, `inboundDomain`, `mxTarget`, `listenerEnabled`, `listenerStatus`, `listenerHost`, `listenerPort`, `tlsMode`, `maxSessions`, `lastInboundAt`, `metadata`

#### Inferred success result type

```ts theme={null}
export type InferUpdateEmailMailboxResult<
  Fields extends UpdateEmailMailboxFields | undefined,
> = InferResult<EmailMailboxResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type UpdateEmailMailboxResult<Fields extends UpdateEmailMailboxFields | undefined = undefined> = | { success: true; data: InferUpdateEmailMailboxResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateUpdateEmailMailbox(
  config: {
  identity: UUID | string;
  input: UpdateEmailMailboxInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `delete_email_mailbox`

* SDK function: `deleteEmailMailbox`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `identity`

#### Function signature

```ts theme={null}
export async function deleteEmailMailbox(
  config: {
  identity: UUID;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<DeleteEmailMailboxResult>
```

#### Example request body

```json theme={null}
{
  "action": "delete_email_mailbox",
  "identity": "<uuid>"
}
```

#### Result envelope type

```ts theme={null}
export type DeleteEmailMailboxResult = | { success: true; data: {}; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateDeleteEmailMailbox(
  config: {
  identity: UUID | string;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `import_inbound_email`

* SDK function: `importInboundEmail`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`, `fields`

#### Function signature

```ts theme={null}
export async function importInboundEmail<Fields extends ImportInboundEmailFields | undefined = undefined>(
  config: {
  input: ImportInboundEmailInput;
  fields: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ImportInboundEmailResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "import_inbound_email",
  "input": {
    "recipientAddress": "<string>"
  },
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type ImportInboundEmailInput = {
  recipientAddress: string;
  rawMime?: string;
  structuredPayload?: ImportedEmailPayloadInputSchema;
  receivedAt?: UtcDateTimeUsec;
};
```

#### Field selection type

```ts theme={null}
export type ImportInboundEmailFields = UnifiedFieldSelection<CommunicationMessageResourceSchema>[];
```

#### Selectable resource fields (`CommunicationMessage`)

* `id`, `channel`, `direction`, `status`, `body`, `subject`, `fromAddress`, `toAddress`, `provider`, `providerMessageId`, `error`, `occurredAt`, `metadata`, `conversationId`, `threadId`, `contactId`

#### Inferred success result type

```ts theme={null}
export type InferImportInboundEmailResult<
  Fields extends ImportInboundEmailFields | undefined,
> = InferResult<CommunicationMessageResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type ImportInboundEmailResult<Fields extends ImportInboundEmailFields | undefined = undefined> = | { success: true; data: InferImportInboundEmailResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateImportInboundEmail(
  config: {
  input: ImportInboundEmailInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_email_templates`

* SDK function: `listEmailTemplates`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`, `page?`

#### Function signature

```ts theme={null}
export async function listEmailTemplates<Fields extends ListEmailTemplatesFields, Config extends ListEmailTemplatesConfig = ListEmailTemplatesConfig>(
  config: Config & { fields: Fields }
): Promise<ListEmailTemplatesResult<Fields, Config["page"]>>
```

#### Example request body

```json theme={null}
{
  "action": "list_email_templates",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt",
  "page": {
    "limit": 20
  }
}
```

#### Request config type

```ts theme={null}
export type ListEmailTemplatesConfig = {
  fields: ListEmailTemplatesFields;
  filter?: EmailTemplateFilterInput;
  sort?: string;
  page?: (
    {
      limit?: number;
      offset?: number;
      count?: boolean;
    } | {
      limit?: number;
      after?: string;
      before?: string;
    }
  );
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
};
```

#### Field selection type

```ts theme={null}
export type ListEmailTemplatesFields = UnifiedFieldSelection<EmailTemplateResourceSchema>[];
```

#### Selectable resource fields (`EmailTemplate`)

* `id`, `model`, `name`, `subject`, `body`, `variables`, `active`

#### Inferred success result type

```ts theme={null}
export type InferListEmailTemplatesResult<
  Fields extends ListEmailTemplatesFields | undefined,
  Page extends ListEmailTemplatesConfig["page"] = undefined
> = ConditionalPaginatedResultMixed<Page, Array<InferResult<EmailTemplateResourceSchema, Fields>>, {
  results: Array<InferResult<EmailTemplateResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  offset: number;
  count?: number | null;
  type: "offset";
}, {
  results: Array<InferResult<EmailTemplateResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  after: string | null;
  before: string | null;
  previousPage: string;
  nextPage: string;
  count?: number | null;
  type: "keyset";
}>;
```

#### Result envelope type

```ts theme={null}
export type ListEmailTemplatesResult<Fields extends ListEmailTemplatesFields, Page extends ListEmailTemplatesConfig["page"] = undefined> = | { success: true; data: InferListEmailTemplatesResult<Fields, Page>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListEmailTemplates(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `create_email_template`

* SDK function: `createEmailTemplate`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`, `fields?`

#### Function signature

```ts theme={null}
export async function createEmailTemplate<Fields extends CreateEmailTemplateFields | undefined = undefined>(
  config: {
  input: CreateEmailTemplateInput;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<CreateEmailTemplateResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "create_email_template",
  "input": {
    "model": "<string>",
    "name": "<string>",
    "subject": "<string>",
    "body": "<string>"
  },
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type CreateEmailTemplateInput = {
  model: string;
  name: string;
  subject: string;
  body: string;
  variables?: Array<string>;
  active?: boolean;
};
```

#### Field selection type

```ts theme={null}
export type CreateEmailTemplateFields = UnifiedFieldSelection<EmailTemplateResourceSchema>[];
```

#### Selectable resource fields (`EmailTemplate`)

* `id`, `model`, `name`, `subject`, `body`, `variables`, `active`

#### Inferred success result type

```ts theme={null}
export type InferCreateEmailTemplateResult<
  Fields extends CreateEmailTemplateFields | undefined,
> = InferResult<EmailTemplateResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type CreateEmailTemplateResult<Fields extends CreateEmailTemplateFields | undefined = undefined> = | { success: true; data: InferCreateEmailTemplateResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateCreateEmailTemplate(
  config: {
  input: CreateEmailTemplateInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `update_email_template`

* SDK function: `updateEmailTemplate`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `identity`, `input`, `fields?`

#### Function signature

```ts theme={null}
export async function updateEmailTemplate<Fields extends UpdateEmailTemplateFields | undefined = undefined>(
  config: {
  identity: UUID;
  input: UpdateEmailTemplateInput;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<UpdateEmailTemplateResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "update_email_template",
  "identity": "<uuid>",
  "input": {},
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type UpdateEmailTemplateInput = {
  model?: string;
  name?: string;
  subject?: string;
  body?: string;
  variables?: Array<string>;
  active?: boolean;
};
```

#### Field selection type

```ts theme={null}
export type UpdateEmailTemplateFields = UnifiedFieldSelection<EmailTemplateResourceSchema>[];
```

#### Selectable resource fields (`EmailTemplate`)

* `id`, `model`, `name`, `subject`, `body`, `variables`, `active`

#### Inferred success result type

```ts theme={null}
export type InferUpdateEmailTemplateResult<
  Fields extends UpdateEmailTemplateFields | undefined,
> = InferResult<EmailTemplateResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type UpdateEmailTemplateResult<Fields extends UpdateEmailTemplateFields | undefined = undefined> = | { success: true; data: InferUpdateEmailTemplateResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateUpdateEmailTemplate(
  config: {
  identity: UUID | string;
  input: UpdateEmailTemplateInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `delete_email_template`

* SDK function: `deleteEmailTemplate`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `identity`

#### Function signature

```ts theme={null}
export async function deleteEmailTemplate(
  config: {
  identity: UUID;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<DeleteEmailTemplateResult>
```

#### Example request body

```json theme={null}
{
  "action": "delete_email_template",
  "identity": "<uuid>"
}
```

#### Result envelope type

```ts theme={null}
export type DeleteEmailTemplateResult = | { success: true; data: {}; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateDeleteEmailTemplate(
  config: {
  identity: UUID | string;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_calls`

* SDK function: `listCalls`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`

#### Function signature

```ts theme={null}
export async function listCalls<Fields extends ListCallsFields>(
  config: {
  fields: Fields;
  filter?: CallFilterInput;
  sort?: string;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ListCallsResult<Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "list_calls",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt"
}
```

#### Field selection type

```ts theme={null}
export type ListCallsFields = UnifiedFieldSelection<CallResourceSchema>[];
```

#### Selectable resource fields (`Call`)

* `id`, `direction`, `fromNumber`, `toNumber`, `sipUsername`, `status`, `callUuid`, `callSource`, `startedAt`, `answeredAt`, `mediaQualifiedAt`, `callerSpokeAt`, `endedAt`, `durationSeconds`, `recordingStatus`, `recordingUri`, `recordingUploadedAt`, `recordingError`, `recordingMetadata`, `conversationId`, `flaggedAt`, `flaggedByUserId`, `currentHandler`, `currentHandlerType`, `currentHandlerId`, `currentHandlerName`, `currentOperatorMemberUuid`, `currentOperatorName`, `currentAiAgentId`, `currentAiAgentName`, `contactId`, `contactFullName`, `billingCostCents`, `billingCostCurrency`, `platformAiBillingCostCents`, `platformAiInputTokens`, `platformAiOutputTokens`, `platformAiTotalTokens`

#### Inferred success result type

```ts theme={null}
export type InferListCallsResult<
  Fields extends ListCallsFields,
> = Array<InferResult<CallResourceSchema, Fields>>;
```

#### Result envelope type

```ts theme={null}
export type ListCallsResult<Fields extends ListCallsFields> = | { success: true; data: InferListCallsResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListCalls(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `create_call`

* SDK function: `createCall`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`, `fields?`

#### Function signature

```ts theme={null}
export async function createCall<Fields extends CreateCallFields | undefined = undefined>(
  config: {
  input: CreateCallInput;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<CreateCallResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "create_call",
  "input": {
    "direction": "inbound",
    "fromNumber": "<string>",
    "toNumber": "<string>",
    "callUuid": "<string>"
  },
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type CreateCallInput = {
  direction: "inbound" | "outbound";
  fromNumber: string;
  toNumber: string;
  sipUsername?: string | null;
  callUuid: string;
  callSource?: string;
  outboundTrunkSource?: "default_sippet_trunk" | "custom_gateway" | null;
  status?: "initiated" | "ringing" | "answered" | "completed" | "failed" | "busy" | "no_answer" | null;
  conversationId?: UUID | null;
  startedAt?: UtcDateTimeUsec | null;
  answeredAt?: UtcDateTimeUsec | null;
  mediaQualifiedAt?: UtcDateTimeUsec | null;
  callerSpokeAt?: UtcDateTimeUsec | null;
};
```

#### Field selection type

```ts theme={null}
export type CreateCallFields = UnifiedFieldSelection<CallResourceSchema>[];
```

#### Selectable resource fields (`Call`)

* `id`, `direction`, `fromNumber`, `toNumber`, `sipUsername`, `status`, `callUuid`, `callSource`, `startedAt`, `answeredAt`, `mediaQualifiedAt`, `callerSpokeAt`, `endedAt`, `durationSeconds`, `recordingStatus`, `recordingUri`, `recordingUploadedAt`, `recordingError`, `recordingMetadata`, `conversationId`, `flaggedAt`, `flaggedByUserId`, `currentHandler`, `currentHandlerType`, `currentHandlerId`, `currentHandlerName`, `currentOperatorMemberUuid`, `currentOperatorName`, `currentAiAgentId`, `currentAiAgentName`, `contactId`, `contactFullName`, `billingCostCents`, `billingCostCurrency`, `platformAiBillingCostCents`, `platformAiInputTokens`, `platformAiOutputTokens`, `platformAiTotalTokens`

#### Inferred success result type

```ts theme={null}
export type InferCreateCallResult<
  Fields extends CreateCallFields | undefined,
> = InferResult<CallResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type CreateCallResult<Fields extends CreateCallFields | undefined = undefined> = | { success: true; data: InferCreateCallResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateCreateCall(
  config: {
  input: CreateCallInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `flag_call_for_review`

* SDK function: `flagCallForReview`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `identity`, `fields?`

#### Function signature

```ts theme={null}
export async function flagCallForReview<Fields extends FlagCallForReviewFields | undefined = undefined>(
  config: {
  identity: UUID;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<FlagCallForReviewResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "flag_call_for_review",
  "identity": "<uuid>",
  "fields": [
    "id"
  ]
}
```

#### Field selection type

```ts theme={null}
export type FlagCallForReviewFields = UnifiedFieldSelection<CallResourceSchema>[];
```

#### Selectable resource fields (`Call`)

* `id`, `direction`, `fromNumber`, `toNumber`, `sipUsername`, `status`, `callUuid`, `callSource`, `startedAt`, `answeredAt`, `mediaQualifiedAt`, `callerSpokeAt`, `endedAt`, `durationSeconds`, `recordingStatus`, `recordingUri`, `recordingUploadedAt`, `recordingError`, `recordingMetadata`, `conversationId`, `flaggedAt`, `flaggedByUserId`, `currentHandler`, `currentHandlerType`, `currentHandlerId`, `currentHandlerName`, `currentOperatorMemberUuid`, `currentOperatorName`, `currentAiAgentId`, `currentAiAgentName`, `contactId`, `contactFullName`, `billingCostCents`, `billingCostCurrency`, `platformAiBillingCostCents`, `platformAiInputTokens`, `platformAiOutputTokens`, `platformAiTotalTokens`

#### Inferred success result type

```ts theme={null}
export type InferFlagCallForReviewResult<
  Fields extends FlagCallForReviewFields | undefined,
> = InferResult<CallResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type FlagCallForReviewResult<Fields extends FlagCallForReviewFields | undefined = undefined> = | { success: true; data: InferFlagCallForReviewResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateFlagCallForReview(
  config: {
  identity: UUID | string;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `clear_call_review_flag`

* SDK function: `clearCallReviewFlag`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `identity`, `fields?`

#### Function signature

```ts theme={null}
export async function clearCallReviewFlag<Fields extends ClearCallReviewFlagFields | undefined = undefined>(
  config: {
  identity: UUID;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ClearCallReviewFlagResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "clear_call_review_flag",
  "identity": "<uuid>",
  "fields": [
    "id"
  ]
}
```

#### Field selection type

```ts theme={null}
export type ClearCallReviewFlagFields = UnifiedFieldSelection<CallResourceSchema>[];
```

#### Selectable resource fields (`Call`)

* `id`, `direction`, `fromNumber`, `toNumber`, `sipUsername`, `status`, `callUuid`, `callSource`, `startedAt`, `answeredAt`, `mediaQualifiedAt`, `callerSpokeAt`, `endedAt`, `durationSeconds`, `recordingStatus`, `recordingUri`, `recordingUploadedAt`, `recordingError`, `recordingMetadata`, `conversationId`, `flaggedAt`, `flaggedByUserId`, `currentHandler`, `currentHandlerType`, `currentHandlerId`, `currentHandlerName`, `currentOperatorMemberUuid`, `currentOperatorName`, `currentAiAgentId`, `currentAiAgentName`, `contactId`, `contactFullName`, `billingCostCents`, `billingCostCurrency`, `platformAiBillingCostCents`, `platformAiInputTokens`, `platformAiOutputTokens`, `platformAiTotalTokens`

#### Inferred success result type

```ts theme={null}
export type InferClearCallReviewFlagResult<
  Fields extends ClearCallReviewFlagFields | undefined,
> = InferResult<CallResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type ClearCallReviewFlagResult<Fields extends ClearCallReviewFlagFields | undefined = undefined> = | { success: true; data: InferClearCallReviewFlagResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateClearCallReviewFlag(
  config: {
  identity: UUID | string;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `call_codec`

* SDK function: `callCodec`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`

#### Function signature

```ts theme={null}
export async function callCodec(
  config: {
  input: CallCodecInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<CallCodecResult>
```

#### Example request body

```json theme={null}
{
  "action": "call_codec",
  "input": {
    "callUuid": "<string>"
  }
}
```

#### Input type

```ts theme={null}
export type CallCodecInput = {
  callUuid: string;
};
```

#### Inferred success result type

```ts theme={null}
export type InferCallCodecResult = Record<string, any>;
```

#### Result envelope type

```ts theme={null}
export type CallCodecResult = | { success: true; data: InferCallCodecResult; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateCallCodec(
  config: {
  input: CallCodecInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `barge_call`

* SDK function: `bargeCall`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`

#### Function signature

```ts theme={null}
export async function bargeCall(
  config: {
  input: BargeCallInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<BargeCallResult>
```

#### Example request body

```json theme={null}
{
  "action": "barge_call",
  "input": {
    "callUuid": "<string>"
  }
}
```

#### Input type

```ts theme={null}
export type BargeCallInput = {
  callUuid: string;
};
```

#### Inferred success result type

```ts theme={null}
export type InferBargeCallResult = Record<string, any>;
```

#### Result envelope type

```ts theme={null}
export type BargeCallResult = | { success: true; data: InferBargeCallResult; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateBargeCall(
  config: {
  input: BargeCallInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `issue_operator_media_access`

* SDK function: `issueOperatorMediaAccess`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`

#### Function signature

```ts theme={null}
export async function issueOperatorMediaAccess(
  config: {
  input: IssueOperatorMediaAccessInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<IssueOperatorMediaAccessResult>
```

#### Example request body

```json theme={null}
{
  "action": "issue_operator_media_access",
  "input": {
    "callUuid": "<string>"
  }
}
```

#### Input type

```ts theme={null}
export type IssueOperatorMediaAccessInput = {
  callUuid: string;
};
```

#### Inferred success result type

```ts theme={null}
export type InferIssueOperatorMediaAccessResult = Record<string, any>;
```

#### Result envelope type

```ts theme={null}
export type IssueOperatorMediaAccessResult = | { success: true; data: InferIssueOperatorMediaAccessResult; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateIssueOperatorMediaAccess(
  config: {
  input: IssueOperatorMediaAccessInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `resume_ai_call`

* SDK function: `resumeAiCall`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`

#### Function signature

```ts theme={null}
export async function resumeAiCall(
  config: {
  input: ResumeAiCallInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ResumeAiCallResult>
```

#### Example request body

```json theme={null}
{
  "action": "resume_ai_call",
  "input": {
    "callUuid": "<string>"
  }
}
```

#### Input type

```ts theme={null}
export type ResumeAiCallInput = {
  callUuid: string;
};
```

#### Inferred success result type

```ts theme={null}
export type InferResumeAiCallResult = Record<string, any>;
```

#### Result envelope type

```ts theme={null}
export type ResumeAiCallResult = | { success: true; data: InferResumeAiCallResult; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateResumeAiCall(
  config: {
  input: ResumeAiCallInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `transfer_call_to_queue`

* SDK function: `transferCallToQueue`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`

#### Function signature

```ts theme={null}
export async function transferCallToQueue(
  config: {
  input: TransferCallToQueueInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<TransferCallToQueueResult>
```

#### Example request body

```json theme={null}
{
  "action": "transfer_call_to_queue",
  "input": {
    "callUuid": "<string>"
  }
}
```

#### Input type

```ts theme={null}
export type TransferCallToQueueInput = {
  callUuid: string;
};
```

#### Inferred success result type

```ts theme={null}
export type InferTransferCallToQueueResult = Record<string, any>;
```

#### Result envelope type

```ts theme={null}
export type TransferCallToQueueResult = | { success: true; data: InferTransferCallToQueueResult; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateTransferCallToQueue(
  config: {
  input: TransferCallToQueueInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `leave_call`

* SDK function: `leaveCall`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`

#### Function signature

```ts theme={null}
export async function leaveCall(
  config: {
  input: LeaveCallInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<LeaveCallResult>
```

#### Example request body

```json theme={null}
{
  "action": "leave_call",
  "input": {
    "callUuid": "<string>"
  }
}
```

#### Input type

```ts theme={null}
export type LeaveCallInput = {
  callUuid: string;
  reason?: string;
};
```

#### Inferred success result type

```ts theme={null}
export type InferLeaveCallResult = Record<string, any>;
```

#### Result envelope type

```ts theme={null}
export type LeaveCallResult = | { success: true; data: InferLeaveCallResult; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateLeaveCall(
  config: {
  input: LeaveCallInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `end_call`

* SDK function: `endCall`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`

#### Function signature

```ts theme={null}
export async function endCall(
  config: {
  input: EndCallInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<EndCallResult>
```

#### Example request body

```json theme={null}
{
  "action": "end_call",
  "input": {
    "callUuid": "<string>"
  }
}
```

#### Input type

```ts theme={null}
export type EndCallInput = {
  callUuid: string;
};
```

#### Inferred success result type

```ts theme={null}
export type InferEndCallResult = Record<string, any>;
```

#### Result envelope type

```ts theme={null}
export type EndCallResult = | { success: true; data: InferEndCallResult; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateEndCall(
  config: {
  input: EndCallInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `start_outbound_call`

* SDK function: `startOutboundCall`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input?`

#### Function signature

```ts theme={null}
export async function startOutboundCall(
  config: {
  input?: StartOutboundCallInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<StartOutboundCallResult>
```

#### Example request body

```json theme={null}
{
  "action": "start_outbound_call",
  "input": {}
}
```

#### Input type

```ts theme={null}
export type StartOutboundCallInput = {
  contactId?: UUID;
  phoneNumber?: string;
  aiAgentId?: UUID;
};
```

#### Inferred success result type

```ts theme={null}
export type InferStartOutboundCallResult = Record<string, any>;
```

#### Result envelope type

```ts theme={null}
export type StartOutboundCallResult = | { success: true; data: InferStartOutboundCallResult; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateStartOutboundCall(
  config: {
  input?: StartOutboundCallInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `start_bulk_outbound_call`

* SDK function: `startBulkOutboundCall`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input?`

#### Function signature

```ts theme={null}
export async function startBulkOutboundCall(
  config: {
  input?: StartBulkOutboundCallInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<StartBulkOutboundCallResult>
```

#### Example request body

```json theme={null}
{
  "action": "start_bulk_outbound_call",
  "input": {}
}
```

#### Input type

```ts theme={null}
export type StartBulkOutboundCallInput = {
  contactIds?: Array<UUID>;
  groupId?: UUID;
  aiAgentId?: UUID;
  concurrency?: number;
  contactLimit?: number;
  contactRangeStart?: number;
  contactRangeEnd?: number;
};
```

#### Inferred success result type

```ts theme={null}
export type InferStartBulkOutboundCallResult = Record<string, any>;
```

#### Result envelope type

```ts theme={null}
export type StartBulkOutboundCallResult = | { success: true; data: InferStartBulkOutboundCallResult; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateStartBulkOutboundCall(
  config: {
  input?: StartBulkOutboundCallInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_call_classifications`

* SDK function: `listCallClassifications`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`

#### Function signature

```ts theme={null}
export async function listCallClassifications<Fields extends ListCallClassificationsFields>(
  config: {
  fields: Fields;
  filter?: CallClassificationFilterInput;
  sort?: string;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ListCallClassificationsResult<Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "list_call_classifications",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt"
}
```

#### Field selection type

```ts theme={null}
export type ListCallClassificationsFields = UnifiedFieldSelection<CallClassificationResourceSchema>[];
```

#### Selectable resource fields (`CallClassification`)

* `id`, `callId`, `status`, `predictedLabel`, `predictedConfidence`, `effectiveLabel`, `effectiveSource`, `provider`, `model`, `taxonomyVersion`, `promptVersion`, `classificationSummary`, `outcomeReason`, `nextAction`, `tokenUsage`, `providerResponseId`, `lastError`, `classifiedAt`, `overriddenAt`, `overriddenByUserId`, `insertedAt`, `updatedAt`

#### Inferred success result type

```ts theme={null}
export type InferListCallClassificationsResult<
  Fields extends ListCallClassificationsFields,
> = Array<InferResult<CallClassificationResourceSchema, Fields>>;
```

#### Result envelope type

```ts theme={null}
export type ListCallClassificationsResult<Fields extends ListCallClassificationsFields> = | { success: true; data: InferListCallClassificationsResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListCallClassifications(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `override_call_classification`

* SDK function: `overrideCallClassification`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `identity`, `input`, `fields?`

#### Function signature

```ts theme={null}
export async function overrideCallClassification<Fields extends OverrideCallClassificationFields | undefined = undefined>(
  config: {
  identity: UUID;
  input: OverrideCallClassificationInput;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<OverrideCallClassificationResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "override_call_classification",
  "identity": "<uuid>",
  "input": {
    "label": "<string>"
  },
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type OverrideCallClassificationInput = {
  label: string;
};
```

#### Field selection type

```ts theme={null}
export type OverrideCallClassificationFields = UnifiedFieldSelection<CallClassificationResourceSchema>[];
```

#### Selectable resource fields (`CallClassification`)

* `id`, `callId`, `status`, `predictedLabel`, `predictedConfidence`, `effectiveLabel`, `effectiveSource`, `provider`, `model`, `taxonomyVersion`, `promptVersion`, `classificationSummary`, `outcomeReason`, `nextAction`, `tokenUsage`, `providerResponseId`, `lastError`, `classifiedAt`, `overriddenAt`, `overriddenByUserId`, `insertedAt`, `updatedAt`

#### Inferred success result type

```ts theme={null}
export type InferOverrideCallClassificationResult<
  Fields extends OverrideCallClassificationFields | undefined,
> = InferResult<CallClassificationResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type OverrideCallClassificationResult<Fields extends OverrideCallClassificationFields | undefined = undefined> = | { success: true; data: InferOverrideCallClassificationResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateOverrideCallClassification(
  config: {
  identity: UUID | string;
  input: OverrideCallClassificationInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `clear_call_classification_override`

* SDK function: `clearCallClassificationOverride`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `identity`, `fields?`

#### Function signature

```ts theme={null}
export async function clearCallClassificationOverride<Fields extends ClearCallClassificationOverrideFields | undefined = undefined>(
  config: {
  identity: UUID;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ClearCallClassificationOverrideResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "clear_call_classification_override",
  "identity": "<uuid>",
  "fields": [
    "id"
  ]
}
```

#### Field selection type

```ts theme={null}
export type ClearCallClassificationOverrideFields = UnifiedFieldSelection<CallClassificationResourceSchema>[];
```

#### Selectable resource fields (`CallClassification`)

* `id`, `callId`, `status`, `predictedLabel`, `predictedConfidence`, `effectiveLabel`, `effectiveSource`, `provider`, `model`, `taxonomyVersion`, `promptVersion`, `classificationSummary`, `outcomeReason`, `nextAction`, `tokenUsage`, `providerResponseId`, `lastError`, `classifiedAt`, `overriddenAt`, `overriddenByUserId`, `insertedAt`, `updatedAt`

#### Inferred success result type

```ts theme={null}
export type InferClearCallClassificationOverrideResult<
  Fields extends ClearCallClassificationOverrideFields | undefined,
> = InferResult<CallClassificationResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type ClearCallClassificationOverrideResult<Fields extends ClearCallClassificationOverrideFields | undefined = undefined> = | { success: true; data: InferClearCallClassificationOverrideResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateClearCallClassificationOverride(
  config: {
  identity: UUID | string;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_call_transcripts`

* SDK function: `listCallTranscripts`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`, `page?`

#### Function signature

```ts theme={null}
export async function listCallTranscripts<Fields extends ListCallTranscriptsFields, Config extends ListCallTranscriptsConfig = ListCallTranscriptsConfig>(
  config: Config & { fields: Fields }
): Promise<ListCallTranscriptsResult<Fields, Config["page"]>>
```

#### Example request body

```json theme={null}
{
  "action": "list_call_transcripts",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt",
  "page": {
    "limit": 20
  }
}
```

#### Request config type

```ts theme={null}
export type ListCallTranscriptsConfig = {
  fields: ListCallTranscriptsFields;
  filter?: CallTranscriptFilterInput;
  sort?: string;
  page?: (
    {
      limit?: number;
      offset?: number;
      count?: boolean;
    } | {
      limit?: number;
      after?: string;
      before?: string;
    }
  );
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
};
```

#### Field selection type

```ts theme={null}
export type ListCallTranscriptsFields = UnifiedFieldSelection<CallTranscriptResourceSchema>[];
```

#### Selectable resource fields (`CallTranscript`)

* `id`, `content`, `speaker`, `source`, `itemId`, `contentIndex`, `occurredAt`, `callId`

#### Inferred success result type

```ts theme={null}
export type InferListCallTranscriptsResult<
  Fields extends ListCallTranscriptsFields | undefined,
  Page extends ListCallTranscriptsConfig["page"] = undefined
> = ConditionalPaginatedResultMixed<Page, Array<InferResult<CallTranscriptResourceSchema, Fields>>, {
  results: Array<InferResult<CallTranscriptResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  offset: number;
  count?: number | null;
  type: "offset";
}, {
  results: Array<InferResult<CallTranscriptResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  after: string | null;
  before: string | null;
  previousPage: string;
  nextPage: string;
  count?: number | null;
  type: "keyset";
}>;
```

#### Result envelope type

```ts theme={null}
export type ListCallTranscriptsResult<Fields extends ListCallTranscriptsFields, Page extends ListCallTranscriptsConfig["page"] = undefined> = | { success: true; data: InferListCallTranscriptsResult<Fields, Page>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListCallTranscripts(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_email_identities`

* SDK function: `listEmailIdentities`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`, `page?`

#### Function signature

```ts theme={null}
export async function listEmailIdentities<Fields extends ListEmailIdentitiesFields, Config extends ListEmailIdentitiesConfig = ListEmailIdentitiesConfig>(
  config: Config & { fields: Fields }
): Promise<ListEmailIdentitiesResult<Fields, Config["page"]>>
```

#### Example request body

```json theme={null}
{
  "action": "list_email_identities",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt",
  "page": {
    "limit": 20
  }
}
```

#### Request config type

```ts theme={null}
export type ListEmailIdentitiesConfig = {
  fields: ListEmailIdentitiesFields;
  filter?: EmailIdentityFilterInput;
  sort?: string;
  page?: (
    {
      limit?: number;
      offset?: number;
      count?: boolean;
    } | {
      limit?: number;
      after?: string;
      before?: string;
    }
  );
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
};
```

#### Field selection type

```ts theme={null}
export type ListEmailIdentitiesFields = UnifiedFieldSelection<EmailIdentityResourceSchema>[];
```

#### Selectable resource fields (`EmailIdentity`)

* `id`, `ownerType`, `ownerId`, `localPart`, `domain`, `displayName`, `active`, `defaultOutbound`, `metadata`, `emailMailboxId`

#### Inferred success result type

```ts theme={null}
export type InferListEmailIdentitiesResult<
  Fields extends ListEmailIdentitiesFields | undefined,
  Page extends ListEmailIdentitiesConfig["page"] = undefined
> = ConditionalPaginatedResultMixed<Page, Array<InferResult<EmailIdentityResourceSchema, Fields>>, {
  results: Array<InferResult<EmailIdentityResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  offset: number;
  count?: number | null;
  type: "offset";
}, {
  results: Array<InferResult<EmailIdentityResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  after: string | null;
  before: string | null;
  previousPage: string;
  nextPage: string;
  count?: number | null;
  type: "keyset";
}>;
```

#### Result envelope type

```ts theme={null}
export type ListEmailIdentitiesResult<Fields extends ListEmailIdentitiesFields, Page extends ListEmailIdentitiesConfig["page"] = undefined> = | { success: true; data: InferListEmailIdentitiesResult<Fields, Page>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListEmailIdentities(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `create_email_identity`

* SDK function: `createEmailIdentity`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`, `fields?`

#### Function signature

```ts theme={null}
export async function createEmailIdentity<Fields extends CreateEmailIdentityFields | undefined = undefined>(
  config: {
  input: CreateEmailIdentityInput;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<CreateEmailIdentityResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "create_email_identity",
  "input": {
    "ownerType": "organisation",
    "ownerId": "<uuid>",
    "localPart": "<string>",
    "domain": "<string>",
    "organisationId": "<uuid>"
  },
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type CreateEmailIdentityInput = {
  ownerType: "organisation" | "ai_agent" | "user";
  ownerId: UUID;
  localPart: string;
  domain: string;
  displayName?: string | null;
  active?: boolean;
  defaultOutbound?: boolean;
  metadata?: Record<string, any>;
  emailMailboxId?: UUID | null;
  organisationId: UUID;
};
```

#### Field selection type

```ts theme={null}
export type CreateEmailIdentityFields = UnifiedFieldSelection<EmailIdentityResourceSchema>[];
```

#### Selectable resource fields (`EmailIdentity`)

* `id`, `ownerType`, `ownerId`, `localPart`, `domain`, `displayName`, `active`, `defaultOutbound`, `metadata`, `emailMailboxId`

#### Inferred success result type

```ts theme={null}
export type InferCreateEmailIdentityResult<
  Fields extends CreateEmailIdentityFields | undefined,
> = InferResult<EmailIdentityResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type CreateEmailIdentityResult<Fields extends CreateEmailIdentityFields | undefined = undefined> = | { success: true; data: InferCreateEmailIdentityResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateCreateEmailIdentity(
  config: {
  input: CreateEmailIdentityInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `update_email_identity`

* SDK function: `updateEmailIdentity`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `identity`, `input`, `fields?`

#### Function signature

```ts theme={null}
export async function updateEmailIdentity<Fields extends UpdateEmailIdentityFields | undefined = undefined>(
  config: {
  identity: UUID;
  input: UpdateEmailIdentityInput;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<UpdateEmailIdentityResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "update_email_identity",
  "identity": "<uuid>",
  "input": {},
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type UpdateEmailIdentityInput = {
  ownerType?: "organisation" | "ai_agent" | "user";
  ownerId?: UUID;
  localPart?: string;
  domain?: string;
  displayName?: string | null;
  active?: boolean;
  defaultOutbound?: boolean;
  metadata?: Record<string, any>;
  emailMailboxId?: UUID | null;
};
```

#### Field selection type

```ts theme={null}
export type UpdateEmailIdentityFields = UnifiedFieldSelection<EmailIdentityResourceSchema>[];
```

#### Selectable resource fields (`EmailIdentity`)

* `id`, `ownerType`, `ownerId`, `localPart`, `domain`, `displayName`, `active`, `defaultOutbound`, `metadata`, `emailMailboxId`

#### Inferred success result type

```ts theme={null}
export type InferUpdateEmailIdentityResult<
  Fields extends UpdateEmailIdentityFields | undefined,
> = InferResult<EmailIdentityResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type UpdateEmailIdentityResult<Fields extends UpdateEmailIdentityFields | undefined = undefined> = | { success: true; data: InferUpdateEmailIdentityResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateUpdateEmailIdentity(
  config: {
  identity: UUID | string;
  input: UpdateEmailIdentityInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `delete_email_identity`

* SDK function: `deleteEmailIdentity`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `identity`

#### Function signature

```ts theme={null}
export async function deleteEmailIdentity(
  config: {
  identity: UUID;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<DeleteEmailIdentityResult>
```

#### Example request body

```json theme={null}
{
  "action": "delete_email_identity",
  "identity": "<uuid>"
}
```

#### Result envelope type

```ts theme={null}
export type DeleteEmailIdentityResult = | { success: true; data: {}; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateDeleteEmailIdentity(
  config: {
  identity: UUID | string;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `list_contacts`

* SDK function: `listContacts`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `fields`, `filter?`, `sort?`, `page?`

#### Function signature

```ts theme={null}
export async function listContacts<Fields extends ListContactsFields, Config extends ListContactsConfig = ListContactsConfig>(
  config: Config & { fields: Fields }
): Promise<ListContactsResult<Fields, Config["page"]>>
```

#### Example request body

```json theme={null}
{
  "action": "list_contacts",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt",
  "page": {
    "limit": 20
  }
}
```

#### Request config type

```ts theme={null}
export type ListContactsConfig = {
  fields: ListContactsFields;
  filter?: ContactFilterInput;
  sort?: string;
  page?: (
    {
      limit?: number;
      offset?: number;
      count?: boolean;
    } | {
      limit?: number;
      after?: string;
      before?: string;
    }
  );
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
};
```

#### Field selection type

```ts theme={null}
export type ListContactsFields = UnifiedFieldSelection<ContactResourceSchema>[];
```

#### Selectable resource fields (`Contact`)

* `id`, `fullName`, `email`, `emailVerifiedAt`, `dateOfBirth`, `phoneE164`, `phoneVerifiedAt`, `whatsappReachabilityStatus`, `whatsappJid`, `whatsappReachabilityCheckedAt`, `whatsappReachabilityError`, `metadata`, `privateMetadataKeys`, `defaultLanguage`, `languages`, `deletedAt`, `erasedAt`

#### Inferred success result type

```ts theme={null}
export type InferListContactsResult<
  Fields extends ListContactsFields | undefined,
  Page extends ListContactsConfig["page"] = undefined
> = ConditionalPaginatedResultMixed<Page, Array<InferResult<ContactResourceSchema, Fields>>, {
  results: Array<InferResult<ContactResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  offset: number;
  count?: number | null;
  type: "offset";
}, {
  results: Array<InferResult<ContactResourceSchema, Fields>>;
  hasMore: boolean;
  limit: number;
  after: string | null;
  before: string | null;
  previousPage: string;
  nextPage: string;
  count?: number | null;
  type: "keyset";
}>;
```

#### Result envelope type

```ts theme={null}
export type ListContactsResult<Fields extends ListContactsFields, Page extends ListContactsConfig["page"] = undefined> = | { success: true; data: InferListContactsResult<Fields, Page>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateListContacts(
  config: {
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `create_contact`

* SDK function: `createContact`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`, `fields?`

#### Function signature

```ts theme={null}
export async function createContact<Fields extends CreateContactFields | undefined = undefined>(
  config: {
  input: CreateContactInput;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<CreateContactResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "create_contact",
  "input": {
    "fullName": "<string>"
  },
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type CreateContactInput = {
  fullName: string;
  email?: string | null;
  emailVerifiedAt?: UtcDateTimeUsec | null;
  dateOfBirth?: AshDate | null;
  phoneE164?: string | null;
  phoneVerifiedAt?: UtcDateTimeUsec | null;
  defaultLanguage?: string | null;
  languages?: Array<string>;
  metadata?: Record<string, any> | null;
  privateMetadataKeys?: Array<string>;
};
```

#### Field selection type

```ts theme={null}
export type CreateContactFields = UnifiedFieldSelection<ContactResourceSchema>[];
```

#### Selectable resource fields (`Contact`)

* `id`, `fullName`, `email`, `emailVerifiedAt`, `dateOfBirth`, `phoneE164`, `phoneVerifiedAt`, `whatsappReachabilityStatus`, `whatsappJid`, `whatsappReachabilityCheckedAt`, `whatsappReachabilityError`, `metadata`, `privateMetadataKeys`, `defaultLanguage`, `languages`, `deletedAt`, `erasedAt`

#### Inferred success result type

```ts theme={null}
export type InferCreateContactResult<
  Fields extends CreateContactFields | undefined,
> = InferResult<ContactResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type CreateContactResult<Fields extends CreateContactFields | undefined = undefined> = | { success: true; data: InferCreateContactResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateCreateContact(
  config: {
  input: CreateContactInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `update_contact`

* SDK function: `updateContact`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `identity`, `input`, `fields?`

#### Function signature

```ts theme={null}
export async function updateContact<Fields extends UpdateContactFields | undefined = undefined>(
  config: {
  identity: UUID;
  input: UpdateContactInput;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<UpdateContactResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "update_contact",
  "identity": "<uuid>",
  "input": {},
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type UpdateContactInput = {
  fullName?: string;
  email?: string | null;
  emailVerifiedAt?: UtcDateTimeUsec | null;
  dateOfBirth?: AshDate | null;
  phoneE164?: string | null;
  phoneVerifiedAt?: UtcDateTimeUsec | null;
  defaultLanguage?: string | null;
  languages?: Array<string>;
  metadata?: Record<string, any> | null;
  privateMetadataKeys?: Array<string>;
};
```

#### Field selection type

```ts theme={null}
export type UpdateContactFields = UnifiedFieldSelection<ContactResourceSchema>[];
```

#### Selectable resource fields (`Contact`)

* `id`, `fullName`, `email`, `emailVerifiedAt`, `dateOfBirth`, `phoneE164`, `phoneVerifiedAt`, `whatsappReachabilityStatus`, `whatsappJid`, `whatsappReachabilityCheckedAt`, `whatsappReachabilityError`, `metadata`, `privateMetadataKeys`, `defaultLanguage`, `languages`, `deletedAt`, `erasedAt`

#### Inferred success result type

```ts theme={null}
export type InferUpdateContactResult<
  Fields extends UpdateContactFields | undefined,
> = InferResult<ContactResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type UpdateContactResult<Fields extends UpdateContactFields | undefined = undefined> = | { success: true; data: InferUpdateContactResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateUpdateContact(
  config: {
  identity: UUID | string;
  input: UpdateContactInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `archive_contact`

* SDK function: `archiveContact`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `identity`, `fields?`

#### Function signature

```ts theme={null}
export async function archiveContact<Fields extends ArchiveContactFields | undefined = undefined>(
  config: {
  identity: UUID;
  fields?: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ArchiveContactResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "archive_contact",
  "identity": "<uuid>",
  "fields": [
    "id"
  ]
}
```

#### Field selection type

```ts theme={null}
export type ArchiveContactFields = UnifiedFieldSelection<ContactResourceSchema>[];
```

#### Selectable resource fields (`Contact`)

* `id`, `fullName`, `email`, `emailVerifiedAt`, `dateOfBirth`, `phoneE164`, `phoneVerifiedAt`, `whatsappReachabilityStatus`, `whatsappJid`, `whatsappReachabilityCheckedAt`, `whatsappReachabilityError`, `metadata`, `privateMetadataKeys`, `defaultLanguage`, `languages`, `deletedAt`, `erasedAt`

#### Inferred success result type

```ts theme={null}
export type InferArchiveContactResult<
  Fields extends ArchiveContactFields | undefined,
> = InferResult<ContactResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type ArchiveContactResult<Fields extends ArchiveContactFields | undefined = undefined> = | { success: true; data: InferArchiveContactResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateArchiveContact(
  config: {
  identity: UUID | string;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

### `delete_contact`

* SDK function: `deleteContact`
* Run endpoint: `POST https://api.sippet.ai/rpc/public/run`
* Validate endpoint: `POST https://api.sippet.ai/rpc/public/validate`
* Payload keys: `input`, `fields`

#### Function signature

```ts theme={null}
export async function deleteContact<Fields extends DeleteContactFields | undefined = undefined>(
  config: {
  input: DeleteContactInput;
  fields: Fields;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<DeleteContactResult<Fields extends undefined ? [] : Fields>>
```

#### Example request body

```json theme={null}
{
  "action": "delete_contact",
  "input": {
    "contactId": "<uuid>"
  },
  "fields": [
    "id"
  ]
}
```

#### Input type

```ts theme={null}
export type DeleteContactInput = {
  contactId: UUID;
};
```

#### Field selection type

```ts theme={null}
export type DeleteContactFields = UnifiedFieldSelection<ContactResourceSchema>[];
```

#### Selectable resource fields (`Contact`)

* `id`, `fullName`, `email`, `emailVerifiedAt`, `dateOfBirth`, `phoneE164`, `phoneVerifiedAt`, `whatsappReachabilityStatus`, `whatsappJid`, `whatsappReachabilityCheckedAt`, `whatsappReachabilityError`, `metadata`, `privateMetadataKeys`, `defaultLanguage`, `languages`, `deletedAt`, `erasedAt`

#### Inferred success result type

```ts theme={null}
export type InferDeleteContactResult<
  Fields extends DeleteContactFields | undefined,
> = InferResult<ContactResourceSchema, Fields>;
```

#### Result envelope type

```ts theme={null}
export type DeleteContactResult<Fields extends DeleteContactFields | undefined = undefined> = | { success: true; data: InferDeleteContactResult<Fields>; }
| { success: false; errors: AshRpcError[]; }

;
```

#### Validator signature

```ts theme={null}
export async function validateDeleteContact(
  config: {
  input: DeleteContactInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
```

## Related guides

* Quickstart: `/quickstart`
* Frontend SDK overview: `/sdk-js/introduction`
* Realtime patterns: `/guides/realtime-telephony-patterns`
