> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/connectors/email-provider/sendgrid.md).

# SendGrid

Configure how The Wallet Crew sends transactional emails with SendGrid.

The Wallet Crew can send transactional emails through SendGrid. This covers messages like pass download links, verification emails, etc.

By default, The Wallet Crew uses **its own SendGrid account**. A brand can switch to **its own SendGrid account** when it needs full ownership of deliverability, reputation, and billing.

If the right option is not obvious yet, start with [Email provider](/connectors/email-provider.md).

### Option 1 : Use The Wallet Crew SendGrid account

This is the simplest option, and it is the default. No SendGrid account and no API key management are required. The Wallet Crew takes care of it.

To make the brand visible in the customer inbox, enable a **custom sending domain**. This improves deliverability. It also reduces spoofing and phishing risks.

{% hint style="info" %}
With The Wallet Crew SendGrid account, The Wallet Crew must enable the custom sending domain on its side. DNS records (SPF/DKIM, and ideally DMARC) still have to be added on the brand domain.
{% endhint %}

{% stepper %}
{% step %}

#### Decide which sender domain to use

Prefer a dedicated subdomain such as `wallet.yourbrand.com` or `registration.yourbrand.com`. This keeps email authentication isolated from other mail systems.

{% hint style="info" %}
Delegating a dedicated subdomain reduces the attack surface and improves security by isolating pass-related traffic. Using the same custom domain as the app is recommended.
{% endhint %}
{% endstep %}

{% step %}

#### Ask support to enable the sending domain

Contact The Wallet Crew support with the subdomain to use. The team will provide the DNS records to add and will enable the domain in SendGrid.
{% endstep %}

{% step %}

#### Configure DNS (SPF, DKIM, DMARC)

Add the DNS records provided by The Wallet Crew, then wait for DNS propagation.

For the general process and why it matters, see [Custom Domain](/configure/advanced-configuration/platform/custom-domain.md).
{% endstep %}

{% step %}

#### Test a real send

Trigger one transactional email and confirm:

* the email is delivered (not blocked or quarantined)
* the visible sender matches the intended domain
* SPF/DKIM pass (check in the mailbox headers if needed)
  {% endstep %}
  {% endstepper %}

### Option 2: Use a dedicated SendGrid account

{% stepper %}
{% step %}

#### Create a SendGrid API key

In SendGrid, go to `Settings` → `API Keys`. Create an API key with **Mail Send** permissions.
{% endstep %}

{% step %}

#### Update `/server/emails.yml`

Open the advanced configuration editor:

<p align="center"><a href="https://admin.thewalletcrew.io/tenant/~/settings/configuration" class="button secondary">The Wallet Crew Administration - Advanced configuration</a></p>

Then create or edit `/server/emails.yml`.

{% code title="/server/emails.yml" %}

```yaml
provider:
  type: sendgrid
  apiKey: YOUR_SENDGRID_API_KEY
  from:
    email: no-reply@yourbrand.com
    name: Your Brand
resources:
  - /locales/emails/
```

{% endcode %}

Use a `from.email` that belongs to a domain authenticated in SendGrid.

{% hint style="warning" %}
Treat the SendGrid API key like a password.

Do not paste it in tickets or screenshots.
{% endhint %}
{% endstep %}

{% step %}

#### Configure sender authentication in SendGrid

Authenticate the sending domain in SendGrid using the standard “Domain Authentication” flow. This configures SPF and DKIM. Add a DMARC record for the sending domain if needed. This improves deliverability and reduces spoofing risk.
{% endstep %}

{% step %}

#### Save and test

Save the file. Trigger a single transactional email. Verify the event in the SendGrid activity logs.
{% endstep %}
{% endstepper %}

## Troubleshooting

* If SendGrid returns **401** or **403**, the API key is invalid or missing permissions.
* If the “from” address is rejected, the domain is not authenticated. Check SPF and DKIM first.
* If emails land in spam, re-check authentication, DMARC policy, and sender reputation.
* If nothing changes after editing, confirm the right tenant file was saved. The file must be `/server/emails.yml`.

## FAQ

<details>

<summary><strong>Where is SendGrid configured in The Wallet Crew?</strong></summary>

Edit `/server/emails.yml` in the advanced configuration editor.

</details>

<details>

<summary><strong>Can The Wallet Crew SendGrid account be kept instead of a dedicated one?</strong></summary>

**Yes**. The Wallet Crew uses its own SendGrid configuration by default.

Sending from a brand-controlled domain is still possible. Ask support to enable a custom sending domain, then configure SPF/DKIM and DMARC on the brand DNS.

</details>

<details>

<summary><strong>Does the sending domain need to be authenticated in SendGrid?</strong></summary>

**Yes**. Enable SendGrid Domain Authentication (SPF/DKIM). Also add a DMARC record for the domain or subdomain used for `from.email`.

</details>

<details>

<summary><strong>Can different SendGrid accounts be used per environment?</strong></summary>

Yes. Each tenant has its own configuration, so a different API key can be used per tenant.

</details>

<details>

<summary><strong>What is the fastest way to validate the integration?</strong></summary>

Save `/server/emails.yml`, trigger a single transactional email, then verify it in the SendGrid Activity feed.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.thewalletcrew.io/connectors/email-provider/sendgrid.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
