Mail Market by 3 Worx

API

Create a named key in the control centre. Scopes are send-only, contacts-only, or full. Test keys validate and return a simulated result. They never send real mail. Live keys need a verified sending domain with DKIM, SPF and DMARC. Sends count against the plan email allowance, and against a separate API allowance when one is set. A key that exceeds its per-minute limit gets 429 and Retry-After.

SMTP relay credentials are coming later. This cPanel host cannot accept per-organisation SMTP logins without a mail daemon, so Mail Market does not issue them.

GET /v1/lists

List audiences

php

$response = file_get_contents('https://mailmarket.3worxsolutions.com/api/v1/lists', false, stream_context_create(['http' => ['header' => "Authorization: Bearer mm_live_...\r\n"]]));

javascript

const lists = await fetch('/api/v1/lists', { headers: { Authorization: 'Bearer mm_live_...' } }).then((r) => r.json());

python

import urllib.request
request = urllib.request.Request('https://mailmarket.3worxsolutions.com/api/v1/lists', headers={'Authorization': 'Bearer mm_live_...'})
print(urllib.request.urlopen(request).read())

POST /v1/lists

Create a list

GET /v1/lists/{list}/contacts

Contacts on a list

POST /v1/lists/{list}/contacts

Add a contact with consent

POST /v1/transactional

Send one transactional email. Requires a verified domain. Send Idempotency-Key to make a retry safe.

php

$body = json_encode(['to' => 'reader@example.co.za', 'subject' => 'Your receipt', 'html' => '<p>Thanks {{name}}</p>', 'merge' => ['name' => 'Aya']]);
$context = stream_context_create(['http' => ['method' => 'POST', 'header' => "Authorization: Bearer mm_live_...\r\nContent-Type: application/json\r\nIdempotency-Key: receipt-1001\r\n", 'content' => $body]]);
echo file_get_contents('https://mailmarket.3worxsolutions.com/api/v1/transactional', false, $context);

javascript

await fetch('/api/v1/transactional', { method: 'POST', headers: { Authorization: 'Bearer mm_test_...', 'Content-Type': 'application/json', 'Idempotency-Key': 'receipt-1001' }, body: JSON.stringify({ to: 'reader@example.co.za', subject: 'Your receipt', html: '<p>Thanks</p>' }) });

python

import json, urllib.request
body = json.dumps({'to': 'reader@example.co.za', 'subject': 'Your receipt', 'html': '<p>Thanks</p>'}).encode()
request = urllib.request.Request('https://mailmarket.3worxsolutions.com/api/v1/transactional', data=body, headers={'Authorization': 'Bearer mm_live_...', 'Content-Type': 'application/json', 'Idempotency-Key': 'receipt-1001'})
print(urllib.request.urlopen(request).read())

POST /v1/transactional/batch

Send one template to many recipients, up to the plan batch limit, with per-recipient merge data.

GET /v1/messages/{message}

Message status. One of queued, sent, delivered, bounced, complained, opened or clicked.

GET /v1/messages/{message}/events

Events recorded for a message

OpenAPI document