SendGrid Email API

Set up API access for sending transactional and marketing emails with SendGrid.

⏱ 10 minutes email messaging app.sendgrid.com
getapi sendgrid

Prerequisites

  • A SendGrid account (free tier available at signup)
  • A verified sender email address or authenticated domain

Credentials

Variable Description Sensitive
SENDGRID_API_KEY API key for authenticating requests to the SendGrid API Secret

Setup Steps

  1. 1 Info

    We'll create a SendGrid API key for sending emails. You'll also need a verified sender identity before you can send any emails.

  2. 2 Open URL

    Opening the SendGrid dashboard. Sign in or create an account if prompted.

    https://app.sendgrid.com
  3. 3 Choice

    Do you have a verified sender identity (email or domain)?

  4. 4 Open URL

    Opening Sender Authentication settings. You can either verify a single sender email (quick) or authenticate an entire domain (recommended for production).

    https://app.sendgrid.com/settings/sender_auth
  5. 5 Choice

    Which verification method do you want to use?

    • Single Sender Verification (quick, good for testing)
      Configures: sender_note
    • Domain Authentication (recommended for production)
      Configures: sender_note
  6. 6 Info

    sender_note

  7. 7 Confirm

    Sender identity verified (or verification in progress for domain auth)?

    Checkpoint — confirm before continuing
  8. 8 Open URL
  9. 9 Info

    Click 'Create API Key'. Give it a descriptive name. For permissions, 'Full Access' works for development, but 'Restricted Access' is recommended for production (grant only 'Mail Send' if you just need to send emails).

  10. 10 Confirm

    API key created? It should be displayed on screen now.

    Checkpoint — confirm before continuing
  11. 11 Input

    Copy your API key and paste it here (starts with SG.):

    → SENDGRID_API_KEY
    Starts with SG. At least 20 characters
  12. 12 Validate

    Checking your API key works...

    API key verified. SendGrid is ready to send emails.
    Couldn't verify the API key. Make sure you copied it correctly and it has the necessary permissions.

Things to Know

  • SendGrid API keys are shown only once when created. If you lose it, you'll need to create a new one.
  • The free tier allows 100 emails per day. Paid plans start at 40,000 emails per month.
  • You MUST have a verified sender identity before sending any emails, or API calls will fail with a 403 error.
  • If using Single Sender Verification, emails can only be sent from that exact address. Domain auth allows any address on the domain.
  • SendGrid may suspend new accounts that send too many emails too quickly. Start with small volumes and ramp up gradually.