APIYard
Back to APIs
CommunicationBearer TokenFree tier

SendGrid

Send transactional emails reliably, manage marketing campaigns, and track opens, clicks, and bounces in real time.

Base URL

https://api.sendgrid.com/v3
emailSMTPtemplatesanalyticscampaigns

Endpoints

POST/mail/send

Send a transactional email.

const response = await fetch("https://api.sendgrid.com/v3/mail/send", {
  method: "POST",
  headers: {
  "Content-Type": "application/json",
  "Authorization": "Bearer YOUR_ACCESS_TOKEN"
  },
  body: JSON.stringify({
  "personalizations": [
    {
      "to": [
        {
          "email": "user@example.com"
        }
      ]
    }
  ],
  "from": {
    "email": "sender@yourdomain.com"
  },
  "subject": "Hello!",
  "content": [
    {
      "type": "text/plain",
      "value": "Test email"
    }
  ]
})
});

const data = await response.json();
console.log(data);

Response Preview

HTTP 202 Accepted

(No body — check the X-Message-Id header for tracking)

X-Message-Id: abc123xyz