Update an account
PUT /api/2.0/mail/accounts
Request
Updates an account with the name 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
New account email in the name@domain format
- account
string
New IMAP or POP server login
- password
string
New IMAP or POP server password
- port
integer
New IMAP or POP server port
- server
string
New IMAP or POP server address or IP
- smtp_account
string
New SMTP server login
- smtp_password
string
New SMTP server password
- smtp_port
integer
New SMTP server port
- smtp_server
string
New SMTP server address or IP
- smtp_auth
boolean
Specifies if the authentication is needed for the SMTP server 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
New encryption type for the IMAP or POP server: 0 - None, 1 - SSL, 2 - StartTLS
- outcoming_encryption_type
integer
New encryption type for the SMTP server: 0 - None, 1 - SSL, 2 - StartTLS
- auth_type_in
integer
New authentication type for the IMAP or POP server: 0 - None, 1 - Login, 4 - CramMd5, 5 - OAuth2
- auth_type_smtp
integer
New authentication type for the SMTP server: 0 - None, 1 - Login, 4 - CramMd5, 5 - OAuth2
Examples
PUT /api/2.0/mail/accounts HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: example.com
curl --request PUT \
--url https://example.com/api/2.0/mail/accounts \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
Responses
200
Updated 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