Get a Mail account
GET
/api/v1/mail/accounts/{id}
const url = 'https://example.com/api/v1/mail/accounts/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/mail/accounts/example \ --header 'Authorization: Bearer <token>'Requires a signed-in User. It returns the account settings and sync state. It returns 404 when the account is missing. Route: /api/v1/mail/accounts/{id}. Inputs: id. Safe reads can use bounded retries.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Responses
Section titled “Responses”Media typeapplication/json
object
created_at
required
string
email
required
string
enabled
required
boolean
id
required
string
imap_host
required
string
imap_port
required
integer format: int32
imap_tls_mode
required
IMAP transport mode. Cleartext authentication is never allowed.
string
integration_account
required
boolean
integration_account_id
Connected Account identity for a Mail cache projection (#407, DESIGN §49 I6).
string | null
last_attempt_at
string | null
last_error
string | null
last_sync_at
string | null
provider
required
string
retry_after
string | null
smtp_host
required
string
smtp_port
required
integer format: int32
smtp_tls_mode
required
IMAP transport mode. Cleartext authentication is never allowed.
string
smtp_username
required
string
username
required
string
Example
{ "imap_tls_mode": "implicit", "provider": "gmail", "smtp_tls_mode": "implicit"}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}