Update a email account
/api/v1/email-accounts/{email_account}Parameters
| Name | In | Type | Description |
|---|---|---|---|
email_accountrequired | path | string | The email account identifier. |
Request body
namestringThe mailbox owner's name. Recipients see it as
Name <address>.storage_quota_mbintegerOptional. This mailbox's storage, in megabytes.
account_typestringmail | smtp | bothKept for your records only: every mailbox has full IMAP and SMTP access, whatever this says.
statusstringActive | InactiveInactivestops the mailbox signing in and receiving;Activeturns it back on.smtp_settingsobjectOptional. Connection settings to print in the setup email sent to
send_setup_to. They do not change how the mailbox works.portintegerThe port number, like 587 for SMTP or 993 for IMAP.
encryptionstringssl | tls | nonessl,tlsornone.auth_methodstringplain | login | cram_md5How mail apps sign in:
plain,loginorcram_md5.
imap_settingsobjectOptional. Connection settings to print in the setup email sent to
send_setup_to. They do not change how the mailbox works.portintegerThe port number, like 587 for SMTP or 993 for IMAP.
encryptionstringssl | tls | nonessl,tlsornone.
Request
/api/v1/email-accounts/{email_account}curl -X PUT 'https://app.mailyte.com/api/v1/email-accounts/ada@example.com' \
-H 'Authorization: Bearer mk_live_YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"name": "Ada Obi"
}'const response = await fetch('https://app.mailyte.com/api/v1/email-accounts/ada@example.com', {
method: 'PUT',
headers: {
Authorization: 'Bearer mk_live_YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Ada Obi"
}),
});
const { data } = await response.json();import requests
response = requests.put(
"https://app.mailyte.com/api/v1/email-accounts/ada@example.com",
headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
json={
"name": "Ada Obi"
},
)
data = response.json()["data"]<?php
$response = Http::withToken('mk_live_YOUR_API_KEY')
->put('https://app.mailyte.com/api/v1/email-accounts/ada@example.com', [
'name' => 'Ada Obi',
]);
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://app.mailyte.com/api/v1/email-accounts/ada@example.com")
request = Net::HTTP::Put.new(uri)
request["Authorization"] = "Bearer mk_live_YOUR_API_KEY"
request["Content-Type"] = "application/json"
request.body = {
"name": "Ada Obi"
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }Response
Success.
dataobjectobjectstringmailboxidstringUnique identifier for the mailbox.
addressstringThe full email address. This *is* the mailbox publicly: there is no separate
username, because the local part is already in here.namestringDisplay name, as it appears to a recipient. null when none was set.
domain_idstringThe domain this mailbox belongs to. Retrieve it with
GET /api/v1/domains/{domain}.typestringmail | smtp | bothWhat the mailbox was created as, and what you can filter the list by. Recorded rather than enforced: nothing in the product currently branches on it, so it does not by itself restrict what the mailbox can do.
statestringactive | provisioning | failed | suspended | deletingWhere the mailbox stands:
deletingfirst, thensuspended, then its setup state. Only anactivemailbox sends and receives.provisioningobjectWhat the mail server has done with this mailbox. Creation is asynchronous, so a mailbox exists here before it exists there.
statestringpending | provisioning | active | failed | suspended | deleting | deletedThe mailbox's setup state on the mail server. Use the top-level
stateto decide what the mailbox can do.errorstringWhy provisioning failed, in the mail server's words. null unless
stateisfailed.retryablebooleanTrue only while
stateisfailed, which is the only statePOST /retry-provisioningaccepts.
storageobjectBytes, both of them. Never a pre-formatted "3 GB", which cannot be computed with.
quota_bytesintegerThe mailbox's storage limit, in bytes. Always set; the default is 1 GB.
used_bytesintegerBytes used. Null means we could not read it yet (for example, the mailbox is not set up on the mail server yet), not that it is empty; show it as unknown.
send_limitsobjectPer-mailbox sending overrides.
dailyintegerMessages per day for this mailbox. Null means no override, so your plan's limit applies. 0 means it may not send.
hourlyintegerMessages per hour for this mailbox. Null means no override, as with
daily.
created_atstringupdated_atstring
Returned inside the standard envelope.
Errors
| Status | When |
|---|---|
401 | The API key is missing, unknown, revoked or expired. All four answer identically, on purpose: distinguishing them would confirm which keys exist. |
403 | The key is valid but may not do this: it lacks the required scope, its IP allowlist does not include you, or this endpoint does not accept API keys. |
404 | No such resource in this organization. |
422 | The request was understood but the values were not acceptable. |
429 | Too many requests, or the organization has spent its sending allowance. `Retry-After` says how long to wait. |
Every status, with what causes it and what to do, is on the error reference.