Staurax Mail REST API
Integrate email outreach capabilities directly into your web applications using the Staurax Mail REST API. Designed for developers needing fast, encrypted, and queue-isolated email delivery.
What is Staurax Mail REST API?
The Staurax Mail REST API accepts JSON payloads over HTTPS and returns standardized HTTP response codes.
Base API Endpoint: `https://inbox.staurax.com/api/v1`
All endpoints require Bearer Token authentication via the `Authorization` header.
Key Features
Bearer Token Authorization
Pass `Authorization: Bearer stx_live_...` with every request. Manage API keys securely from your dashboard.
Asynchronous Queue Isolation
API requests respond in under 30ms while campaign dispatches run in Horizon Redis background workers.
How It Works
1. Obtain your API Key from inbox.staurax.com/api-keys.
2. Pass your Bearer Token in the HTTP Authorization header.
3. Send HTTP POST requests with JSON body parameters to dispatch campaigns or sync contact suppressions.
4. Parse the returned JSON response containing the job batch ID.
Code Example & API Usage
### cURL Request
curl -X POST https://inbox.staurax.com/api/v1/campaigns/dispatch \
-H "Authorization: Bearer stx_live_9f8a3c2b1e4d5" \
-H "Content-Type: application/json" \
-d '{
"name": "API Cold Campaign",
"subject": "Quick question for {{company}}",
"recipients": [
{"email": "
[email protected]", "first_name": "John", "company": "Acme Corp"}
]
}'
### PHP (Laravel Guzzle Client)
$response = Http::withToken('stx_live_9f8a3c2b1e4d5')
->post('https://inbox.staurax.com/api/v1/campaigns/dispatch', [
'name' => 'API Cold Campaign',
'recipients' => [
['email' => '
[email protected]', 'first_name' => 'John']
]
]);
### Node.js (Fetch API)
const res = await fetch('https://inbox.staurax.com/api/v1/campaigns/dispatch', {
method: 'POST',
headers: {
'Authorization': 'Bearer stx_live_9f8a3c2b1e4d5',
'Content-Type': 'application/json'
},
body: JSON.stringify({ name: 'API Cold Campaign', recipients: [{ email: '
[email protected]' }] })
});
Start Building with Staurax Mail API
Integrate high-deliverability email sending into your web apps in minutes.