Skip to main content

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

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

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

/**
 * 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

/**
 * 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 actionSDK functionPayload keys
list_conversationslistConversationsfields, filter?, sort?, page?
list_email_classificationslistEmailClassificationsfields, filter?, sort?
list_call_participantslistCallParticipantsfields, filter?, sort?, page?
list_bulk_outbound_call_entrieslistBulkOutboundCallEntriesfields, filter?, sort?, page?
list_call_ai_audit_eventslistCallAiAuditEventsfields, filter?, sort?
list_bulk_outbound_callslistBulkOutboundCallsfields, filter?, sort?, page?
list_campaignslistCampaignsnone
get_campaigngetCampaigninput
list_call_queue_entrieslistCallQueueEntriesfields, filter?, sort?, page?
accept_call_queue_entryacceptCallQueueEntryidentity, fields?
get_call_queue_entrygetCallQueueEntryinput, fields
list_conversation_eventslistConversationEventsfields, filter?, sort?
who_am_iwhoAmIfields
issue_operator_access_tokenissueOperatorAccessTokeninput
list_ai_agentslistAiAgentsfields, filter?, sort?, page?
list_operator_statuseslistOperatorStatusesfields, filter?, sort?, page?
set_operator_statussetOperatorStatusinput, fields?
list_email_mailboxeslistEmailMailboxesfields, filter?, sort?, page?
create_email_mailboxcreateEmailMailboxinput, fields?
update_email_mailboxupdateEmailMailboxidentity, input, fields?
delete_email_mailboxdeleteEmailMailboxidentity
import_inbound_emailimportInboundEmailinput, fields
list_email_templateslistEmailTemplatesfields, filter?, sort?, page?
create_email_templatecreateEmailTemplateinput, fields?
update_email_templateupdateEmailTemplateidentity, input, fields?
delete_email_templatedeleteEmailTemplateidentity
list_callslistCallsfields, filter?, sort?
create_callcreateCallinput, fields?
flag_call_for_reviewflagCallForReviewidentity, fields?
clear_call_review_flagclearCallReviewFlagidentity, fields?
call_codeccallCodecinput
barge_callbargeCallinput
issue_operator_media_accessissueOperatorMediaAccessinput
resume_ai_callresumeAiCallinput
transfer_call_to_queuetransferCallToQueueinput
leave_callleaveCallinput
end_callendCallinput
start_outbound_callstartOutboundCallinput?
start_bulk_outbound_callstartBulkOutboundCallinput?
list_call_classificationslistCallClassificationsfields, filter?, sort?
override_call_classificationoverrideCallClassificationidentity, input, fields?
clear_call_classification_overrideclearCallClassificationOverrideidentity, fields?
list_call_transcriptslistCallTranscriptsfields, filter?, sort?, page?
list_email_identitieslistEmailIdentitiesfields, filter?, sort?, page?
create_email_identitycreateEmailIdentityinput, fields?
update_email_identityupdateEmailIdentityidentity, input, fields?
delete_email_identitydeleteEmailIdentityidentity
list_contactslistContactsfields, filter?, sort?, page?
create_contactcreateContactinput, fields?
update_contactupdateContactidentity, input, fields?
archive_contactarchiveContactidentity, fields?
delete_contactdeleteContactinput, 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

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

Example request body

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

Request config type

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

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

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

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

;

Validator signature

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

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

{
  "action": "list_email_classifications",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt"
}

Field selection type

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

export type InferListEmailClassificationsResult<
  Fields extends ListEmailClassificationsFields,
> = Array<InferResult<EmailClassificationResourceSchema, Fields>>;

Result envelope type

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

;

Validator signature

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

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

Example request body

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

Request config type

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

export type ListCallParticipantsFields = UnifiedFieldSelection<CallParticipantResourceSchema>[];

Selectable resource fields (CallParticipant)

  • id, memberUuid, role, joinedAt, leftAt, callId, organisationId

Inferred success result type

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

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

;

Validator signature

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

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

Example request body

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

Request config type

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

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

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

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

;

Validator signature

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

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

{
  "action": "list_call_ai_audit_events",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt"
}

Field selection type

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

export type InferListCallAiAuditEventsResult<
  Fields extends ListCallAiAuditEventsFields,
> = Array<InferResult<CallAiAuditEventResourceSchema, Fields>>;

Result envelope type

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

;

Validator signature

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

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

Example request body

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

Request config type

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

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

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

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

;

Validator signature

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

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

Example request body

{
  "action": "list_campaigns"
}

Inferred success result type

export type InferListCampaignsResult = Record<string, any>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "get_campaign",
  "input": {
    "id": "<uuid>"
  }
}

Input type

export type GetCampaignInput = {
  id: UUID;
};

Inferred success result type

export type InferGetCampaignResult = Record<string, any>;

Result envelope type

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

;

Validator signature

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

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

Example request body

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

Request config type

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

export type ListCallQueueEntriesFields = UnifiedFieldSelection<CallQueueEntryResourceSchema>[];

Selectable resource fields (CallQueueEntry)

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

Inferred success result type

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

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

;

Validator signature

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

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

{
  "action": "accept_call_queue_entry",
  "identity": "<uuid>",
  "fields": [
    "id"
  ]
}

Field selection type

export type AcceptCallQueueEntryFields = UnifiedFieldSelection<CallQueueEntryResourceSchema>[];

Selectable resource fields (CallQueueEntry)

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

Inferred success result type

export type InferAcceptCallQueueEntryResult<
  Fields extends AcceptCallQueueEntryFields | undefined,
> = InferResult<CallQueueEntryResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "get_call_queue_entry",
  "input": {
    "id": "<uuid>"
  },
  "fields": [
    "id"
  ]
}

Input type

export type GetCallQueueEntryInput = {
  id: UUID;
};

Field selection type

export type GetCallQueueEntryFields = UnifiedFieldSelection<CallQueueEntryResourceSchema>[];

Selectable resource fields (CallQueueEntry)

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

Inferred success result type

export type InferGetCallQueueEntryResult<
  Fields extends GetCallQueueEntryFields,
> = InferResult<CallQueueEntryResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "list_conversation_events",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt"
}

Field selection type

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

export type InferListConversationEventsResult<
  Fields extends ListConversationEventsFields,
> = Array<InferResult<ConversationEventResourceSchema, Fields>>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "who_am_i",
  "fields": [
    "id"
  ]
}

Field selection type

export type WhoAmIFields = UnifiedFieldSelection<UserResourceSchema>[];

Selectable resource fields (User)

  • id, fullName, email, confirmedAt, sipUsername

Inferred success result type

export type InferWhoAmIResult<
  Fields extends WhoAmIFields,
> = InferResult<UserResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "issue_operator_access_token",
  "input": {
    "operatorEmail": "<string>"
  }
}

Input type

export type IssueOperatorAccessTokenInput = {
  operatorEmail: string;
};

Inferred success result type

export type InferIssueOperatorAccessTokenResult = Record<string, any>;

Result envelope type

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

;

Validator signature

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

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

Example request body

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

Request config type

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

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

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

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

;

Validator signature

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

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

Example request body

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

Request config type

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

export type ListOperatorStatusesFields = UnifiedFieldSelection<OperatorStatusResourceSchema>[];

Selectable resource fields (OperatorStatus)

  • id, sipUserId, agentName, status, source, changedByUserId

Inferred success result type

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

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

;

Validator signature

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

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

{
  "action": "set_operator_status",
  "input": {
    "sipUserId": "<uuid>"
  },
  "fields": [
    "id"
  ]
}

Input type

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

Field selection type

export type SetOperatorStatusFields = UnifiedFieldSelection<OperatorStatusResourceSchema>[];

Selectable resource fields (OperatorStatus)

  • id, sipUserId, agentName, status, source, changedByUserId

Inferred success result type

export type InferSetOperatorStatusResult<
  Fields extends SetOperatorStatusFields | undefined,
> = InferResult<OperatorStatusResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

Example request body

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

Request config type

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

export type ListEmailMailboxesFields = UnifiedFieldSelection<EmailMailboxResourceSchema>[];

Selectable resource fields (EmailMailbox)

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

Inferred success result type

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

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

;

Validator signature

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

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

{
  "action": "create_email_mailbox",
  "input": {
    "inboundDomain": "<string>",
    "organisationId": "<uuid>"
  },
  "fields": [
    "id"
  ]
}

Input type

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

export type CreateEmailMailboxFields = UnifiedFieldSelection<EmailMailboxResourceSchema>[];

Selectable resource fields (EmailMailbox)

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

Inferred success result type

export type InferCreateEmailMailboxResult<
  Fields extends CreateEmailMailboxFields | undefined,
> = InferResult<EmailMailboxResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "update_email_mailbox",
  "identity": "<uuid>",
  "input": {},
  "fields": [
    "id"
  ]
}

Input type

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

export type UpdateEmailMailboxFields = UnifiedFieldSelection<EmailMailboxResourceSchema>[];

Selectable resource fields (EmailMailbox)

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

Inferred success result type

export type InferUpdateEmailMailboxResult<
  Fields extends UpdateEmailMailboxFields | undefined,
> = InferResult<EmailMailboxResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "delete_email_mailbox",
  "identity": "<uuid>"
}

Result envelope type

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

;

Validator signature

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

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

{
  "action": "import_inbound_email",
  "input": {
    "recipientAddress": "<string>"
  },
  "fields": [
    "id"
  ]
}

Input type

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

Field selection type

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

export type InferImportInboundEmailResult<
  Fields extends ImportInboundEmailFields | undefined,
> = InferResult<CommunicationMessageResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

Example request body

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

Request config type

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

export type ListEmailTemplatesFields = UnifiedFieldSelection<EmailTemplateResourceSchema>[];

Selectable resource fields (EmailTemplate)

  • id, model, name, subject, body, variables, active

Inferred success result type

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

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

;

Validator signature

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

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

{
  "action": "create_email_template",
  "input": {
    "model": "<string>",
    "name": "<string>",
    "subject": "<string>",
    "body": "<string>"
  },
  "fields": [
    "id"
  ]
}

Input type

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

Field selection type

export type CreateEmailTemplateFields = UnifiedFieldSelection<EmailTemplateResourceSchema>[];

Selectable resource fields (EmailTemplate)

  • id, model, name, subject, body, variables, active

Inferred success result type

export type InferCreateEmailTemplateResult<
  Fields extends CreateEmailTemplateFields | undefined,
> = InferResult<EmailTemplateResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "update_email_template",
  "identity": "<uuid>",
  "input": {},
  "fields": [
    "id"
  ]
}

Input type

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

Field selection type

export type UpdateEmailTemplateFields = UnifiedFieldSelection<EmailTemplateResourceSchema>[];

Selectable resource fields (EmailTemplate)

  • id, model, name, subject, body, variables, active

Inferred success result type

export type InferUpdateEmailTemplateResult<
  Fields extends UpdateEmailTemplateFields | undefined,
> = InferResult<EmailTemplateResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "delete_email_template",
  "identity": "<uuid>"
}

Result envelope type

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

;

Validator signature

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

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

{
  "action": "list_calls",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt"
}

Field selection type

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

export type InferListCallsResult<
  Fields extends ListCallsFields,
> = Array<InferResult<CallResourceSchema, Fields>>;

Result envelope type

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

;

Validator signature

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

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

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

Input type

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

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

export type InferCreateCallResult<
  Fields extends CreateCallFields | undefined,
> = InferResult<CallResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "flag_call_for_review",
  "identity": "<uuid>",
  "fields": [
    "id"
  ]
}

Field selection type

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

export type InferFlagCallForReviewResult<
  Fields extends FlagCallForReviewFields | undefined,
> = InferResult<CallResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "clear_call_review_flag",
  "identity": "<uuid>",
  "fields": [
    "id"
  ]
}

Field selection type

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

export type InferClearCallReviewFlagResult<
  Fields extends ClearCallReviewFlagFields | undefined,
> = InferResult<CallResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "call_codec",
  "input": {
    "callUuid": "<string>"
  }
}

Input type

export type CallCodecInput = {
  callUuid: string;
};

Inferred success result type

export type InferCallCodecResult = Record<string, any>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "barge_call",
  "input": {
    "callUuid": "<string>"
  }
}

Input type

export type BargeCallInput = {
  callUuid: string;
};

Inferred success result type

export type InferBargeCallResult = Record<string, any>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "issue_operator_media_access",
  "input": {
    "callUuid": "<string>"
  }
}

Input type

export type IssueOperatorMediaAccessInput = {
  callUuid: string;
};

Inferred success result type

export type InferIssueOperatorMediaAccessResult = Record<string, any>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "resume_ai_call",
  "input": {
    "callUuid": "<string>"
  }
}

Input type

export type ResumeAiCallInput = {
  callUuid: string;
};

Inferred success result type

export type InferResumeAiCallResult = Record<string, any>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "transfer_call_to_queue",
  "input": {
    "callUuid": "<string>"
  }
}

Input type

export type TransferCallToQueueInput = {
  callUuid: string;
};

Inferred success result type

export type InferTransferCallToQueueResult = Record<string, any>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "leave_call",
  "input": {
    "callUuid": "<string>"
  }
}

Input type

export type LeaveCallInput = {
  callUuid: string;
  reason?: string;
};

Inferred success result type

export type InferLeaveCallResult = Record<string, any>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "end_call",
  "input": {
    "callUuid": "<string>"
  }
}

Input type

export type EndCallInput = {
  callUuid: string;
};

Inferred success result type

export type InferEndCallResult = Record<string, any>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "start_outbound_call",
  "input": {}
}

Input type

export type StartOutboundCallInput = {
  contactId?: UUID;
  phoneNumber?: string;
  aiAgentId?: UUID;
};

Inferred success result type

export type InferStartOutboundCallResult = Record<string, any>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "start_bulk_outbound_call",
  "input": {}
}

Input type

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

Inferred success result type

export type InferStartBulkOutboundCallResult = Record<string, any>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "list_call_classifications",
  "fields": [
    "id"
  ],
  "filter": {
    "id": {
      "eq": "<uuid>"
    }
  },
  "sort": "insertedAt"
}

Field selection type

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

export type InferListCallClassificationsResult<
  Fields extends ListCallClassificationsFields,
> = Array<InferResult<CallClassificationResourceSchema, Fields>>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "override_call_classification",
  "identity": "<uuid>",
  "input": {
    "label": "<string>"
  },
  "fields": [
    "id"
  ]
}

Input type

export type OverrideCallClassificationInput = {
  label: string;
};

Field selection type

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

export type InferOverrideCallClassificationResult<
  Fields extends OverrideCallClassificationFields | undefined,
> = InferResult<CallClassificationResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "clear_call_classification_override",
  "identity": "<uuid>",
  "fields": [
    "id"
  ]
}

Field selection type

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

export type InferClearCallClassificationOverrideResult<
  Fields extends ClearCallClassificationOverrideFields | undefined,
> = InferResult<CallClassificationResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

Example request body

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

Request config type

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

export type ListCallTranscriptsFields = UnifiedFieldSelection<CallTranscriptResourceSchema>[];

Selectable resource fields (CallTranscript)

  • id, content, speaker, source, itemId, contentIndex, occurredAt, callId

Inferred success result type

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

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

;

Validator signature

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

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

Example request body

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

Request config type

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

export type ListEmailIdentitiesFields = UnifiedFieldSelection<EmailIdentityResourceSchema>[];

Selectable resource fields (EmailIdentity)

  • id, ownerType, ownerId, localPart, domain, displayName, active, defaultOutbound, metadata, emailMailboxId

Inferred success result type

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

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

;

Validator signature

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

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

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

Input type

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

export type CreateEmailIdentityFields = UnifiedFieldSelection<EmailIdentityResourceSchema>[];

Selectable resource fields (EmailIdentity)

  • id, ownerType, ownerId, localPart, domain, displayName, active, defaultOutbound, metadata, emailMailboxId

Inferred success result type

export type InferCreateEmailIdentityResult<
  Fields extends CreateEmailIdentityFields | undefined,
> = InferResult<EmailIdentityResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "update_email_identity",
  "identity": "<uuid>",
  "input": {},
  "fields": [
    "id"
  ]
}

Input type

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

export type UpdateEmailIdentityFields = UnifiedFieldSelection<EmailIdentityResourceSchema>[];

Selectable resource fields (EmailIdentity)

  • id, ownerType, ownerId, localPart, domain, displayName, active, defaultOutbound, metadata, emailMailboxId

Inferred success result type

export type InferUpdateEmailIdentityResult<
  Fields extends UpdateEmailIdentityFields | undefined,
> = InferResult<EmailIdentityResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "delete_email_identity",
  "identity": "<uuid>"
}

Result envelope type

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

;

Validator signature

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

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

Example request body

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

Request config type

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

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

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

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

;

Validator signature

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

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

{
  "action": "create_contact",
  "input": {
    "fullName": "<string>"
  },
  "fields": [
    "id"
  ]
}

Input type

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

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

export type InferCreateContactResult<
  Fields extends CreateContactFields | undefined,
> = InferResult<ContactResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "update_contact",
  "identity": "<uuid>",
  "input": {},
  "fields": [
    "id"
  ]
}

Input type

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

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

export type InferUpdateContactResult<
  Fields extends UpdateContactFields | undefined,
> = InferResult<ContactResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "archive_contact",
  "identity": "<uuid>",
  "fields": [
    "id"
  ]
}

Field selection type

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

export type InferArchiveContactResult<
  Fields extends ArchiveContactFields | undefined,
> = InferResult<ContactResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

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

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

{
  "action": "delete_contact",
  "input": {
    "contactId": "<uuid>"
  },
  "fields": [
    "id"
  ]
}

Input type

export type DeleteContactInput = {
  contactId: UUID;
};

Field selection type

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

export type InferDeleteContactResult<
  Fields extends DeleteContactFields | undefined,
> = InferResult<ContactResourceSchema, Fields>;

Result envelope type

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

;

Validator signature

export async function validateDeleteContact(
  config: {
  input: DeleteContactInput;
  headers?: Record<string, string>;
  fetchOptions?: RequestInit;
  customFetch?: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
}
): Promise<ValidationResult>
  • Quickstart: /quickstart
  • Frontend SDK overview: /sdk-js/introduction
  • Realtime patterns: /guides/realtime-telephony-patterns