Docs
GoSent API
Send transactional email and verify addresses with plain HTTPS requests. Every endpoint takes and returns JSON.
Quickstart
1. Request access and verify your sending domain. 2. Copy your API key from the dashboard. 3. Send your first email:
const res = await fetch("https://gosent.io/api/v1/emails", {
method: "POST",
headers: {
"Authorization": "Bearer " + process.env.GOSENT_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
from: "CT Filings <filings@ctfilings.com>",
to: "client@example.com",
subject: "Your annual report was filed",
html: "<p>We filed your report today.</p>",
}),
});
const { id } = await res.json();Authentication
Send your API key in the Authorization header on every request. Keys start with gs_live_. Keep them on your server, never in browser code or a public repository.
Authorization: Bearer gs_live_xxxxxxxxxxxxxxxx
Send an email
POST/api/v1/emails| Field | Type | Description |
|---|---|---|
from | string | Sender, like Acme <billing@acme.com>. Must use a domain you verified. |
to | string or string[] | One or more recipients (50 total including cc and bcc). |
subject | string | Subject line. |
html / text | string | Body. Send either or both. |
cc, bcc, reply_to | string or string[] | Optional. |
verify | boolean | Optional. Checks each recipient first and refuses to send to addresses that would bounce. |
{
"id": "7f3a9c2e-41b8-4d17-9a0e-2c5b8e1f6d01",
"provider_message_id": "0100018f…"
}SMTP
Use SMTP when your software can't call an API, such as WordPress or an accounting system. SMTP credentials are issued with your account.
| Host | smtp.gosent.io |
| Port | 587 (STARTTLS) or 465 (TLS) |
| Username / password | From the dashboard, under SMTP |
Verify an address
POST/api/v1/verify{ "email": "jordan@gmial.com" }{
"email": "jordan@gmial.com",
"status": "invalid", // valid | invalid | risky | unknown
"reason": "domain_typo",
"suggestion": "jordan@gmail.com",
"checks": {
"syntax": true,
"domain_exists": true,
"mx_records": [],
"disposable": false,
"role_account": false,
"free_provider": false,
"mailbox": "not_checked"
},
"billable": true
}| Status | Meaning | Send? |
|---|---|---|
| valid | The domain accepts mail and nothing looks wrong. | Yes |
| risky | Catch-all server or shared inbox like info@. | Your choice |
| invalid | Bad format, dead domain, typo or throwaway inbox. | No |
| unknown | The domain's servers didn't answer. Not charged. | Retry later |
Verify a list
Send up to 100 addresses per request. For bigger lists, upload a CSV in the dashboard.
{ "emails": ["a@acme.com", "b@acme.com", "c@gmial.com"] }{ "results": [ … ], "summary": { "valid": 2, "invalid": 1 } }Webhooks
Add an endpoint in the dashboard and we'll POST each event to it. Events: email.sent, email.delivered, email.opened, email.clicked, email.bounced, email.complained. Reply with any 2xx status; we retry failures for 24 hours.
Errors
{ "error": { "name": "validation_error", "message": "`subject` is required." } }| Status | Name | What to do |
|---|---|---|
| 401 | missing_api_key | Check the Authorization header. |
| 403 | domain_not_verified | Send from a domain your key is allowed to use. |
| 422 | validation_error | Fix the field named in the message. |
| 429 | rate_limit_exceeded | Slow down and retry after a minute. |
| 503 | sending_not_configured | Sending isn't switched on for this account yet. |
Limits
New accounts start at 100 emails a day, rising as bounce and complaint rates stay low. Sending pauses automatically if your bounce rate passes 4% or your complaint rate passes 0.08%. See the Acceptable Use Policy.