GoodSender Quick Start: Send Email via API in 5 Minutes
Get up and running with GoodSender in 5 minutes. Authenticate your domain, create an API key, and send your first email.
On this page
Overview
GoodSender is a free email sending service created to eliminate unwanted emails. All emails sent through GoodSender require explicit consent from recipients, ensuring a spam-free experience. Whether you're sending newsletters, transactional emails, or marketing campaigns, GoodSender provides a reliable and user-friendly platform to connect with your audience without the worry of being marked as spam.
Why GoodSender?
Zero cost
- • Nothing extra
- • No spam complaints
- • Send to recipients who have granted consent
Powered by Laneful
- • Simple setup
- • Reliable email infrastructure
- • Built by veterans of the email industry
Prerequisites
Domain Authentication (Required)
Before sending any emails, you must authenticate the domain you'll be sending from. This involves adding DNS records that prove you own the domain.
Set Up Domain Authentication
Add the following DNS records to your domain to authenticate it for sending emails through GoodSender. Replace example.com with your actual domain.
| Type | Name | Value |
|---|---|---|
| CNAME | bounces.example.com | rp.net.goodsender.com. |
| CNAME | click.example.com | track.net.goodsender.com. |
| CNAME | dkim1._domainkey.example.com | dkim1._domainkey.net.goodsender.com. |
| CNAME | dkim2._domainkey.example.com | dkim2._domainkey.net.goodsender.com. |
| TXT | _dmarc.example.com | v=DMARC1;p=none;rua=mailto:dmarc@dmarc.net.goodsender.com; |
Return Path — routes bounced emails back so you can track delivery failures.
Tracking — enables open and click tracking in your emails.
DKIM (1 & 2) — cryptographically signs your emails to prove they haven't been tampered with.
DMARC — tells receiving servers how to handle emails that fail authentication checks.
5-Minute Quick Start
All emails sent through GoodSender require consent from recipients, ensuring a spam-free experience.
Follow these steps to send your first email with GoodSender:
Authenticate Your Domain
Add DNS records to verify you own the domain you'll send emails from.
Create an API Key
Generate an API key to authenticate your requests to the GoodSender API.
Set up redirect and webhook URLs
Use workspace settings to configure the redirect and webhook URLs for handling consent approval and rejection events.
GoodSender will `POST` a JSON array where each item includes the domain, recipient consent, and the granted or denied email addresses for that domain.
POST https://yourapp.com/webhooks/goodsender
Content-Type: application/json
{
"example.com": {
"granted": [
"alice@example.com",
"ops@example.com"
],
"denied": [
"bob@example.com"
]
},
"otherdomain.com": {
"granted": [
"charlie@example.com"
],
"denied": [
"blocked@otherdomain.com"
]
}
}Request recipient consent
Ensure each recipient has consented and opted in to receive communications. Each entry in `emails` may be either a bare email string or a `{ "email": ..., "name": ... }` object — the optional `name` is shown in the To header on the consent message.
curl -X POST https://api.goodsender.com/v1/emails/consent \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"domain": "example.com",
"emails": [
"recipient@example.com",
{ "email": "named@example.com", "name": "Jane Doe" }
]
}'Send Your First Email
Use our API or SMTP to send your first email through your lane.
curl -X POST https://api.goodsender.com/v1/emails/send \
-H "Authorization: Bearer <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"emails": [
{
"from": { "email": "sender@example.com", "name": "Example Sender" },
"to": [{ "email": "recipient@example.com" }],
"subject": "Hello from GoodSender",
"text_content": "Your first email is on the way."
}
]
}'