Documentation
Audymail is a JSON API. Base URL: https://audymail.audiory.site
Authentication
Create a key on the API keys page and send it as a bearer token. Keep keys on your server, never in browser code.
Authorization: Bearer am_your_key
Send an email
POST /api/v1/emails. Provide to, subject and one of text, html or template_id.
curl -X POST https://audymail.audiory.site/api/v1/emails \
-H "Authorization: Bearer am_your_key" \
-H "Content-Type: application/json" \
-d '{"to":"amina@example.com","subject":"Hello","html":"<p>Hi Amina</p>"}'Success returns:
{ "id": "em_3f9a1c2b7d10", "status": "sent" }Send an SMS
POST /api/v1/sms. Provide to with the country code and content (up to 480 characters).
curl -X POST https://audymail.audiory.site/api/v1/sms \
-H "Authorization: Bearer am_your_key" \
-H "Content-Type: application/json" \
-d '{"to":"254712345678","content":"Your code is 482913"}'Templates
Create a template on the Templates page using {{variable}} placeholders, then send it by ID.
{
"to": "amina@example.com",
"template_id": "tpl_a1b2c3d4e5",
"variables": { "name": "Amina" }
}Errors and limits
Errors return a JSON body with an error message and one of these status codes.
- 400 The request is missing or has invalid fields.
- 401 The API key is missing, invalid or revoked.
- 403 Your email address is not verified yet.
- 404 A template or route was not found.
- 429 You reached the daily limit (100 emails, 5 SMS per 24 hours on the free plan).
- 502 The delivery provider rejected the message.