Developer Docs

Connect a verified domain, create an API key, and send transactional email from your backend.

Start here

Quickstart

GoSend is designed for backend-triggered transactional email: signups, password resets, audit notifications, support tickets, and system alerts.

1

Add a sending domain

Open Domains, enter the domain you own, and GoSend will create an AWS SES identity for it. Copy the generated DKIM, SPF, MAIL FROM, and DMARC records into your DNS provider.

2

Wait for DNS verification

GoSend checks public DNS records and syncs SES identity status. A domain must be Verified before it can be used in the from address.

3

Create an API key

Create a live key for production or a test key for local development. Store the token in your server environment and never expose it in frontend code.

4

Send your first email

Call POST /api/v1/emails from your backend with a verified sender, recipient list, subject, and HTML body. The API returns a queued message id immediately.

DNS

Domain Verification

Your sending domain must be verified before GoSend accepts production email from it. Domains can be hosted on any DNS provider.

RecordTypePurpose
DKIMCNAMEProves that GoSend is allowed to sign mail for your domain.
SPFTXTAllows AWS SES mail servers to send on behalf of your domain.
MAIL FROMMX/TXTImproves bounce handling and aligns the return-path domain.
DMARCTXTTells receiving mailboxes how to handle unauthenticated messages.

DNS propagation can take a few minutes or longer depending on the provider. GoSend checks public DNS and the SES identity status before allowing send requests.

API

Authentication

Authenticate Email API requests with a bearer token. API keys belong to one user account and should only be used from trusted backend environments.

Authorization: Bearer gs_live_xxxxxxxxxxxxxxxxxxxxx
Endpoint

Send Email

Use this endpoint to queue one transactional email. The from address must use a domain already verified in your account.

curl -X POST https://api.gosend.dev/api/v1/emails \
  -H "Authorization: Bearer gs_live_xxxxxxxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "GoSend <noreply@gosend.dev>",
    "to": ["user@gmail.com"],
    "subject": "Welcome",
    "html": "<h1>Hello</h1>"
  }'

Request fields

  • from - Sender name and email address on a verified domain.
  • to - One or more recipient email addresses.
  • subject - Email subject line.
  • html - HTML body rendered by recipient mail clients.

Response

{
  "id": "msg_xxx",
  "status": "queued"
}
Delivery

Email Events

Email logs and webhooks use the same lifecycle language so your product can react to delivery outcomes consistently.

StatusDescription
QueuedThe request passed validation and is waiting to be sent.
SentThe provider accepted the message for delivery.
DeliveredA delivery event was received from the provider.
BounceThe recipient mailbox rejected the message.
ComplaintThe recipient or mailbox provider reported the message as unwanted.
{
  "event": "email.delivered",
  "email": "user@gmail.com",
  "message_id": "msg_xxx"
}
Safety

Errors and Limits

GoSend validates sender ownership, API keys, and account quota before a message is queued.

ErrorMeaning
401 UnauthorizedMissing, invalid, or revoked API key.
403 ForbiddenThe API key is valid, but the sender domain does not belong to this account.
422 Unprocessable EntityThe request body is missing required fields or has invalid email addresses.
429 Too Many RequestsThe account has exceeded plan quota or rate limits.