Update workspace
curl --request PUT \
--url https://console.mermail.app/api/v1/workspaces/{workspaceId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Acme Agents",
"timezone": "America/New_York"
}
'import requests
url = "https://console.mermail.app/api/v1/workspaces/{workspaceId}"
payload = {
"name": "Acme Agents",
"timezone": "America/New_York"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Agents', timezone: 'America/New_York'})
};
fetch('https://console.mermail.app/api/v1/workspaces/{workspaceId}', 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://console.mermail.app/api/v1/workspaces/{workspaceId}",
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([
'name' => 'Acme Agents',
'timezone' => 'America/New_York'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://console.mermail.app/api/v1/workspaces/{workspaceId}"
payload := strings.NewReader("{\n \"name\": \"Acme Agents\",\n \"timezone\": \"America/New_York\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://console.mermail.app/api/v1/workspaces/{workspaceId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Agents\",\n \"timezone\": \"America/New_York\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.mermail.app/api/v1/workspaces/{workspaceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Agents\",\n \"timezone\": \"America/New_York\"\n}"
response = http.request(request)
puts response.read_body{
"id": "ws_01abc",
"name": "Acme Agents",
"owner_address": "0xabc123def456",
"timezone": "America/New_York",
"role": "admin",
"mailbox_count": 2,
"storage": {
"provider": "harbor_r2",
"status": "ready",
"redundancy_enabled": true,
"storage_key_status": "ready",
"storage_key_last_error": null,
"space_id": "spc_01xyz",
"bucket_id": "bkt_01xyz",
"owner_address": "0xabc123def456",
"has_api_key": true,
"has_service_private_key": true,
"harbor_provisioning_status": "ready",
"harbor_last_error": null,
"r2_bucket_name": "mermail-ws-01abc",
"r2_provisioning_status": "ready",
"r2_last_error": null,
"last_error": null
},
"created_at": "2026-07-01T12:00:00.000Z",
"updated_at": "2026-07-15T08:00:00.000Z"
}{
"error": "Invalid timezone"
}{
"error": "Unauthorized"
}{
"error": "Invalid request"
}{
"error": "Forbidden"
}{
"error": "Too many requests"
}Workspaces
Update workspace
Plans: Free · Developer · Enterprise
Updates workspace settings. Requires workspace admin. At least one of name or timezone is required (timezone may be null to clear). With an API key, workspaceId must match the key’s workspace.
API credits: 2 (write).
PUT
https://console.mermail.app
/
api
/
v1
/
workspaces
/
{workspaceId}
Update workspace
curl --request PUT \
--url https://console.mermail.app/api/v1/workspaces/{workspaceId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"name": "Acme Agents",
"timezone": "America/New_York"
}
'import requests
url = "https://console.mermail.app/api/v1/workspaces/{workspaceId}"
payload = {
"name": "Acme Agents",
"timezone": "America/New_York"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Acme Agents', timezone: 'America/New_York'})
};
fetch('https://console.mermail.app/api/v1/workspaces/{workspaceId}', 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://console.mermail.app/api/v1/workspaces/{workspaceId}",
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([
'name' => 'Acme Agents',
'timezone' => 'America/New_York'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://console.mermail.app/api/v1/workspaces/{workspaceId}"
payload := strings.NewReader("{\n \"name\": \"Acme Agents\",\n \"timezone\": \"America/New_York\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://console.mermail.app/api/v1/workspaces/{workspaceId}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Acme Agents\",\n \"timezone\": \"America/New_York\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://console.mermail.app/api/v1/workspaces/{workspaceId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Acme Agents\",\n \"timezone\": \"America/New_York\"\n}"
response = http.request(request)
puts response.read_body{
"id": "ws_01abc",
"name": "Acme Agents",
"owner_address": "0xabc123def456",
"timezone": "America/New_York",
"role": "admin",
"mailbox_count": 2,
"storage": {
"provider": "harbor_r2",
"status": "ready",
"redundancy_enabled": true,
"storage_key_status": "ready",
"storage_key_last_error": null,
"space_id": "spc_01xyz",
"bucket_id": "bkt_01xyz",
"owner_address": "0xabc123def456",
"has_api_key": true,
"has_service_private_key": true,
"harbor_provisioning_status": "ready",
"harbor_last_error": null,
"r2_bucket_name": "mermail-ws-01abc",
"r2_provisioning_status": "ready",
"r2_last_error": null,
"last_error": null
},
"created_at": "2026-07-01T12:00:00.000Z",
"updated_at": "2026-07-15T08:00:00.000Z"
}{
"error": "Invalid timezone"
}{
"error": "Unauthorized"
}{
"error": "Invalid request"
}{
"error": "Forbidden"
}{
"error": "Too many requests"
}Authorizations
API key (sk-proj-…) from Settings → API Keys. Required for sold API calls outside the Mermail console.
Path Parameters
Workspace id
Body
application/json
⌘I