curl --request POST \
--url https://app.sendmux.ai/api/v1/mailboxes/{public_id}/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"app_name": "<string>"
}
'import requests
url = "https://app.sendmux.ai/api/v1/mailboxes/{public_id}/keys"
payload = { "app_name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({app_name: '<string>'})
};
fetch('https://app.sendmux.ai/api/v1/mailboxes/{public_id}/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sendmux.ai/api/v1/mailboxes/{public_id}/keys"
payload := strings.NewReader("{\n \"app_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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))
}{
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": true,
"data": {
"credential": {
"imap_port": 993,
"key_prefix": "<string>",
"key_suffix": "<string>",
"public_id": "smx_clxxxxxxxxxxxxxxxxxxxxxxxxx",
"secret": "<string>",
"server": "mail.sendmux.ai",
"smtp_port": 587,
"username": "<string>"
}
}
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}Create a mailbox API key
Mints an additional bearer token plus IMAP/SMTP mailbox password for an existing mailbox. The plaintext key and password are shown exactly once — store them immediately.
Supply an Idempotency-Key header (any unique string, max 255 chars) to safely retry on network errors. Replays with the same key return the original response; replays with a different body return 409 idempotency_conflict.
curl --request POST \
--url https://app.sendmux.ai/api/v1/mailboxes/{public_id}/keys \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"app_name": "<string>"
}
'import requests
url = "https://app.sendmux.ai/api/v1/mailboxes/{public_id}/keys"
payload = { "app_name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({app_name: '<string>'})
};
fetch('https://app.sendmux.ai/api/v1/mailboxes/{public_id}/keys', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.sendmux.ai/api/v1/mailboxes/{public_id}/keys"
payload := strings.NewReader("{\n \"app_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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))
}{
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": true,
"data": {
"credential": {
"imap_port": 993,
"key_prefix": "<string>",
"key_suffix": "<string>",
"public_id": "smx_clxxxxxxxxxxxxxxxxxxxxxxxxx",
"secret": "<string>",
"server": "mail.sendmux.ai",
"smtp_port": 587,
"username": "<string>"
}
}
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}{
"error": {
"code": "invalid_parameter",
"message": "<string>",
"retryable": false,
"doc_url": "<string>",
"errors": [
{
"code": "invalid_string",
"field": "recipient.email",
"message": "<string>"
}
],
"param": "<string>"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"ok": false
}Authorizations
Sendmux API key. Use a root API key for Management API routes, or a mailbox credential for Mailbox API routes. Obtain keys from the dashboard under API Keys.
Headers
Client-chosen unique key to safely retry the request. Cached for 24h per (team, endpoint, key). Different body with same key returns 409 idempotency_conflict.
255"mailbox-keys-create-20260424-001"
Path Parameters
Mailbox public ID
Body
Human-friendly label for the new API key.
1 - 255Response
Mailbox API key created. The response carries a Location header pointing at the canonical URL for the new key.
true Hide child attributes
Hide child attributes
Initial credential for the mailbox. null if credential generation failed — call POST /mailboxes/{id}/keys to retry.
Hide child attributes
Hide child attributes
IMAP retrieval port
993
Credential public ID
"smx_clxxxxxxxxxxxxxxxxxxxxxxxxx"
Mailbox credential — shown exactly once. Use as a Bearer token on the HTTP API and as the password for IMAP retrieval and SMTP submission.
Mailbox server name
"mail.sendmux.ai"
SMTP submission port
587
Mailbox email address used as the login
Was this page helpful?