> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/emails/integrations/set-default.md).

# Set as default

Make an email integration the default — the provider new campaigns and trigger actions pre-select.

**Where:** Email → Integrations → an integration → **Actions → Set as default** · `/projects/<project>/emails/integrations/<integrationId>/edit`

The default integration is the one the campaign form, the template **Test** panel and the Email trigger action pre-select. System emails (password reset, email verification, the unsubscribe confirmation) also go through it. There is one default per environment.

## Before you start

* An enabled integration that is not the default yet — the item is off on a disabled integration and on the current default. [Test it](/codemash/cloud/emails/integrations/test.md) first.
* Permission `email:manage` (built-in **Administrator**).

## Steps

1. Open the integration, for example `Mailpit (local test)`, and open **Actions**.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-9757bfe38c75cdc28d619529c3857d7f6b068223%2Fintegrations-set-default-1.png?alt=media" alt="Actions menu: Set as default, Disable, See Smtp documentation, See SDK documentation, See API documentation, Delete"><figcaption><p>The Actions menu of an integration.</p></figcaption></figure>
2. Press **Set as default**.

## Result

The integration gets the **DEFAULT** badge, and the list shows **DEFAULT** in its row instead of the old one.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-7e2bcd00118e1420d7aee1110dd864d278dc0ffe%2Fintegrations-set-default-2.png?alt=media" alt="Editing SMTP integration with the badges DEFAULT, ENABLED, TESTED, CONFIRMED"><figcaption><p>The integration is now the default.</p></figcaption></figure>

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-cc8e4ec1b97f13b6040ea0b0832b16a11ed7aade%2Fintegrations-set-default-3.png?alt=media" alt="Email Service Integrations list with DEFAULT on Mailpit (local test)"><figcaption><p>The list shows the new default.</p></figcaption></figure>

* New campaigns pre-select it, and campaign lists show it as `<name> (Default)`.
* **Campaigns and triggers saved earlier keep the provider they name.** Changing the default does not move them.
* The server never falls back to the default by itself: every campaign and trigger action names its provider.

## Change or remove it later

* Make another integration the default the same way.
* A disabled integration cannot be the default; if the default is disabled, set another one.

## Do it from code

```ts
await norbix.hub.notifications.setEmailsIntegrationAsDefault({ id: 'int_7bl0e6pSQmGzNFLp2P6rcd' });
// getEmailIntegrations → defaultIntegrationId 'int_7bl0e6pSQmGzNFLp2P6rcd'
```

```sh
norbix hub notifications emails integration as default set --id int_6TG84uqtIL4HghyUx0EONk
```

API: [Set As Default](/codemash/api-reference/notifications/email/set-emails-integration-as-default.md)
