Update settings
PUT
/api/v1/mailbox/settingsSend only what changes. undo_send_seconds is 5, 10, 20 or 30; display_density is comfortable or compact. Answers with all settings.
Errors
| Status | When |
|---|---|
401 |
No token, or the session expired or was signed out. Sign in again with POST /mailbox-auth/login. |
403 |
The account has a temporary password: until POST /security/password succeeds, every other call answers this with error_code: password_change_required. |
422 |
A blank display name, an unknown display density, or an undo window that is not 5, 10, 20 or 30. |
Request body
namestring or nullThe display name recipients see. Cannot be blank.
signature_htmlstring or nullThe signature, as HTML.
signature_on_replyboolean or nullAdd the signature to replies and forwards too.
display_densitystring or nullcomfortableorcompact.undo_send_enabledboolean or nullHold each send briefly so it can be undone.
undo_send_secondsinteger or nullHow long: 5, 10, 20 or 30.
Request
PUT
/api/v1/mailbox/settingscurl -X PUT 'https://courier.mailyte.com/api/v1/mailbox/settings' \
-H 'Authorization: Bearer MAILBOX_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"name": "Ada Obi",
"signature_on_reply": true,
"undo_send_seconds": 10
}'const response = await fetch('https://courier.mailyte.com/api/v1/mailbox/settings', {
method: 'PUT',
headers: {
Authorization: 'Bearer MAILBOX_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"name": "Ada Obi",
"signature_on_reply": true,
"undo_send_seconds": 10
}),
});
const { data } = await response.json();import requests
response = requests.put(
"https://courier.mailyte.com/api/v1/mailbox/settings",
headers={"Authorization": "Bearer MAILBOX_TOKEN"},
json={
"name": "Ada Obi",
"signature_on_reply": true,
"undo_send_seconds": 10
},
)
data = response.json()["data"]<?php
$response = Http::withToken('MAILBOX_TOKEN')
->put('https://courier.mailyte.com/api/v1/mailbox/settings', [
'name' => 'Ada Obi',
'signature_on_reply' => true,
'undo_send_seconds' => 10,
]);
$data = $response->json('data');require "net/http"
require "json"
uri = URI("https://courier.mailyte.com/api/v1/mailbox/settings")
request = Net::HTTP::Put.new(uri)
request["Authorization"] = "Bearer MAILBOX_TOKEN"
request["Content-Type"] = "application/json"
request.body = {
"name": "Ada Obi",
"signature_on_reply": true,
"undo_send_seconds": 10
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request) }Response
Successful Response
dataobjectemail_addressstringnamestring or nullThe display name recipients see.
signature_htmlstringsignature_on_replybooleandisplay_densitystringcomfortable | compactundo_send_enabledbooleanundo_send_secondsinteger5 | 10 | 20 | 30storageobjectused_mbnumberquota_mbnumberpercentagenumber or null
200
application/json{
"type": "success",
"msg": "Settings updated successfully",
"data": {
"email_address": "ada@yourdomain.com",
"name": "Ada Obi",
"signature_html": "<p>Ada Obi<br>Head of Finance</p>",
"signature_on_reply": true,
"display_density": "comfortable",
"undo_send_enabled": true,
"undo_send_seconds": 10,
"storage": {
"used_mb": 812.4,
"quota_mb": 5120,
"percentage": 15.9
}
}
}Returned inside the standard envelope.
Errors
| Status | When |
|---|---|
401 | No token, or the session expired or was signed out. Sign in again with `POST /mailbox-auth/login`. |
403 | The account has a temporary password: until `POST /security/password` succeeds, every other call answers this with `error_code: password_change_required`. |
422 | A blank display name, an unknown display density, or an undo window that is not 5, 10, 20 or 30. |
Every status, with what causes it and what to do, is on the error reference.