A simple email API for the messages your systems send
Appointment confirmations, reminders, verification codes, bills: your software sends them, TelicMail delivers them from your own domain, signed with DKIM and logged. One endpoint, plain JSON.
Authentication
An organisation admin creates API keys on the Developers page of the admin console. A key is shown once when it is created; TelicMail stores only a hash of it. Send it as a bearer token on every request.
- Create separate keys per system (HMIS, website, billing) and revoke them independently
- Keys belong to one organisation and can only send from that organisation's domains
Send a message
POST https://mail.teliccognitive.com/api/v1/send. Provide either your own subject and text/HTML, or a template name and its variables.
Request fields
| from | Sender address on one of your domains (required) |
| fromName | Display name |
| to | List of recipients (required) |
| cc | List of copy recipients |
| subject, text, html | Your own content |
| template, variables | Use a built-in template instead |
| replyTo | Where replies should go |
Response
Built-in templates
Templates are written for healthcare but work for any business. List them with GET /api/v1/templates.
| Template | Use it for | Variables |
|---|---|---|
| appointment_confirmation | Appointment confirmation | patient, doctor, department, date, time, phone, hospital |
| report_ready | Report ready | patient, report, portal_link, hospital |
| appointment_reminder | Appointment reminder | patient, doctor, date, time, hospital |
| otp | One-time code | hospital, code, minutes |
| invoice_ready | Bill / invoice ready | patient, bill_no, amount, link, hospital |
The report-ready template links to your patient portal rather than attaching the report, which is the safer practice for medical records.
Message log
Every message sent through the API is recorded with sender, recipients, subject, template, status and any
error. Read the latest entries with GET /api/v1/messages?limit=50 (up to 200), or see them in the admin console.
Limits and errors
| Status | Meaning |
|---|---|
| 200 | Accepted and sent |
| 400 | Invalid request, e.g. a sender that isn't on your domains or a missing template variable |
| 401 | Missing or invalid API key |
| 429 | Too many requests per second for this key, the daily sending limit was reached, or sending is paused |
| 502 | The mail server couldn't accept the message; safe to retry later |
Each key may make up to 20 requests per second. Daily limits per user depend on your plan (50 to 2,000 messages); see pricing.
Start sending from your own domain
Create an organisation, verify your domain and generate an API key in a few minutes.