Create an account by custom mail servers
POST /api/2.0/mail/accounts
Request
Creates an account using full information about mail servers specified in the request.
Authorization
An API key is a token that you provide when making API calls. Include the token in a header parameter called Authorization
.
Example: Authorization: 864FE52C-1C1C-469F-9308-51DAFEFE7436
.
Headers
- Accept
enum of string
Can be one of:
application/json
.- Content-Type
enum of string
Can be one of:
application/json
.
Body
- name
string
Account name
- email
string
Account email address in the name@domain format
- account
string
IMAP or POP server login
- password
string
IMAP or POP server password
- port
integer
IMAP or POP server port
- server
string
IMAP or POP server address or IP
- smtp_account
string
SMTP server login
- smtp_password
string
SMTP server password
- smtp_port
integer
SMTP server port
- smtp_server
string
SMTP server address or IP
- smtp_auth
boolean
Specifies if the authentication is needed for the SMTP server or not
- imap
boolean
Specifies if the IMAP server is used for incoming mails or not
- restrict
boolean
Specifies if all the mails should be downloaded from the account (false) or not (true). If true, then messages for the last 30 days only will be imported
- incoming_encryption_type
integer
Encryption type for the IMAP or POP server: 0 - None, 1 - SSL, 2 - StartTLS
- outcoming_encryption_type
integer
Encryption type for the SMTP server: 0 - None, 1 - SSL, 2 - StartTLS
- auth_type_in
integer
Authentication type for the IMAP or POP server: 0 - None, 1 - Login, 4 - CramMd5, 5 - OAuth2
- auth_type_smtp
integer
Authentication type for the SMTP server: 0 - None, 1 - Login, 4 - CramMd5, 5 - OAuth2
Examples
POST /api/2.0/mail/accounts HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: example.com
curl --request POST \
--url https://example.com/api/2.0/mail/accounts \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
Responses
200
Created account
- MailboxId
integer
int32 - Email
string
- Enabled
boolean
- Name
string
- OAuthConnection
boolean
- Signature
object
- MailboxId
integer
int32 - Html
string
- IsActive
boolean
- Autoreply
object
- MailboxId
integer
int32 - TurnOn
boolean
- OnlyContacts
boolean
- TurnOnToDate
boolean
- FromDate
string
date-time - ToDate
string
date-time - Subject
string
- Html
string
- EMailInFolder
string
- QuotaError
boolean
- AuthError
boolean
- IsGroup
boolean
- IsAlias
boolean
- IsTeamlabMailbox
boolean
- IsDefault
boolean
- IsSharedDomainMailbox
boolean
- DateCreated
array of string
401
Unauthorized