# SparkPost (/docs/adapters/sparkpost)



<ProviderBadge adapter="sparkpost" />

```ts
import { createEmailClient } from "email-sdk";
import { sparkpost } from "email-sdk/sparkpost";

const email = createEmailClient({
  adapters: [sparkpost({ apiKey: process.env.SPARKPOST_API_KEY! })],
});
```

## Options [#options]

| Option    | Type           | Required | Notes                                           |
| --------- | -------------- | -------- | ----------------------------------------------- |
| `apiKey`  | `string`       | Yes      | SparkPost API key.                              |
| `baseUrl` | `string`       | No       | Defaults to `https://api.sparkpost.com/api/v1`. |
| `sandbox` | `boolean`      | No       | Enables SparkPost sandbox mode.                 |
| `fetch`   | `typeof fetch` | No       | Useful for tests or custom runtimes.            |

SparkPost does not expose normalized CC/BCC in this adapter. See <a href="/docs/adapters/field-support">field support</a>.
