Skip to content

SendGrid

Connect your SendGrid account to Optail.

  1. Log in to the SendGrid dashboard
  2. Go to Settings > API Keys
  3. Click Create API Key
  4. Select Restricted Access and enable:
    • Mail Send > Full Access
    • Tracking > Read Access (for webhook events)
  5. Copy the API key (it is only shown once)
  1. Go to Providers > Connect Provider
  2. Select SendGrid
  3. Enter a display name (e.g., “SendGrid Production”)
  4. Paste your API key
  5. Click Connect — Optail validates the key by calling SendGrid’s API
Terminal window
curl -X POST https://api.optail.io/v1/providers \
-H "Authorization: Bearer ms_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"providerType": "SENDGRID",
"displayName": "SendGrid Production",
"credentials": {
"apiKey": "SG.xxxxxxxxxxxxxxxxxxxxx"
}
}'

If you have not already verified your domain in SendGrid:

  1. In SendGrid, go to Settings > Sender Authentication > Domain Authentication
  2. Follow the DNS record setup (CNAME records)
  3. Wait for DNS propagation (usually under 1 hour)

Optail checks domain verification status when sending. Unverified domains may still work depending on your SendGrid account settings, but verified domains improve deliverability.

To receive delivery events (delivered, opened, bounced, etc.) in Optail:

  1. In SendGrid, go to Settings > Mail Settings > Event Webhook
  2. Set the HTTP POST URL to: https://webhooks.optail.io/v1/ingest/sendgrid
  3. Select the events you want to track:
    • Delivered, Opened, Clicked, Bounced, Spam Report, Unsubscribe, Dropped, Deferred
  4. Enable the webhook

Optail normalizes SendGrid events into its unified event format and updates message status automatically.

FieldDescription
apiKeySendGrid API key starting with SG.