> For the complete documentation index, see [llms.txt](https://docs.giftcardfactory.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.giftcardfactory.app/misc/app-emails/sending-domain/sendgrid.md).

# SendGrid

SendGrid sends your app emails through your own [SendGrid](https://sendgrid.com/) account. You'll need a SendGrid account with a verified sender identity (single sender or authenticated domain) before you start.

### 1. Create a SendGrid API key

In your SendGrid dashboard, navigate to **Settings → API Keys**.

<figure><img src="https://2895247924-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcsKliv3CuXU7kN4gxX9B%2Fuploads%2FUf7wtItN7gkwZDD4c4uo%2Fimage.png?alt=media&amp;token=72d0e431-8ed3-4498-8bd9-3e1278453e30" alt="" width="177"><figcaption></figcaption></figure>

Click **Create API Key** and select **Restricted Access** (or **Custom Access**, depending on your account version).

<figure><img src="https://2895247924-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcsKliv3CuXU7kN4gxX9B%2Fuploads%2FXreGFwvyiSPMRFOfHt5V%2Fimage.png?alt=media&amp;token=1aa56bdb-9fe4-4112-8862-905650438083" alt="" width="375"><figcaption></figcaption></figure>

Under **Access Details**, give the key **Full Access** for **Mail Send**, then click **Create & View**. Copy the API key — you won't be able to see it again.

### 2. Add the API key to Gift Card Factory

1. Open **Settings → App Emails Sending** in the Gift Card Factory app.
2. Select **API Keys**.
3. In **From**, enter the address you want emails to come from in the format `My Store <hello@validated-domain.com>`. The address must be on a domain that is already authenticated in your SendGrid account.
4. Set **Provider** to **Sendgrid**.
5. Paste your API key into **Provider API key**.
6. Save the settings.<br>

<figure><img src="https://2895247924-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcsKliv3CuXU7kN4gxX9B%2Fuploads%2FCETiJdo495whjyQqnH1c%2Fimage.png?alt=media&amp;token=6b4e094e-5f09-4a3a-b68c-61d8c40eda9c" alt="" width="375"><figcaption></figcaption></figure>

From now on, all app emails will be delivered through your SendGrid account, using your domain in the **From** address.

{% hint style="warning" %}
If the **From** domain is not authenticated in SendGrid, sends will fail. Make sure domain authentication is set up on the SendGrid side first.
{% endhint %}
