> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apollodeploy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send emails with Express

> Send a transactional email from an Express route with the official Apollo Signal SDK

Create one SDK client for the process and reuse it from your Express routes. The client uses
`https://api.signal.apollodeploy.com` by default.

Before you start, [create an API key](/signal/create-an-api-key) with **Emails: Send** permission
and [verify the From domain](/signal/add-a-domain).

<Steps>
  <Step title="Install the packages">
    ```bash theme={"dark"}
    npm install @apollo-deploy/signal-sdk express
    ```
  </Step>

  <Step title="Store your API key">
    Set `SIGNAL_API_KEY` in the server environment. Never accept an API key from the request body.
  </Step>

  <Step title="Send from a route">
    ```typescript theme={"dark"}
    import { ApolloSignalApi } from "@apollo-deploy/signal-sdk";
    import express from "express";

    const app = express();
    const signal = new ApolloSignalApi();

    app.use(express.json());

    app.post("/send-welcome", async (request, response, next) => {
      try {
        const message = await signal.emails.sendEmail(
          {
            from: "welcome@mail.company.com",
            to: [request.body.email],
            subject: "Welcome",
            text: "Your account is ready.",
          },
          {
            headers: {
              Authorization: `Bearer ${process.env.SIGNAL_API_KEY}`,
            },
          },
        );

        response.status(201).json({ id: message.id });
      } catch (error) {
        next(error);
      }
    });
    ```
  </Step>
</Steps>

Authenticate the route, validate the recipient, and use your normal Express error middleware to
handle SDK errors without logging the API key.

<CardGroup cols={2}>
  <Card title="All SDKs" icon="code" href="/signal/send-with/sdk-overview">
    Compare every supported language and framework.
  </Card>

  <Card title="Email API" icon="brackets-curly" href="/signal/api-reference/introduction">
    Review request fields and error responses.
  </Card>
</CardGroup>
