For the complete documentation index, see llms.txt. This page is also available as Markdown.

SendGrid Integration

Use SendGrid with Frevana by creating a scoped API key for email delivery.

Prerequisites

Before you start, make sure you have:

  • A SendGrid account

  • A verified sender email in your SendGrid account (link)

  • Access to the SendGrid dashboard

  • Permission to manage API keys

What Frevana needs

To complete the setup, you will need:

  • A SendGrid API key, a key that starts with SG.

  • The mail.send permission enabled

Setup steps

1

Open API key settings

Open SendGrid API Keys.

You can also navigate there from Settings → API Keys in the SendGrid dashboard.

2

Create a new API key

Click Create API Key.

Enter a recognizable name, for example:

Frevana Mail Sending

Choose Custom Access.

Avoid Full Access for production use. A restricted key is safer and easier to manage.

3

Enable the required permission

In the permissions list, enable for

  • mail.send (Full Access)

  • Email Activity (Read Access)

  • stats.read (Read Access)

Optional permissions:

  • mail_settings.read

If your requests return 403 Forbidden, verify the key permissions first.

4

Generate and copy the API key

Click Create & View.

SendGrid will generate a key like this:

SG.xxxxxxxx.yyyyyyyyyyyyyyyyyyyyy
5

Send the key back to the Frevana Agent Chat or Save the key as an environment variable

Send the key back to the Frevana Agent Chat, and it is done! or, you can save the key as an environment variable first

Use the full key exactly as shown, including the SG. prefix.

macOS / Linux

export SENDGRID_API_KEY="SG.xxxxxxxx.yyyyyyyyyyyyyyyyyyyyy"

Windows PowerShell

setx SENDGRID_API_KEY "SG.xxxxxxxx.yyyyyyyyyyyyyyyyyyyyy"

Use the real key you copied from SendGrid. Do not include extra spaces or line breaks.

Troubleshooting

403 Forbidden

Verify that:

  • The key uses Restricted Access

  • The mail.send permission is enabled

  • You copied the full key correctly

401 Unauthorized

Verify that:

  • The key has not been deleted

  • The key has not been rotated

  • The value still starts with SG.

The key is missing

SendGrid only shows a new key once.

If you did not save it, create a new API key and replace the old one.

Last updated