Update an unlinked Mail account
PATCH
/api/v1/mail/accounts/{id}
const url = 'https://example.com/api/v1/mail/accounts/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"app_password":"example","email":"example","enabled":true,"imap_host":"example","imap_port":1,"imap_tls_mode":"implicit","provider":"gmail","smtp_app_password":"example","smtp_host":"example","smtp_port":1,"smtp_tls_mode":"implicit","smtp_username":"example","username":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/api/v1/mail/accounts/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "app_password": "example", "email": "example", "enabled": true, "imap_host": "example", "imap_port": 1, "imap_tls_mode": "implicit", "provider": "gmail", "smtp_app_password": "example", "smtp_host": "example", "smtp_port": 1, "smtp_tls_mode": "implicit", "smtp_username": "example", "username": "example" }'Update the supplied settings and credentials for an unlinked account. Linked sign-ins are managed in Connected Accounts. A signed-in User is required. The request can return 400 for invalid settings, 404 when the account is missing, or 424 when the server cannot validate the settings. Route: /api/v1/mail/accounts/{id}. Inputs: id. Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
app_password
string | null
email
string | null
enabled
boolean | null
imap_host
string | null
imap_port
integer | null format: int32
imap_tls_mode
smtp_app_password
string | null
smtp_host
string | null
smtp_port
integer | null format: int32
smtp_tls_mode
smtp_username
string | null
username
string | null
Responses
Section titled “Responses”Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}