Add a new Email payload configuration to an existing profile

Open in ChatGPT Open in ChatGPT to ask questions about this page
Open in Claude Open in Claude to ask questions about this page
Copy as MarkdownCopy this page as markdown to use with AI assistants
View as Markdown Open this page as markdown in a new tab

Create Android Email configurations payload

Request URL

https://{server-hostname}:8383/api/v1/mdm/profiles/{profile_id}/payloads/androidemailpolicy

Scope

MDMDeviceMgmt.CREATECopied!

Header

Authorization: d92d4xxxxxxxxxxxxx15f52

Request Parameters

- Request Headers

Content-TypestringMandatory
application/jsonapplication/jsonCopied!
AcceptstringMandatory
application/jsonapplication/jsonCopied!

- Path Parameters

profile_idstringMandatory

Unique identifier of the profile. Obtain from the Create Profile or Get Profiles response

- Request Body

application/json
JSON Object
Hide Sub-Attributes
account_namestringOptional

Display name for the email account, shown on the device

account_typeintegerOptional

Email protocol type. 1 = IMAP, 2 = POP3. Default: 1

mail_addressstringOptional

Email address for this account. Use %email% to auto-populate from the enrolled user

sender_namestringOptional

Name shown as the sender in outgoing emails. Use %username% to auto-populate

allow_html_contentbooleanOptional

Allow rendering of HTML-formatted email content on the device. Default: true

allow_forwardbooleanOptional

Allow the user to forward received emails. Default: true

allow_notifybooleanOptional

Enable email push notifications on the device. Default: true

allow_vibrate_on_silentbooleanOptional

Enable vibration for email notifications when the device is on silent mode. Default: true

default_accountbooleanOptional

Set this as the default email account on the device. Default: false

allow_change_settingbooleanOptional

Allow the user to modify email account settings from the device. Default: true

signaturestringOptional

Default signature appended to outgoing emails

incoming_protocolstringOptional

Protocol for the incoming mail server. Typically IMAP or POP3

incoming_server_hostnamestringMandatory

Hostname or IP address of the incoming mail server (required)

incoming_server_portintegerOptional

Port for the incoming mail server. Common values: 993 (IMAP+SSL), 143 (IMAP), 995 (POP3+SSL), 110 (POP3). Default: 143

incoming_user_namestringOptional

Username for authenticating to the incoming mail server. Use %username% to auto-populate

incoming_server_passwordstringOptional

Password for the incoming mail server. Write-only; not returned in responses

incoming_server_password_idlongOptional

ID of a stored credential used as the incoming mail server password. Use -1 when providing password directly

incoming_server_use_sslbooleanOptional

Enable SSL/TLS encryption for the incoming mail server connection. Default: true

incoming_server_use_tlsbooleanOptional

Enable STARTTLS encryption upgrade for the incoming mail server connection. Default: false

incoming_server_certificatebooleanOptional

Require a trusted certificate from the incoming mail server. Default: true

outgoing_protocolstringOptional

Protocol for the outgoing mail server. Typically SMTP. Default: SMTP

outgoing_server_hostnamestringMandatory

Hostname or IP address of the outgoing (SMTP) mail server (required)

outgoing_server_portintegerOptional

Port for the outgoing mail server. Common values: 465 (SMTP+SSL), 587 (SMTP+TLS), 25 (SMTP). Default: 587

outgoing_user_namestringOptional

Username for authenticating to the outgoing mail server. Use %username% to auto-populate

outgoing_server_passwordstringOptional

Password for the outgoing mail server. Write-only; not returned in responses

outgoing_server_password_idlongOptional

ID of a stored credential used as the outgoing mail server password. Use -1 when providing password directly

outgoing_server_use_sslbooleanOptional

Enable SSL/TLS encryption for the outgoing mail server connection. Default: true

outgoing_server_use_tlsbooleanOptional

Enable STARTTLS encryption upgrade for the outgoing mail server connection. Default: false

outgoing_server_certificatebooleanOptional

Require a trusted certificate from the outgoing mail server. Default: true

Sample Request

Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
  --url https://appdomain/api/v1/mdm/profiles/%7Bprofile_id%7D/payloads/androidemailpolicy \
  --header 'Accept: application/json' \
  --header 'Authorization:  d92d4xxxxxxxxxxxxx15f52' \
  --header 'Content-Type: application/json' \
  --data '{"account_type":1,"signature":"Regards, %username%","outgoing_server_password_id":-1,"sender_name":"%username%","default_account":false,"outgoing_server_use_tls":false,"outgoing_user_name":"%username%","incoming_protocol":"IMAP","account_name":"Corporate Email","allow_html_content":true,"allow_change_setting":true,"outgoing_server_password":"********","outgoing_server_port":587,"incoming_server_certificate":false,"mail_address":"%email%","incoming_server_port":993,"outgoing_server_use_ssl":true,"allow_forward":true,"incoming_server_hostname":"imap.zylker.com","incoming_server_password":"********","incoming_server_password_id":-1,"outgoing_server_hostname":"smtp.zylker.com","allow_notify":true,"incoming_server_use_tls":false,"outgoing_protocol":"SMTP","allow_vibrate_on_silent":true,"incoming_user_name":"%username%","incoming_server_use_ssl":true,"outgoing_server_certificate":false}'

Sample Request Body

Add Email payload to the profile

Copied!
  {
    "account_type": 1,
    "signature": "Regards, %username%",
    "outgoing_server_password_id": -1,
    "sender_name": "%username%",
    "default_account": false,
    "outgoing_server_use_tls": false,
    "outgoing_user_name": "%username%",
    "incoming_protocol": "IMAP",
    "account_name": "Corporate Email",
    "allow_html_content": true,
    "allow_change_setting": true,
    "outgoing_server_password": "********",
    "outgoing_server_port": 587,
    "incoming_server_certificate": false,
    "mail_address": "%email%",
    "incoming_server_port": 993,
    "outgoing_server_use_ssl": true,
    "allow_forward": true,
    "incoming_server_hostname": "imap.zylker.com",
    "incoming_server_password": "********",
    "incoming_server_password_id": -1,
    "outgoing_server_hostname": "smtp.zylker.com",
    "allow_notify": true,
    "incoming_server_use_tls": false,
    "outgoing_protocol": "SMTP",
    "allow_vibrate_on_silent": true,
    "incoming_user_name": "%username%",
    "incoming_server_use_ssl": true,
    "outgoing_server_certificate": false
  }
                
Show full

Response Parameters

- HTTP code 200

Response Body - application/json
JSON Object
Hide Sub-Attributes
payload_idlong

Unique identifier for the created payload item

account_namestring

Display name for the email account, shown on the device

account_typeinteger

Email protocol type. 1 = IMAP, 2 = POP3. Default: 1

mail_addressstring

Email address for this account. Use %email% to auto-populate from the enrolled user

sender_namestring

Name shown as the sender in outgoing emails. Use %username% to auto-populate

allow_html_contentboolean

Allow rendering of HTML-formatted email content on the device. Default: true

allow_forwardboolean

Allow the user to forward received emails. Default: true

allow_notifyboolean

Enable email push notifications on the device. Default: true

allow_vibrate_on_silentboolean

Enable vibration for email notifications when the device is on silent mode. Default: true

default_accountboolean

Set this as the default email account on the device. Default: false

allow_change_settingboolean

Allow the user to modify email account settings from the device. Default: true

signaturestring

Default signature appended to outgoing emails

incoming_protocolstring

Protocol for the incoming mail server. Typically IMAP or POP3

incoming_server_hostnamestring

Hostname or IP address of the incoming mail server (required)

incoming_server_portinteger

Port for the incoming mail server. Common values: 993 (IMAP+SSL), 143 (IMAP), 995 (POP3+SSL), 110 (POP3). Default: 143

incoming_user_namestring

Username for authenticating to the incoming mail server. Use %username% to auto-populate

incoming_server_passwordstring

Password for the incoming mail server. Write-only; not returned in responses

incoming_server_password_idlong

ID of a stored credential used as the incoming mail server password. Use -1 when providing password directly

incoming_server_use_sslboolean

Enable SSL/TLS encryption for the incoming mail server connection. Default: true

incoming_server_use_tlsboolean

Enable STARTTLS encryption upgrade for the incoming mail server connection. Default: false

incoming_server_certificateboolean

Require a trusted certificate from the incoming mail server. Default: true

outgoing_protocolstring

Protocol for the outgoing mail server. Typically SMTP. Default: SMTP

outgoing_server_hostnamestring

Hostname or IP address of the outgoing (SMTP) mail server (required)

outgoing_server_portinteger

Port for the outgoing mail server. Common values: 465 (SMTP+SSL), 587 (SMTP+TLS), 25 (SMTP). Default: 587

outgoing_user_namestring

Username for authenticating to the outgoing mail server. Use %username% to auto-populate

outgoing_server_passwordstring

Password for the outgoing mail server. Write-only; not returned in responses

outgoing_server_password_idlong

ID of a stored credential used as the outgoing mail server password. Use -1 when providing password directly

outgoing_server_use_sslboolean

Enable SSL/TLS encryption for the outgoing mail server connection. Default: true

outgoing_server_use_tlsboolean

Enable STARTTLS encryption upgrade for the outgoing mail server connection. Default: false

outgoing_server_certificateboolean

Require a trusted certificate from the outgoing mail server. Default: true

Possible Response Codes

200HTTP code

Sample Response: HTTP 200

Email payload successfully added

Copied!
  {
    "account_type": 1,
    "signature": "Regards, %username%",
    "outgoing_server_password_id": -1,
    "sender_name": "%username%",
    "default_account": false,
    "outgoing_server_use_tls": false,
    "outgoing_user_name": "%username%",
    "incoming_protocol": "IMAP",
    "account_name": "Corporate Email",
    "allow_html_content": true,
    "allow_change_setting": true,
    "outgoing_server_port": 587,
    "incoming_server_certificate": false,
    "mail_address": "%email%",
    "incoming_server_port": 993,
    "outgoing_server_use_ssl": true,
    "payload_id": 9007199254741000,
    "allow_forward": true,
    "incoming_server_hostname": "imap.zylker.com",
    "incoming_server_password_id": -1,
    "outgoing_server_hostname": "smtp.zylker.com",
    "allow_notify": true,
    "incoming_server_use_tls": false,
    "outgoing_protocol": "SMTP",
    "allow_vibrate_on_silent": true,
    "incoming_user_name": "%username%",
    "incoming_server_use_ssl": true,
    "outgoing_server_certificate": false
  }
                
Show full

Duration: 1 minute | Threshold: 30 | Lock period: 5 minutes

Duration - Time window for the threshold.
Threshold - Number of API calls allowed within the specified duration.
Lock Period - Wait time before consecutive API requests.