> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# SendGrid

**Authentication:** API key. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow.

## Sample use cases

* Pull bounce and click rates for the last campaign sent.
* Send the `Welcome` template to the contacts in this CSV with their first name prefilled.
* Find email addresses on the suppression list added in the last 30 days.

## Available Tools

#### list\_api\_keys

List all API keys in your SendGrid account. Does not include the actual key values.

#### get\_api\_key

Get details of a specific API key by ID. Does not return the actual key value.

#### create\_api\_key

Create a new API key with specified scopes. IMPORTANT: The key value is only shown once on creation.

#### update\_api\_key

Update an API key's name or scopes.

#### delete\_api\_key

Delete an API key. This action is irreversible.

#### send\_email

Send an email via SendGrid. Supports plain text, HTML, templates, attachments, and batch sending with personalizations.

#### send\_simple\_email

Send a simple email with just recipient, sender, subject, and text/HTML content. For more advanced options, use send\_email.

#### send\_template\_email

Send an email using a SendGrid dynamic template with personalization data.

#### list\_verified\_senders

List all verified sender identities in your SendGrid account.

#### create\_verified\_sender

Create a new verified sender identity. A verification email will be sent to the address.

#### update\_verified\_sender

Update a verified sender's details.

#### delete\_verified\_sender

Delete a verified sender identity.

#### resend\_verification\_email

Resend the verification email for a pending verified sender.

#### list\_authenticated\_domains

List all authenticated domains for email sending. Authenticated domains improve deliverability.

#### get\_authenticated\_domain

Get details of a specific authenticated domain including DNS records.

#### authenticate\_domain

Add a new domain for authentication. Returns DNS records to configure with your DNS provider.

#### validate\_authenticated\_domain

Validate that DNS records are properly configured for a domain.

#### delete\_authenticated\_domain

Delete an authenticated domain from your SendGrid account.

#### get\_global\_stats

Get global email statistics including sends, opens, clicks, bounces, and unsubscribes for a date range.

#### get\_category\_stats

Get email statistics filtered by categories for a date range.

#### get\_geo\_stats

Get geographic email statistics showing opens and clicks by country.

#### get\_mailbox\_provider\_stats

Get email statistics by mailbox provider (Gmail, Outlook, Yahoo, etc.).

#### get\_browser\_stats

Get email click statistics by browser type.

#### get\_device\_stats

Get email open statistics by device type (desktop, mobile, tablet, webmail).

#### list\_bounces

List all bounced email addresses. Bounces occur when an email cannot be delivered to the recipient.

#### get\_bounce

Get bounce information for a specific email address.

#### delete\_bounce

Delete a single bounce record by email address, allowing future sends to that address.

#### delete\_bounces

Delete multiple bounce records by email or delete all bounces.

#### list\_blocks

List all blocked email addresses. Blocks occur when the recipient server rejects your email.

#### get\_block

Get block information for a specific email address.

#### delete\_block

Delete a single block record by email address.

#### delete\_blocks

Delete multiple block records by email or delete all blocks.

#### list\_spam\_reports

List all spam reports. Spam reports are filed when recipients mark your email as spam.

#### get\_spam\_report

Get spam report information for a specific email address.

#### delete\_spam\_report

Delete a single spam report by email address.

#### delete\_spam\_reports

Delete multiple spam reports by email or delete all spam reports.

#### list\_global\_unsubscribes

List all globally unsubscribed email addresses. These addresses will not receive any emails.

#### add\_global\_unsubscribes

Add email addresses to the global unsubscribe list. These addresses will not receive any emails.

#### delete\_global\_unsubscribe

Remove an email address from the global unsubscribe list, allowing emails to be sent again.

#### list\_suppression\_groups

List all suppression groups. Suppression groups allow recipients to unsubscribe from specific types of emails.

#### get\_suppression\_group

Get details of a specific suppression group by ID.

#### create\_suppression\_group

Create a new suppression group for managing email preferences.

#### update\_suppression\_group

Update a suppression group's name, description, or default status.

#### delete\_suppression\_group

Delete a suppression group. Cannot delete groups with active suppressions.

#### list\_group\_suppressions

List all email addresses suppressed in a specific group.

#### add\_group\_suppression

Add email addresses to a suppression group, preventing them from receiving that type of email.

#### delete\_group\_suppression

Remove an email address from a suppression group.

#### list\_templates

List all transactional email templates in SendGrid.

#### get\_template

Get a transactional template by ID with all its versions.

#### create\_template

Create a new transactional email template.

#### update\_template

Update a transactional template name.

#### delete\_template

Delete a transactional template and all its versions.

#### create\_template\_version

Create a new version of an existing template with HTML/text content.

#### get\_template\_version

Get a specific template version by ID.

#### update\_template\_version

Update a template version content, subject, or active status.

#### delete\_template\_version

Delete a specific template version.

#### activate\_template\_version

Activate a specific template version to be used when sending emails.