List email accounts
/api/v1/email-accountsRequest
/api/v1/email-accountscurl -X GET 'https://app.mailyte.com/api/v1/email-accounts' \
-H 'Authorization: Bearer mk_live_YOUR_API_KEY'const response = await fetch('https://app.mailyte.com/api/v1/email-accounts', {
method: 'GET',
headers: {
Authorization: 'Bearer mk_live_YOUR_API_KEY',
},
});
const { data } = await response.json();import requests
response = requests.get(
"https://app.mailyte.com/api/v1/email-accounts",
headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
)
data = response.json()["data"]<?php
$response = Http::withToken('mk_live_YOUR_API_KEY')
->get('https://app.mailyte.com/api/v1/email-accounts');
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://app.mailyte.com/api/v1/email-accounts")
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer mk_live_YOUR_API_KEY"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }Response
Success.
dataobjectdataarray<object>objectstringmailboxidstringUnique 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
pagination_metaany
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.