Get Started
Usage API
More information

PUT api/2.0/mail/accounts This function requires authentication

Description

Updates an account with the name specified in the request.

Parameters
Name Description Type Example
name
sent in body
Account name in Teamlab string some text
email
sent in body
New account email in the name@domain format string some text
account
sent in body
New IMAP or POP server login string some text
password
sent in body
New IMAP or POP server password string some text
port
sent in body
New IMAP or POP server port number 1234
server
sent in body
New IMAP or POP server address or IP string some text
smtp_account
sent in body
New SMTP server login string some text
smtp_password
sent in body
New SMTP server password string some text
smtp_port
sent in body
New SMTP server port number 1234
smtp_server
sent in body
New SMTP server address or IP string some text
smtp_auth
sent in body
Specifies if the authentication is needed for the SMTP server or not Bool value true
restrict
sent in body
Specifies if all the mails should be downloaded from the account (false) or not (true). If true, then messages from last 30 days only will be downloaded Bool value true
incoming_encryption_type
sent in body
New encryption type for the IMAP or POP server: 0 - None, 1 - SSL, 2 - StartTLS None, SSL, StartTLS
outcoming_encryption_type
sent in body
New encryption type for the SMTP server: 0 - None, 1 - SSL, 2 - StartTLS None, SSL, StartTLS
auth_type_in
sent in body
New authentication type for the IMAP or POP server: 1 - Login, 4 - CremdMd5, 5 - OAuth2 None, Login, CramMd5, OAuth2
auth_type_smtp
sent in body
New authentication type for the SMTP server: 0 - None, 1 - Login, 4 - CremdMd5, 5 - OAuth2 None, Login, CramMd5, OAuth2
Example
PUT api/2.0/mail/accounts
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "name": "some text",
  "email": "some text",
  "account": "some text",
  "password": "some text",
  "port": 1234,
  "server": "some text",
  "smtp_account": "some text",
  "smtp_password": "some text",
  "smtp_port": 1234,
  "smtp_server": "some text",
  "smtp_auth": true,
  "restrict": true,
  "incoming_encryption_type": "none",
  "outcoming_encryption_type": "none",
  "auth_type_in": "none",
  "auth_type_smtp": "none"
}
Returns

Updated account