RealComposer

SendGrid Safe & Unsafe Practices

Direct Answer

SendGrid API keys are server-only. Create restricted keys limited to Mail Send, authenticate your sending domain, and never expose an endpoint that lets callers choose arbitrary recipients or message bodies.

Credentials & Where They Belong

Server only
Restricted API key (SG.)

Limit to Mail Send for transactional sending.

Server only
Event Webhook verification key

Verifies signed event webhook deliveries.

Safe Practices

  • Use Mail Send only keys

    A leaked restricted key cannot read contacts or change account settings.

  • Send from templates with fixed recipients

    Derive the recipient from the authenticated user and fill dynamic template data on the server.

Unsafe Practices

  • Using a full access key for sending

    Full access keys can export contacts and create new keys.

  • Accepting to, subject, and HTML from the client

    This turns your domain into a spam and phishing relay.

The RealComposer Pattern

Store SENDGRID_API_KEY in the vault and build a POST pipeline with a fixed template ID so clients only supply safe dynamic fields.

START BUILDING FREE

Frequently Asked Questions

Q:Can I send SendGrid email from a frontend form?

Only through a server or edge proxy that holds the key and controls recipients and templates.

SendGrid Recipes

Multi-API Aggregation

Merge Airtable Records and Sendgrid Email Templates

To solve merge airtable records and sendgrid email templates, never execute unauthenticated requests or embed private tokens directly in client bundles. RealComposer acts as a sub-10ms edge gateway running on Cloudflare Workers that securely injects credentials from your Secret Vault, normalizes responses, and prevents unauthorized API usage. Route calls through your RealComposer edge URL to guarantee complete privacy, robust origin validation, and low mobile latency.

Sub-10ms edgeView Recipe
Payload Slimmer

Trim Sendgrid Activity API JSON Response

To solve trim sendgrid activity api json response, never execute unauthenticated requests or embed private tokens directly in client bundles. RealComposer acts as a sub-10ms edge gateway running on Cloudflare Workers that securely injects credentials from your Secret Vault, normalizes responses, and prevents unauthorized API usage. Route calls through your RealComposer edge URL to guarantee complete privacy, robust origin validation, and low mobile latency.

Sub-10ms edgeView Recipe

Related Concepts