Skip to content

Update mail preferences

PATCH
/mail/user/{user}/preferences
curl --request PATCH \
--url https://mail.work.optidata.cloud/api/mail/user/83/preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "reader_split_mode": "vertical", "conversations_per_page": 50 }'

Change how the mail client behaves for a user: the reading-pane layout, whether the list groups messages into conversations, the order of messages inside a thread, the page size of every listing, and the default compose font. Only the authenticated user’s own preferences may be changed.

Every field is optional; the ones you omit are left untouched.

user
required
integer

Id of the user. Must be the authenticated user.

Media typeapplication/json

The mail preferences that may be changed. Every field is optional.

object
reader_split_mode
One of:

Where the reading pane sits relative to the list, or none for no pane.

string
Allowed values: vertical horizontal none
listing_type
One of:

Whether a listing row is a whole thread or a single message.

string
Allowed values: conversation message
reader_message_order
One of:

Whether a thread reads oldest-first or newest-first.

string
Allowed values: newest_first newest_last
conversations_per_page

Page size of every listing.

integer | null
compose_font_family
One of:

The fonts the compose editor offers as a default.

string
Allowed values: Arial Comic Sans MS Courier New Georgia Helvetica Lucida Sans Unicode Montserrat Palatino Linotype sans-serif serif Times New Roman Trebuchet MS Verdana
compose_font_color

Default text colour, as a 6-digit hex triplet.

string | null
Examples

Vertical reading pane, 50 conversations per page

{
"reader_split_mode": "vertical",
"conversations_per_page": 50
}

Preferences saved. The body is the literal string success.

Media typetext/html
string

Missing, malformed or expired authentication key.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

The caller may not act on this mailbox, user or resource.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Exampledenied
{
"message": "This action is unauthorized."
}

The request body or query string failed validation.

Media typeapplication/json
object
message
required

The first validation message.

string
errors
required

Validation messages keyed by field name.

object
key
additional properties
Array<string>
Examples
Exampleinvalid
{
"message": "The conversations field is required.",
"errors": {
"conversation_ids": [
"The conversations field is required."
]
}
}

Rate limit exceeded. Retry after the window resets.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplethrottled
{
"message": "Too Many Attempts."
}