KyPanelDocs

API reference

Email

Mailboxes, forwarders, autoresponders, filters, routing, spam, deliverability; the mail server and its queue.

List mailboxes

GET/api/v1/accounts/{id}/email/accounts

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_accounts
Operation
listMail · ky call listMail

Parameters

NameIn
idpath
refreshquery

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreMailAccount
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Create a mailbox

POST/api/v1/accounts/{id}/email/accounts

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_accounts
Operation
createMail · ky call createMail

Parameters

NameIn
idpath

Request body

FieldType
domain_idstring
local_partstring
passwordstring
quota_mbinteger

Responses

  • 201 Created
    Body
    FieldType
    account_id alwaysstring
    address alwaysstring
    autoresponder alwaysboolean
    created_at alwaysinteger
    domain alwaysstring
    domain_id alwaysstring
    filters_count alwaysinteger
    id alwaysstring
    is_system alwaysboolean
    local_part alwaysstring
    login_state alwaysstring
    quota_mbinteger
    receive_state alwaysstring
    send_state alwaysstring
    used_bytes alwaysinteger
    used_updated_atinteger
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: limit-reached, validation
  • 500 Internal Server Error: internal

Delete a mailbox

DELETE/api/v1/accounts/{id}/email/accounts/{mid}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_accounts
Operation
deleteMail · ky call deleteMail

Parameters

NameIn
idpath
midpath
keep_dataquery

Responses

  • 204 Done, no content
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: system-mailbox
  • 500 Internal Server Error: internal

Change a mailbox's quota and restrictions

PUT/api/v1/accounts/{id}/email/accounts/{mid}

Changes quota and restrictions (suspend login / receiving / sending).

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_accounts
Operation
updateMail · ky call updateMail

Parameters

NameIn
idpath
midpath

Request body

FieldType
login_statestring
quota_mbinteger
receive_statestring
send_statestring
unlimitedboolean

Responses

  • 200 OK
    Body
    FieldType
    account_id alwaysstring
    address alwaysstring
    autoresponder alwaysboolean
    created_at alwaysinteger
    domain alwaysstring
    domain_id alwaysstring
    filters_count alwaysinteger
    id alwaysstring
    is_system alwaysboolean
    local_part alwaysstring
    login_state alwaysstring
    quota_mbinteger
    receive_state alwaysstring
    send_state alwaysstring
    used_bytes alwaysinteger
    used_updated_atinteger
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Mail client settings of a mailbox

GET/api/v1/accounts/{id}/email/accounts/{mid}/client-settings

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
mail_client_config
Operation
clientSettings · ky call clientSettings

Parameters

NameIn
idpath
midpath

Responses

  • 200 OK
    Body
    FieldType
    address alwaysstring
    autoconfig_url alwaysstring
    autodiscover_url alwaysstring
    plain alwaysobject
    FieldType
    imap alwaysServerEndpoint
    pop3 alwaysServerEndpoint
    smtp alwaysServerEndpoint
    secure alwaysobject
    FieldType
    imap alwaysServerEndpoint
    pop3 alwaysServerEndpoint
    smtp alwaysServerEndpoint
    username alwaysstring
    webmail_url alwaysstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Download the Apple mail profile

GET/api/v1/accounts/{id}/email/accounts/{mid}/mobileconfig

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
mail_client_config
Operation
mobileConfig · ky call mobileConfig

Parameters

NameIn
idpath
midpath

Responses

  • 200 OK
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Change a mailbox's password

PUT/api/v1/accounts/{id}/email/accounts/{mid}/password

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_accounts
Operation
mailPassword · ky call mailPassword

Parameters

NameIn
idpath
midpath

Request body

FieldType
passwordstring

Responses

  • 204 Done, no content
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Open the webmail signed in

POST/api/v1/accounts/{id}/email/accounts/{mid}/webmail

Creates a direct sign-in link to the webmail (single use, 60 s).

Who
root, reseller (ACL: create-user-session); customer
API tokens
API tokens can't use this endpoint
Operation
webmailSSO · ky call webmailSSO

Parameters

NameIn
idpath
midpath

Responses

  • 200 OK
    Body
    FieldType
    expires_instring
    urlstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: login-suspended
  • 500 Internal Server Error: internal

List autoresponders

GET/api/v1/accounts/{id}/email/autoresponders

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
autoresponders
Operation
getAccountsIdEmailAutoresponders · ky call getAccountsIdEmailAutoresponders

Parameters

NameIn
idpath

Responses

  • 200 OK
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)

Create an autoresponder

POST/api/v1/accounts/{id}/email/autoresponders

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
autoresponders
Operation
postAccountsIdEmailAutoresponders · ky call postAccountsIdEmailAutoresponders

Parameters

NameIn
idpath

Responses

  • 200 OK
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)

Delete an autoresponder

DELETE/api/v1/accounts/{id}/email/autoresponders/{aid}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
autoresponders
Operation
deleteAccountsIdEmailAutorespondersAid · ky call deleteAccountsIdEmailAutorespondersAid

Parameters

NameIn
idpath
aidpath

Responses

  • 200 OK
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)

Update an autoresponder

PUT/api/v1/accounts/{id}/email/autoresponders/{aid}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
autoresponders
Operation
putAccountsIdEmailAutorespondersAid · ky call putAccountsIdEmailAutorespondersAid

Parameters

NameIn
idpath
aidpath

Responses

  • 200 OK
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)

List default addresses (catch-all)

GET/api/v1/accounts/{id}/email/default-addresses

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
default_address
Operation
listDefaultAddresses · ky call listDefaultAddresses

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of DefaultAddressView
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Set a domain's default address

PUT/api/v1/accounts/{id}/email/default-addresses/{did}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
default_address
Operation
setDefaultAddress · ky call setDefaultAddress

Parameters

NameIn
idpath
didpath

Request body

FieldType
actionstring
destinationstring
fail_messagestring

Responses

  • 200 OK
    Body
    FieldType
    action alwaysstring
    configured alwaysboolean
    destinationstring
    domain alwaysstring
    domain_id alwaysstring
    fail_messagestring
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 422 Unprocessable Entity: rejected
  • 500 Internal Server Error: internal

Email deliverability of every domain

GET/api/v1/accounts/{id}/email/deliverability

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_deliverability
Operation
listDeliverability · ky call listDeliverability

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of HostingDeliverabilityReport
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Email deliverability of a domain (SPF, DKIM, DMARC, PTR)

GET/api/v1/accounts/{id}/email/deliverability/{did}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_deliverability
Operation
getDeliverability · ky call getDeliverability

Parameters

NameIn
idpath
didpath

Responses

  • 200 OK
    Body
    FieldType
    checked_at alwaysinteger
    domain alwaysstring
    domain_id alwaysstring
    ok alwaysboolean
    records alwaysarray of HostingRecordCheck
    spf_custom alwaysStoreSPFCustom
    zone_local alwaysboolean
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Install the suggested email DNS records

POST/api/v1/accounts/{id}/email/deliverability/{did}/repair

Installs the suggested records the domain's local zone is missing (or has wrong). Body {records:["spf","dkim","dmarc"]}; empty = every record that isn't valid in the zone.

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_deliverability
Operation
repairDeliverability · ky call repairDeliverability

Parameters

NameIn
idpath
didpath

Request body

FieldType
recordsarray of string

Responses

  • 200 OK
    Body
    FieldType
    changedarray of string
    reportHostingDeliverabilityReport
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 409 Conflict: zone-not-local
  • 500 Internal Server Error: internal

Customize and install the SPF record

PUT/api/v1/accounts/{id}/email/deliverability/{did}/spf

Saves the SPF customizer and, when the zone is local, installs the resulting record.

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_deliverability
Operation
putSPF · ky call putSPF

Parameters

NameIn
idpath
didpath

Request body

FieldType
allstring
hostsarray of string
includesarray of string
ip4array of string
ip6array of string

Responses

  • 200 OK
    Body
    FieldType
    changedarray of string
    reportHostingDeliverabilityReport
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Track delivery of the account's mail

GET/api/v1/accounts/{id}/email/deliveries

Is the customer's Track Delivery: mail the account sent, and mail to or from its domains.

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_trace
Operation
accountDeliveries · ky call accountDeliveries

Parameters

NameIn
idpath
eventquery
qquery

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreMailDelivery
    retention_daysinteger
    totalinteger
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Remove a domain forwarder

DELETE/api/v1/accounts/{id}/email/domain-forwarders/{did}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_forwarders
Operation
deleteDomainForwarder · ky call deleteDomainForwarder

Parameters

NameIn
idpath
didpath

Responses

  • 204 Done, no content
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Forward a whole domain

PUT/api/v1/accounts/{id}/email/domain-forwarders/{did}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_forwarders
Operation
setDomainForwarder · ky call setDomainForwarder

Parameters

NameIn
idpath
didpath

Request body

FieldType
to_domainstring

Responses

  • 200 OK
    Body
    FieldType
    domain alwaysstring
    domain_id alwaysstring
    to_domain alwaysstring
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 422 Unprocessable Entity: rejected
  • 500 Internal Server Error: internal

List the account's email filters

GET/api/v1/accounts/{id}/email/filters

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_filters
Operation
getAccountsIdEmailFilters · ky call getAccountsIdEmailFilters

Parameters

NameIn
idpath

Responses

  • 200 OK
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)

Create an account email filter

POST/api/v1/accounts/{id}/email/filters

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_filters
Operation
postAccountsIdEmailFilters · ky call postAccountsIdEmailFilters

Parameters

NameIn
idpath

Responses

  • 200 OK
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)

Reorder the account's email filters

PUT/api/v1/accounts/{id}/email/filters-order

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_filters
Operation
putAccountsIdEmailFiltersOrder · ky call putAccountsIdEmailFiltersOrder

Parameters

NameIn
idpath

Responses

  • 200 OK
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)

Delete an account email filter

DELETE/api/v1/accounts/{id}/email/filters/{fid}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_filters
Operation
deleteAccountsIdEmailFiltersFid · ky call deleteAccountsIdEmailFiltersFid

Parameters

NameIn
idpath
fidpath

Responses

  • 200 OK
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)

Update an account email filter

PUT/api/v1/accounts/{id}/email/filters/{fid}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_filters
Operation
putAccountsIdEmailFiltersFid · ky call putAccountsIdEmailFiltersFid

Parameters

NameIn
idpath
fidpath

Responses

  • 200 OK
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)

List forwarders

GET/api/v1/accounts/{id}/email/forwarders

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_forwarders
Operation
listForwarders · ky call listForwarders

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    domain_forwardersarray of StoreDomainForward
    itemsarray of StoreForwarder
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Add a forwarder

POST/api/v1/accounts/{id}/email/forwarders

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_forwarders
Operation
createForwarder · ky call createForwarder

Parameters

NameIn
idpath

Request body

FieldType
dest_typestring
destinationsarray of string
domain_idstring
fail_messagestring
local_partstring

Responses

  • 201 Created
    Body
    FieldType
    itemsarray of StoreForwarder
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 409 Conflict: validation
  • 422 Unprocessable Entity: rejected
  • 500 Internal Server Error: internal

Delete a forwarder

DELETE/api/v1/accounts/{id}/email/forwarders/{fid}

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_forwarders
Operation
deleteForwarder · ky call deleteForwarder

Parameters

NameIn
idpath
fidpath

Responses

  • 204 Done, no content
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Email routing of every domain

GET/api/v1/accounts/{id}/email/routing

Who
root, reseller (ACL: edit-mx or create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_routing
Operation
listRouting · ky call listRouting

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of Item
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Set a domain's email routing

PUT/api/v1/accounts/{id}/email/routing/{did}

Who
root, reseller (ACL: edit-mx or create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
email_routing
Operation
setRouting · ky call setRouting

Parameters

NameIn
idpath
didpath

Request body

FieldType
routingstring

Responses

  • 200 OK
    Body
    FieldType
    domainstring
    domain_idstring
    routingstring
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Get the spam filter settings

GET/api/v1/accounts/{id}/email/spam

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
spam_filters
Operation
getSpam · ky call getSpam

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    allow_listarray of string
    auto_deleteboolean
    auto_delete_thresholdnumber
    block_listarray of string
    enabledboolean
    spam_boxboolean
    subject_prefixstring
    tag_subjectboolean
    thresholdnumber
    updated_atinteger
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Save the spam filter settings

PUT/api/v1/accounts/{id}/email/spam

Who
root, reseller (ACL: create-user-session); customer
API tokens
admin token area: accounts; account token area: email
Feature
spam_filters
Operation
putSpam · ky call putSpam

Parameters

NameIn
idpath

Request body

FieldType
allow_listarray of string
auto_deleteboolean
auto_delete_thresholdnumber
block_listarray of string
enabledboolean
spam_boxboolean
subject_prefixstring
tag_subjectboolean
thresholdnumber
updated_atinteger

Responses

  • 200 OK
    Body
    FieldType
    allow_listarray of string
    auto_deleteboolean
    auto_delete_thresholdnumber
    block_listarray of string
    enabledboolean
    spam_boxboolean
    subject_prefixstring
    tag_subjectboolean
    thresholdnumber
    updated_atinteger
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 422 Unprocessable Entity: rejected
  • 500 Internal Server Error: internal

Email deliverability of the server's hostname

GET/api/v1/server/mail/deliverability

Who
root
API tokens
admin token area: server
Operation
adminHostDeliverability · ky call adminHostDeliverability

Responses

  • 200 OK
    Body
    FieldType
    checked_at alwaysinteger
    helo alwaysstring
    hostname alwaysstring
    ip alwaysstring
    ok alwaysboolean
    records alwaysarray of HostingRecordCheck
    zone_localstring
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)

Install the hostname's suggested email DNS records

POST/api/v1/server/mail/deliverability/repair

Who
root
API tokens
admin token area: server
Operation
adminHostDeliverabilityRepair · ky call adminHostDeliverabilityRepair

Request body

FieldType
kindsarray of string

Responses

  • 200 OK
    Body
    FieldType
    repairedarray of string
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 409 Conflict: repair-failed

Track delivery on the whole server

GET/api/v1/server/mail/deliveries

Who
root
API tokens
admin token area: server
Operation
adminDeliveries · ky call adminDeliveries

Parameters

NameIn
account_idquery
eventquery
qquery

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreMailDelivery
    retention_daysinteger
    stats_24hmap of integer
    totalinteger
  • 400 Bad Request: validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Read new entries of the mail log now

POST/api/v1/server/mail/deliveries/refresh

Who
root
API tokens
admin token area: server
Operation
adminDeliveriesRefresh · ky call adminDeliveriesRefresh

Responses

  • 200 OK
    Body
    FieldType
    new_rowsinteger
  • 400 Bad Request: rejected
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Hold outgoing mail of a domain or account

POST/api/v1/server/mail/holds

Who
root
API tokens
admin token area: server
Operation
adminHold · ky call adminHold

Request body

FieldType
account_idstring
reasonstring

Responses

  • 201 Created
    Body
    FieldType
    incident_idstring
    usernamestring
  • 400 Bad Request: rejected, validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Release held mail

DELETE/api/v1/server/mail/holds/{id}

Who
root
API tokens
admin token area: server
Operation
adminRelease · ky call adminRelease

Parameters

NameIn
idpath

Responses

  • 200 OK
    Body
    FieldType
    resolvedinteger
  • 400 Bad Request: rejected
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Outgoing mail limits and current counts

GET/api/v1/server/mail/limits

Who
root
API tokens
admin token area: server
Operation
adminMailLimits · ky call adminMailLimits

Responses

  • 200 OK
    Body
    FieldType
    heldarray of string
    incidentsarray of StoreIncident
    last_hourarray of StoreSenderVolume
    queue_countinteger
    settingsHostingMailAdminSettings
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

List the mail queue

GET/api/v1/server/mail/queue

Who
root
API tokens
admin token area: server
Operation
adminQueue · ky call adminQueue

Parameters

NameIn
qquery
serverquery
statequery

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of map of any
    totalinteger
    truncatedboolean
  • 400 Bad Request: rejected, wrong-server
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Get a queued message

GET/api/v1/server/mail/queue/{mid}

Who
root
API tokens
admin token area: server
Operation
adminQueueMessage · ky call adminQueueMessage

Parameters

NameIn
midpath
partquery
serverquery

Responses

  • 200 OK
    Body

    map of any

  • 400 Bad Request: rejected, wrong-server
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Deliver, freeze or delete queued messages

POST/api/v1/server/mail/queue/action

Who
root
API tokens
admin token area: server
Operation
adminQueueAction · ky call adminQueueAction

Parameters

NameIn
serverquery

Request body

FieldType
actionstring
idsarray of string

Responses

  • 200 OK
    Body

    map of any

  • 400 Bad Request: rejected, wrong-server
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal

Mail routing of the server and its email nodes

GET/api/v1/server/mail/routing

Who
root
API tokens
admin token area: server
Operation
adminMailRouting · ky call adminMailRouting

Responses

  • 200 OK
    Body
    FieldType
    itemsarray of StoreMailRoutingRow
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Save the mail server settings

PUT/api/v1/server/mail/settings

Who
root
API tokens
admin token area: server
Operation
adminMailSettings · ky call adminMailSettings

Request body

FieldType
auto_holdboolean
default_max_per_hourinteger
retention_daysinteger
unique_recipients_alertinteger

Responses

  • 200 OK
    Body
    FieldType
    auto_holdboolean
    default_max_per_hourinteger
    retention_daysinteger
    unique_recipients_alertinteger
  • 400 Bad Request: rejected, validation
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 500 Internal Server Error: internal

Trace how an address would be delivered

POST/api/v1/server/mail/troubleshoot

Who
root
API tokens
admin token area: server
Operation
mailTroubleshoot · ky call mailTroubleshoot

Parameters

NameIn
serverquery

Request body

FieldType
addressstring

Responses

  • 200 OK
    Body

    map of any

  • 400 Bad Request: rejected, validation, wrong-server
  • 401 Unauthorized: no session, or an invalid or expired token
  • 403 Forbidden: the caller can't use this (privileges, token scope, feature turned off)
  • 404 Not Found: not-found
  • 500 Internal Server Error: internal