MailboxesConnect a mailbox

Connect a mailbox

Connect a new mailbox for sending emails. Supports SMTP, Google OAuth, and Outlook OAuth. The connection is tested before the mailbox is saved.

curl -X POST "https://api.supasend.io/v1/mailboxes" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
{
  "id": "example_string",
  "type": "smtp",
  "email": "user@example.com",
  "display_name": "John Doe",
  "status": "active",
  "max_daily_sends": 500,
  "imap_host": "example_string",
  "imap_port": 42,
  "imap_username": "John Doe",
  "inbox_sync_enabled": true,
  "inbox_sync_from": "2024-12-25T10:00:00Z",
  "inbox_last_sync_at": "2024-12-25T10:00:00Z",
  "inbox_last_error": "example_string",
  "created_at": "2024-12-25T10:00:00Z",
  "updated_at": "2024-12-25T10:00:00Z"
}
POST
/v1/mailboxes
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key in the format sk_live_<64 hex characters>

API key in the format sk_live_<64 hex characters>
Content-Typestring
Required

The media type of the request body

Options: application/json
No request body parameters defined
Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. API key in the format sk_live_\<64 hex characters\>

Body

application/json
datastring
Required

Raw application/json data

Responses