Skip to main content

Messaging Settings API

Usageโ€‹

import { epilot } from '@epilot/sdk'

epilot.authorize(() => '<token>')
const { data } = await epilot.emailSettings.provisionEpilotEmailAddress(...)

Tree-shakeable importโ€‹

import { getClient, authorize } from '@epilot/sdk/email-settings'

const emailSettingsClient = getClient()
authorize(emailSettingsClient, () => '<token>')
const { data } = await emailSettingsClient.provisionEpilotEmailAddress(...)

Operationsโ€‹

Email addresses

Shared inboxes

Inbox buckets

O365 Outlook Connection

Settings

Domains

Schemas

provisionEpilotEmailAddressโ€‹

Provisions or reactivates an epilot-managed email address for the organization.

PUT /v2/email-settings/email-addresses/epilot:provision

const { data } = await client.provisionEpilotEmailAddress(
null,
{
address: 'mycompany@epilot.cloud'
},
)
Response
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456",
"address": "sales@yourcompany.com",
"name": "Sales Team",
"user_ids": ["user-123", "user-456"],
"group_ids": ["group-789"],
"default_signature_id": "sig-abc",
"shared_inbox_id": "inbox-xyz",
"is_active": true,
"is_primary": false,
"is_epilot_email_address": false
}

setEmailAddressPrimaryโ€‹

Sets the specified email address as the primary address for the organization.

POST /v2/email-settings/email-addresses/primary

const { data } = await client.setEmailAddressPrimary(
null,
{
address: 'sales@yourcompany.com'
},
)
Response
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456",
"address": "sales@yourcompany.com",
"name": "Sales Team",
"user_ids": ["user-123", "user-456"],
"group_ids": ["group-789"],
"default_signature_id": "sig-abc",
"shared_inbox_id": "inbox-xyz",
"is_active": true,
"is_primary": false,
"is_epilot_email_address": false
}

getEmailAddressโ€‹

Retrieves the details of a specific email address by its ID.

GET /v2/email-settings/email-addresses/{id}

const { data } = await client.getEmailAddress({
id: '123e4567-e89b-12d3-a456-426614174000',
})
Response
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456",
"address": "sales@yourcompany.com",
"name": "Sales Team",
"user_ids": ["user-123", "user-456"],
"group_ids": ["group-789"],
"default_signature_id": "sig-abc",
"shared_inbox_id": "inbox-xyz",
"is_active": true,
"is_primary": false,
"is_epilot_email_address": false
}

deleteEmailAddressโ€‹

Permanently deletes an email address from the organization.

DELETE /v2/email-settings/email-addresses/{id}

const { data } = await client.deleteEmailAddress({
id: '123e4567-e89b-12d3-a456-426614174000',
})

updateEmailAddressโ€‹

Updates the configuration of an existing email address.

PUT /v2/email-settings/email-addresses/{id}

const { data } = await client.updateEmailAddress(
{
id: '123e4567-e89b-12d3-a456-426614174000',
},
{
name: 'Sales Team',
user_ids: ['user-123', 'user-456'],
group_ids: ['group-789'],
default_signature_id: 'sig-abc',
shared_inbox_id: 'inbox-xyz',
is_active: true
},
)
Response
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456",
"address": "sales@yourcompany.com",
"name": "Sales Team",
"user_ids": ["user-123", "user-456"],
"group_ids": ["group-789"],
"default_signature_id": "sig-abc",
"shared_inbox_id": "inbox-xyz",
"is_active": true,
"is_primary": false,
"is_epilot_email_address": false
}

listEmailAddressesโ€‹

Retrieves all email addresses configured for the organization.

GET /v2/email-settings/email-addresses

const { data } = await client.listEmailAddresses()
Response
[
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456",
"address": "sales@yourcompany.com",
"name": "Sales Team",
"user_ids": ["user-123", "user-456"],
"group_ids": ["group-789"],
"default_signature_id": "sig-abc",
"shared_inbox_id": "inbox-xyz",
"is_active": true,
"is_primary": false,
"is_epilot_email_address": false
}
]

addEmailAddressโ€‹

Adds a new email address to the organization.

POST /v2/email-settings/email-addresses

const { data } = await client.addEmailAddress(
null,
{
address: 'support@yourcompany.com',
name: 'Customer Support',
user_ids: ['user-123'],
group_ids: ['group-456'],
default_signature_id: 'sig-789',
shared_inbox_id: 'inbox-abc'
},
)
Response
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456",
"address": "sales@yourcompany.com",
"name": "Sales Team",
"user_ids": ["user-123", "user-456"],
"group_ids": ["group-789"],
"default_signature_id": "sig-abc",
"shared_inbox_id": "inbox-xyz",
"is_active": true,
"is_primary": false,
"is_epilot_email_address": false
}

getSharedInboxโ€‹

Retrieves the details of a specific shared inbox by its ID.

GET /v2/email-settings/shared-inboxes/{id}

const { data } = await client.getSharedInbox({
id: '123e4567-e89b-12d3-a456-426614174000',
})
Response
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456",
"name": "Customer Support",
"color": "#4CAF50",
"assignees": ["user-123", "user-456"],
"description": "Incoming customer support requests",
"bucket_id": "bucket-xyz"
}

deleteSharedInboxโ€‹

Deletes a shared inbox and reroutes all associated emails to a successor inbox.

DELETE /v2/email-settings/shared-inboxes/{id}

const { data } = await client.deleteSharedInbox({
id: '123e4567-e89b-12d3-a456-426614174000',
successorInboxId: 'example',
})

updateSharedInboxโ€‹

Updates the configuration of an existing shared inbox.

PUT /v2/email-settings/shared-inboxes/{id}

const { data } = await client.updateSharedInbox(
{
id: '123e4567-e89b-12d3-a456-426614174000',
},
{
color: '#4CAF50',
name: 'Customer Support',
assignees: ['user-123', 'user-456'],
description: 'Incoming customer support requests'
},
)
Response
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456",
"name": "Customer Support",
"color": "#4CAF50",
"assignees": ["user-123", "user-456"],
"description": "Incoming customer support requests",
"bucket_id": "bucket-xyz"
}

listSharedInboxesโ€‹

Retrieves all shared inboxes configured for the organization.

GET /v2/email-settings/shared-inboxes

const { data } = await client.listSharedInboxes()
Response
[
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456",
"name": "Customer Support",
"color": "#4CAF50",
"assignees": ["user-123", "user-456"],
"description": "Incoming customer support requests",
"bucket_id": "bucket-xyz"
}
]

addSharedInboxโ€‹

Creates a new shared inbox for the organization.

POST /v2/email-settings/shared-inboxes

const { data } = await client.addSharedInbox(
null,
{
id: 'support-inbox',
color: '#2196F3',
name: 'Sales Inquiries',
assignees: ['user-123', 'user-456'],
description: 'Inbound sales and pricing requests'
},
)
Response
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456",
"name": "Customer Support",
"color": "#4CAF50",
"assignees": ["user-123", "user-456"],
"description": "Incoming customer support requests",
"bucket_id": "bucket-xyz"
}

listInboxBucketsโ€‹

Retrieves all inbox buckets for the organization.

GET /v2/email-settings/inbox-buckets

const { data } = await client.listInboxBuckets()
Response
[
{
"id": "bucket-abc",
"inbox_id": "inbox-xyz"
}
]

connectOutlookโ€‹

Returns Microsoft authorization URL for Outlook OAuth.

GET /v2/outlook/connect

const { data } = await client.connectOutlook()
Response
{
"authorization_url": "string"
}

getOutlookConnectionStatusโ€‹

Returns all Microsoft 365 / Outlook connections for the organization. Supports multiple connections (one per Azure AD tenant).

GET /v2/outlook/connection/status

const { data } = await client.getOutlookConnectionStatus()
Response
{
"connections": [
{
"status": "connected",
"action": "connect",
"connected_by_display_name": "string",
"connected_by_email": "user@example.com",
"connected_by_user_id": "string",
"connected_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"tenant_id": "string",
"scopes": ["string"],
"expires_at": "1970-01-01T00:00:00.000Z",
"is_token_valid": true
}
],
"has_connections": true
}

disconnectOutlookโ€‹

Removes the Microsoft 365 / Outlook connection for a specific tenant. This deletes the stored tokens and disconnects the integration.

POST /v2/outlook/connection/disconnect

const { data } = await client.disconnectOutlook(
null,
{
tenant_id: 'string'
},
)
Response
{
"success": true,
"tenant_id": "string",
"affected_shared_inboxes": ["string"]
}

connectOutlookMailboxโ€‹

Connects an Outlook mailbox:

  1. Validates the user has access to the mailbox via Microsoft Graph API
  2. Creates a mapping between the email address of the mailbox and the outlook connection
  3. E

POST /v2/outlook/mailbox/connect

const { data } = await client.connectOutlookMailbox(
null,
{
email: 'user@example.com',
shared_inbox_id: 'default',
mailboxSyncTimeframe: '5m'
},
)
Response
{
"email_address": {
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456",
"address": "sales@yourcompany.com",
"name": "Sales Team",
"user_ids": ["user-123", "user-456"],
"group_ids": ["group-789"],
"default_signature_id": "sig-abc",
"shared_inbox_id": "inbox-xyz",
"is_active": true,
"is_primary": false,
"is_epilot_email_address": false
},
"outlook_email": "user@example.com",
"tenant_id": "string",
"provider": "outlook"
}

disconnectOutlookMailboxโ€‹

Disconnect Outlook Mailbox

POST /v2/outlook/mailbox/{email}/disconnect

const { data } = await client.disconnectOutlookMailbox({
email: 'example',
})
Response
{
"success": true,
"email": "user@example.com"
}

startMailboxSyncโ€‹

Start Mailbox Sync

POST /v2/outlook/mailbox/{email}/sync

const { data } = await client.startMailboxSync(
{
email: 'example',
},
{
timeframe: '5m'
},
)

getMailboxSyncStatusโ€‹

Get Mailbox Sync Status

GET /v2/outlook/mailbox/{email}/sync/status

const { data } = await client.getMailboxSyncStatus({
email: 'example',
})
Response
{
"execution_id": "string",
"status": "RUNNING",
"timeframe": "5m",
"started_at": "1970-01-01T00:00:00.000Z",
"completed_at": "1970-01-01T00:00:00.000Z",
"inbox": {
"status": "PENDING",
"total_messages": 0,
"processed_messages": 0,
"failed_messages": 0
},
"sent_items": {
"status": "PENDING",
"total_messages": 0,
"processed_messages": 0,
"failed_messages": 0
}
}

retryMailboxSyncโ€‹

Retry Failed Messages

POST /v2/outlook/mailbox/{email}/sync/retry

const { data } = await client.retryMailboxSync(
{
email: 'example',
},
{
sync_id: 'string',
scope: 'all_failed',
message_ids: ['string']
},
)

getConnectedOutlookEmailsโ€‹

Returns all Outlook email addresses connected to the organization.

GET /v2/outlook/mailbox/mappings

const { data } = await client.getConnectedOutlookEmails()
Response
{
"outlook_emails": [
{
"outlook_email": "user@example.com",
"tenant_id": "string",
"provider": "outlook",
"connected_at": "1970-01-01T00:00:00.000Z",
"connected_by_user_id": "string"
}
],
"count": 0
}

outlookOAuthCallbackโ€‹

Exchanges authorization code for tokens and stores them.

GET /v2/outlook/oauth/callback

const { data } = await client.outlookOAuthCallback({
code: 'example',
state: 'example',
session_state: 'example',
error: 'example',
error_description: 'example',
error_subcode: 'example',
client_info: 'example',
error_uri: 'example',
admin_consent: 'example',
tenant: 'example',
})
Response
{
"connected": true,
"expires_at": "1970-01-01T00:00:00.000Z",
"scope": "string"
}

getSettingsโ€‹

Retrieves settings of a specific type for the organization.

GET /v1/email-settings

const { data } = await client.getSettings({
type: 'example',
id: '123e4567-e89b-12d3-a456-426614174000',
})
Response
[
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"name": "Default Signature",
"org_id": "org-123",
"type": "signature",
"value": "Best regards, The Team",
"html": "<p>Best regards,<br/><strong>The Team</strong></p>",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456"
}
]

addSettingโ€‹

Creates a new setting of the specified type.

POST /v1/email-settings

const { data } = await client.addSetting(
null,
{
id: 'a10bd0ff-4391-4cfc-88ee-b19d718a9bf7',
name: 'Default Signature',
org_id: 'org-123',
type: 'signature',
value: 'Best regards, The Team',
html: '<p>Best regards,<br/><strong>The Team</strong></p>',
created_at: '2024-01-15T10:30:00Z',
updated_at: '2024-01-20T14:45:00Z',
created_by: 'user-123',
updated_by: 'user-456'
},
)
Response
[
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"name": "Default Signature",
"org_id": "org-123",
"type": "signature",
"value": "Best regards, The Team",
"html": "<p>Best regards,<br/><strong>The Team</strong></p>",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456"
}
]

deleteSettingโ€‹

Deletes a setting by its ID and type.

DELETE /v1/email-settings

const { data } = await client.deleteSetting(
null,
{
type: 'signature',
id: 'a10bd0ff-4391-4cfc-88ee-b19d718a9bf7'
},
)
Response
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"name": "Default Signature",
"org_id": "org-123",
"type": "signature",
"value": "Best regards, The Team",
"html": "<p>Best regards,<br/><strong>The Team</strong></p>",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456"
}

updateSettingโ€‹

Updates an existing setting identified by its ID.

POST /v1/email-settings/{id}

const { data } = await client.updateSetting(
{
id: '123e4567-e89b-12d3-a456-426614174000',
},
{
id: 'a10bd0ff-4391-4cfc-88ee-b19d718a9bf7',
name: 'Default Signature',
org_id: 'org-123',
type: 'signature',
value: 'Best regards, The Team',
html: '<p>Best regards,<br/><strong>The Team</strong></p>',
created_at: '2024-01-15T10:30:00Z',
updated_at: '2024-01-20T14:45:00Z',
created_by: 'user-123',
updated_by: 'user-456'
},
)
Response
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"name": "Default Signature",
"org_id": "org-123",
"type": "signature",
"value": "Best regards, The Team",
"html": "<p>Best regards,<br/><strong>The Team</strong></p>",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456"
}

addDomainโ€‹

Adds a custom email domain to the organization.

POST /v1/email-settings/domain

const { data } = await client.addDomain(
null,
{
domain: 'mail.yourcompany.com'
},
)
Response
[
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"name": "Default Signature",
"org_id": "org-123",
"type": "signature",
"value": "Best regards, The Team",
"html": "<p>Best regards,<br/><strong>The Team</strong></p>",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456"
}
]

deleteDomainโ€‹

Removes a custom email domain from the organization.

DELETE /v1/email-settings/domain

const { data } = await client.deleteDomain(
null,
{
domain: 'mail.yourcompany.com'
},
)

verifyNameServersโ€‹

Verifies that the domain's name server (NS) records are correctly configured.

POST /v1/email-settings/domain/name-servers:verify

const { data } = await client.verifyNameServers(
null,
{
domain: 'mail.yourcompany.com'
},
)
Response
[
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"name": "Default Signature",
"org_id": "org-123",
"type": "signature",
"value": "Best regards, The Team",
"html": "<p>Best regards,<br/><strong>The Team</strong></p>",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456"
}
]

verifyDomainโ€‹

Verifies ownership and configuration of a custom email domain.

POST /v1/email-settings/domain:verify

const { data } = await client.verifyDomain(
null,
{
domain: 'mail.yourcompany.com'
},
)
Response
[
{
"id": "a10bd0ff-4391-4cfc-88ee-b19d718a9bf7",
"name": "Default Signature",
"org_id": "org-123",
"type": "signature",
"value": "Best regards, The Team",
"html": "<p>Best regards,<br/><strong>The Team</strong></p>",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"created_by": "user-123",
"updated_by": "user-456"
}
]

Schemasโ€‹

MailboxSyncStatusโ€‹

type MailboxSyncStatus = {
execution_id: string
status: "RUNNING" | "COMPLETED" | "COMPLETED_WITH_ERRORS" | "FAILED" | "CANCELLED"
timeframe: "5m" | "1w" | "2w" | "1m"
started_at: string // date-time
completed_at?: string // date-time
inbox?: {
status?: "PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "SKIPPED"
total_messages?: number
processed_messages?: number
failed_messages?: number
}
sent_items?: {
status?: "PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "SKIPPED"
total_messages?: number
processed_messages?: number
failed_messages?: number
}
}

MailboxSyncStatusesโ€‹

type MailboxSyncStatuses = "RUNNING" | "COMPLETED" | "COMPLETED_WITH_ERRORS" | "FAILED" | "CANCELLED"

MailboxSyncFolderStatusesโ€‹

type MailboxSyncFolderStatuses = "PENDING" | "RUNNING" | "COMPLETED" | "FAILED" | "SKIPPED"

MailboxSyncTimeframePeriodsโ€‹

type MailboxSyncTimeframePeriods = "5m" | "1w" | "2w" | "1m"

InboxBucketResponseโ€‹

Inbox bucket representing the storage container for a shared inbox.

type InboxBucketResponse = {
id: string
inbox_id: string
}

ProvisionEpilotEmailAddressPayloadโ€‹

Request payload for provisioning an epilot-managed email address.

type ProvisionEpilotEmailAddressPayload = {
address: string
}

SetEmailAddressPrimaryPayloadโ€‹

Request payload for setting an email address as the organization's primary address.

type SetEmailAddressPrimaryPayload = {
address: string
}

UpdateEmailAddressPayloadโ€‹

Request payload for updating an email address configuration. All fields are optional; only provided fields will be updated.

type UpdateEmailAddressPayload = {
name?: string
user_ids?: string[]
group_ids?: string[]
default_signature_id?: string
shared_inbox_id?: string
is_active?: boolean
}

CreateEmailAddressPayloadโ€‹

Request payload for creating a new email address.

type CreateEmailAddressPayload = {
address: string
name?: string
user_ids?: string[]
group_ids?: string[]
default_signature_id?: string
shared_inbox_id?: string
}

EmailAddressResponseโ€‹

Email address configuration with all associated metadata.

type EmailAddressResponse = {
id: string
created_at: string // date-time
updated_at?: string // date-time
created_by?: string
updated_by?: string
address: string
name?: string
user_ids?: string[]
group_ids?: string[]
default_signature_id?: string
shared_inbox_id?: string
is_active?: boolean
is_primary?: boolean
is_epilot_email_address?: boolean
}

ErrorResponseโ€‹

Standard error response format for all API errors.

type ErrorResponse = {
error: string
status: number
}

SettingMetaโ€‹

Common metadata fields for all settings and resources.

type SettingMeta = {
id: string
created_at: string // date-time
updated_at?: string // date-time
created_by?: string
updated_by?: string
}

UpdateSharedInboxPayloadโ€‹

Request payload for updating a shared inbox configuration. All fields are optional; only provided fields will be updated.

type UpdateSharedInboxPayload = {
color?: string
name?: string
assignees?: string[]
description?: string
}

CreateSharedInboxPayloadโ€‹

Request payload for creating a new shared inbox.

type CreateSharedInboxPayload = {
id?: string
color: string
name: string
assignees?: string[]
description?: string
}

SharedInboxResponseโ€‹

Shared inbox configuration with all associated metadata.

type SharedInboxResponse = {
id: string
created_at: string // date-time
updated_at?: string // date-time
created_by?: string
updated_by?: string
name: string
color: string
assignees: string[]
description?: string
bucket_id: string
}

SettingsResponseโ€‹

type SettingsResponse = Array<{
id?: string
name?: string
org_id?: string
type: "signature" | "email_domain" | "email_address" | "whitelist_email_address" | "restrict_duplicates_within"
value?: string
html?: string
created_at?: string
updated_at?: string
created_by?: string
updated_by?: string
}> | {
id?: string
name?: string
org_id?: string
type: "signature" | "email_domain" | "email_address" | "whitelist_email_address" | "restrict_duplicates_within"
value?: string
html?: string
created_at?: string
updated_at?: string
created_by?: string
updated_by?: string
}

ConnectedOutlookEmailโ€‹

Mapping between an Outlook email and its Outlook Connection. This tracks which provider/tenant provisions each Outlook email.

type ConnectedOutlookEmail = {
outlook_email: string // email
tenant_id?: string
provider?: "outlook"
connected_at?: string // date-time
connected_by_user_id?: string
}

OutlookConnectionErrorโ€‹

type OutlookConnectionError = {
error: string
error_description?: string
admin_consent_url?: string // uri
}

OutlookConnectionStatusโ€‹

type OutlookConnectionStatus = {
status: "connected" | "expired" | "pending_auth" | "not_connected"
action: "connect" | "authorize" | "reconnect" | "none"
connected_by_display_name?: string
connected_by_email?: string // email
connected_by_user_id?: string
connected_at?: string // date-time
updated_at?: string // date-time
tenant_id: string
scopes?: string[]
expires_at?: string // date-time
is_token_valid?: boolean
}

SignatureSettingโ€‹

Setting that allows to add a signature.

type SignatureSetting = "signature"

EmailDomainSettingโ€‹

Setting that allows to add a custom domain. For e.g; doe.com

type EmailDomainSetting = "email_domain"

EmailAddressSettingโ€‹

Setting that allows to add an email address on the custom domain. For e.g; john@doe.com

type EmailAddressSetting = "email_address"

WhitelistEmailAddressSettingโ€‹

  • Setting that specifies a list of addresses exempt from being flagged as duplicate emails.
  • An email will be flagged as a duplicate if it has the same content and is sent to the same recipient within the time frame specified in the RestrictDuplicatesWithinSetting.
type WhitelistEmailAddressSetting = "whitelist_email_address"

RestrictDuplicatesWithinSettingโ€‹

  • Restrict duplicates within:
    • 10s
    • 5m
    • 1d
    • 5000 // It converts to 5 seconds.When expressed as a numerical value, it will be interpreted as being in milliseconds.
  • Defaults to 3 minutes
  • Negative values will be treated same as positive values
  • If not set, defaults to 3 min
  • If set as
type RestrictDuplicatesWithinSetting = "restrict_duplicates_within"

SettingTypeโ€‹

type SettingType = "signature" | "email_domain" | "email_address" | "whitelist_email_address" | "restrict_duplicates_within"

Settingโ€‹

Generic setting object used for various email configuration types. The applicable fields depend on the setting type:

  • signature: Uses name, value (plain text), and html (rich text)
  • email_domain: Uses value (domain name)
  • whitelist_email_address: Uses value (email address)
type Setting = {
id?: string
name?: string
org_id?: string
type: "signature" | "email_domain" | "email_address" | "whitelist_email_address" | "restrict_duplicates_within"
value?: string
html?: string
created_at?: string
updated_at?: string
created_by?: string
updated_by?: string
}

Domainโ€‹

Custom email domain configuration.

type Domain = {
domain?: string
}