Skip to content

Update an unlinked Mail account

PATCH
/api/v1/mail/accounts/{id}
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.

id
required
string
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
One of:

IMAP transport mode. Cleartext authentication is never allowed.

string
Allowed values: implicit starttls
provider
One of:
string
Allowed values: gmail icloud fastmail custom
smtp_app_password
string | null
smtp_host
string | null
smtp_port
integer | null format: int32
smtp_tls_mode
One of:

IMAP transport mode. Cleartext authentication is never allowed.

string
Allowed values: implicit starttls
smtp_username
string | null
username
string | null
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}
Media typeapplication/json

The standard API error response: { "error": { ... } }.

object
error
required

Error details.

object
code
required

Stable machine-readable code.

string
Allowed values: bad_request unauthorized forbidden not_found conflict name_conflict_case name_too_long push_endpoint_rejected too_many_requests internal service_unavailable
details
One of:

Optional field or operation details.

object
key
additional properties
string
message
required

Safe text for logs or a user-facing error message.

string
Example
{
"error": {
"code": "bad_request"
}
}