Mailboxes
Update a managed mailbox
PUT
/
api
/
e2
/
mailboxes
/
{id}
TypeScript
import Inbound from "inboundemail";
const inbound = new Inbound();
const result = await inbound.mailboxes.update("<mailboxId>", {
dailySendLimit: 500
});curl -X PUT 'https://inbound.new/api/e2/mailboxes/<mailboxId>' \
-H "Authorization: Bearer $INBOUND_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"dailySendLimit": 500
}'import requests
url = "https://inbound.new/api/e2/mailboxes/{id}"
payload = {
"protocols": {
"imap": True,
"smtp": True,
"api": True
},
"allowedIps": ["<string>"],
"storageQuotaBytes": 4503599627370496,
"dailySendLimit": 500000,
"selfService": {
"filters": True,
"spam": True,
"password": True,
"activity": True
},
"name": "<string>",
"loginAddress": "<string>",
"sendingName": "<string>",
"sendingAddress": "<string>",
"enabled": True,
"scopes": [
{
"domainId": "<string>",
"address": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
protocols: {imap: true, smtp: true, api: true},
allowedIps: ['<string>'],
storageQuotaBytes: 4503599627370496,
dailySendLimit: 500000,
selfService: {filters: true, spam: true, password: true, activity: true},
name: '<string>',
loginAddress: '<string>',
sendingName: '<string>',
sendingAddress: '<string>',
enabled: true,
scopes: [{domainId: '<string>', address: '<string>'}]
})
};
fetch('https://inbound.new/api/e2/mailboxes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://inbound.new/api/e2/mailboxes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'protocols' => [
'imap' => true,
'smtp' => true,
'api' => true
],
'allowedIps' => [
'<string>'
],
'storageQuotaBytes' => 4503599627370496,
'dailySendLimit' => 500000,
'selfService' => [
'filters' => true,
'spam' => true,
'password' => true,
'activity' => true
],
'name' => '<string>',
'loginAddress' => '<string>',
'sendingName' => '<string>',
'sendingAddress' => '<string>',
'enabled' => true,
'scopes' => [
[
'domainId' => '<string>',
'address' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://inbound.new/api/e2/mailboxes/{id}"
payload := strings.NewReader("{\n \"protocols\": {\n \"imap\": true,\n \"smtp\": true,\n \"api\": true\n },\n \"allowedIps\": [\n \"<string>\"\n ],\n \"storageQuotaBytes\": 4503599627370496,\n \"dailySendLimit\": 500000,\n \"selfService\": {\n \"filters\": true,\n \"spam\": true,\n \"password\": true,\n \"activity\": true\n },\n \"name\": \"<string>\",\n \"loginAddress\": \"<string>\",\n \"sendingName\": \"<string>\",\n \"sendingAddress\": \"<string>\",\n \"enabled\": true,\n \"scopes\": [\n {\n \"domainId\": \"<string>\",\n \"address\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://inbound.new/api/e2/mailboxes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"protocols\": {\n \"imap\": true,\n \"smtp\": true,\n \"api\": true\n },\n \"allowedIps\": [\n \"<string>\"\n ],\n \"storageQuotaBytes\": 4503599627370496,\n \"dailySendLimit\": 500000,\n \"selfService\": {\n \"filters\": true,\n \"spam\": true,\n \"password\": true,\n \"activity\": true\n },\n \"name\": \"<string>\",\n \"loginAddress\": \"<string>\",\n \"sendingName\": \"<string>\",\n \"sendingAddress\": \"<string>\",\n \"enabled\": true,\n \"scopes\": [\n {\n \"domainId\": \"<string>\",\n \"address\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://inbound.new/api/e2/mailboxes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"protocols\": {\n \"imap\": true,\n \"smtp\": true,\n \"api\": true\n },\n \"allowedIps\": [\n \"<string>\"\n ],\n \"storageQuotaBytes\": 4503599627370496,\n \"dailySendLimit\": 500000,\n \"selfService\": {\n \"filters\": true,\n \"spam\": true,\n \"password\": true,\n \"activity\": true\n },\n \"name\": \"<string>\",\n \"loginAddress\": \"<string>\",\n \"sendingName\": \"<string>\",\n \"sendingAddress\": \"<string>\",\n \"enabled\": true,\n \"scopes\": [\n {\n \"domainId\": \"<string>\",\n \"address\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"loginAddress": "<string>",
"type": "mailbox",
"accessMode": "read",
"sendingMode": "identity",
"sendingName": "<string>",
"sendingAddress": "<string>",
"enabled": true,
"scopes": [
{
"id": "<string>",
"type": "domain",
"domainId": "<string>",
"domain": "<string>",
"address": "<string>"
}
],
"protocols": {
"imap": true,
"smtp": true,
"api": true
},
"allowedIps": [
"<string>"
],
"storageQuotaBytes": 123,
"dailySendLimit": 0,
"selfService": {
"filters": true,
"spam": true,
"password": true,
"activity": true
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Was this page helpful?
⌘I
TypeScript
import Inbound from "inboundemail";
const inbound = new Inbound();
const result = await inbound.mailboxes.update("<mailboxId>", {
dailySendLimit: 500
});curl -X PUT 'https://inbound.new/api/e2/mailboxes/<mailboxId>' \
-H "Authorization: Bearer $INBOUND_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"dailySendLimit": 500
}'import requests
url = "https://inbound.new/api/e2/mailboxes/{id}"
payload = {
"protocols": {
"imap": True,
"smtp": True,
"api": True
},
"allowedIps": ["<string>"],
"storageQuotaBytes": 4503599627370496,
"dailySendLimit": 500000,
"selfService": {
"filters": True,
"spam": True,
"password": True,
"activity": True
},
"name": "<string>",
"loginAddress": "<string>",
"sendingName": "<string>",
"sendingAddress": "<string>",
"enabled": True,
"scopes": [
{
"domainId": "<string>",
"address": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
protocols: {imap: true, smtp: true, api: true},
allowedIps: ['<string>'],
storageQuotaBytes: 4503599627370496,
dailySendLimit: 500000,
selfService: {filters: true, spam: true, password: true, activity: true},
name: '<string>',
loginAddress: '<string>',
sendingName: '<string>',
sendingAddress: '<string>',
enabled: true,
scopes: [{domainId: '<string>', address: '<string>'}]
})
};
fetch('https://inbound.new/api/e2/mailboxes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://inbound.new/api/e2/mailboxes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'protocols' => [
'imap' => true,
'smtp' => true,
'api' => true
],
'allowedIps' => [
'<string>'
],
'storageQuotaBytes' => 4503599627370496,
'dailySendLimit' => 500000,
'selfService' => [
'filters' => true,
'spam' => true,
'password' => true,
'activity' => true
],
'name' => '<string>',
'loginAddress' => '<string>',
'sendingName' => '<string>',
'sendingAddress' => '<string>',
'enabled' => true,
'scopes' => [
[
'domainId' => '<string>',
'address' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://inbound.new/api/e2/mailboxes/{id}"
payload := strings.NewReader("{\n \"protocols\": {\n \"imap\": true,\n \"smtp\": true,\n \"api\": true\n },\n \"allowedIps\": [\n \"<string>\"\n ],\n \"storageQuotaBytes\": 4503599627370496,\n \"dailySendLimit\": 500000,\n \"selfService\": {\n \"filters\": true,\n \"spam\": true,\n \"password\": true,\n \"activity\": true\n },\n \"name\": \"<string>\",\n \"loginAddress\": \"<string>\",\n \"sendingName\": \"<string>\",\n \"sendingAddress\": \"<string>\",\n \"enabled\": true,\n \"scopes\": [\n {\n \"domainId\": \"<string>\",\n \"address\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://inbound.new/api/e2/mailboxes/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"protocols\": {\n \"imap\": true,\n \"smtp\": true,\n \"api\": true\n },\n \"allowedIps\": [\n \"<string>\"\n ],\n \"storageQuotaBytes\": 4503599627370496,\n \"dailySendLimit\": 500000,\n \"selfService\": {\n \"filters\": true,\n \"spam\": true,\n \"password\": true,\n \"activity\": true\n },\n \"name\": \"<string>\",\n \"loginAddress\": \"<string>\",\n \"sendingName\": \"<string>\",\n \"sendingAddress\": \"<string>\",\n \"enabled\": true,\n \"scopes\": [\n {\n \"domainId\": \"<string>\",\n \"address\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://inbound.new/api/e2/mailboxes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"protocols\": {\n \"imap\": true,\n \"smtp\": true,\n \"api\": true\n },\n \"allowedIps\": [\n \"<string>\"\n ],\n \"storageQuotaBytes\": 4503599627370496,\n \"dailySendLimit\": 500000,\n \"selfService\": {\n \"filters\": true,\n \"spam\": true,\n \"password\": true,\n \"activity\": true\n },\n \"name\": \"<string>\",\n \"loginAddress\": \"<string>\",\n \"sendingName\": \"<string>\",\n \"sendingAddress\": \"<string>\",\n \"enabled\": true,\n \"scopes\": [\n {\n \"domainId\": \"<string>\",\n \"address\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"name": "<string>",
"loginAddress": "<string>",
"type": "mailbox",
"accessMode": "read",
"sendingMode": "identity",
"sendingName": "<string>",
"sendingAddress": "<string>",
"enabled": true,
"scopes": [
{
"id": "<string>",
"type": "domain",
"domainId": "<string>",
"domain": "<string>",
"address": "<string>"
}
],
"protocols": {
"imap": true,
"smtp": true,
"api": true
},
"allowedIps": [
"<string>"
],
"storageQuotaBytes": 123,
"dailySendLimit": 0,
"selfService": {
"filters": true,
"spam": true,
"password": true,
"activity": true
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"lastUsedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}