> 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/push/integrations/set-default.md).

# Set an integration as default

Make a push integration the default that Cloud picks for you on campaigns, trigger actions and tests.

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

## Before you start

* The integration is saved and **enabled**: **Set as default** is greyed out on a disabled integration and on the one that is already the default.
* The default is per environment and is only a pre-selection: campaigns and trigger actions name their own integration.

## Steps

1. Open the integration, here `Acme iOS app (APNs)`, 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-dab5e068b21f6c1ff24f650077f375c5812aa13d%2Fset-default-1.png?alt=media" alt="The Actions menu of the APNs integration: Set as default, Disable, See AppleApns documentation, See SDK documentation, See API documentation, Delete"><figcaption><p>The Actions menu.</p></figcaption></figure>
2. Press **Set as default**.

## Result

The integration page shows the **DEFAULT** badge, and in the list the **DEFAULT** badge moves to its row. New campaigns, trigger actions and template tests now pick it for you. Campaigns created earlier keep the integration they were created with.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-056a63e1614e183175c6f9351311af0afc2d168a%2Fset-default-2.png?alt=media" alt="Editing Apple APNs integration with the badges DEFAULT, ENABLED, NOT TESTED, NOT CONFIRMED"><figcaption><p>The APNs integration is the default now.</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-575d738933dae3881491fb35e48bd18bcbb9a8e2%2Fset-default-3.png?alt=media" alt="Push Service Integrations list: Acme iOS app (APNs) carries the DEFAULT badge, Test Me none"><figcaption><p>The list with the new default.</p></figcaption></figure>

## Change or remove it later

* Set another integration as default the same way — here the Fake was made the default again right after.
* The default cannot be disabled or deleted while other integrations exist in the environment — set another one as default first.

## Do it from code

```ts
await norbix.hub.notifications.setPushIntegrationAsDefault({ id: 'int_iuH9gfpLnR1VPxGgDePOd' }); // Acme iOS app (APNs)
const { defaultIntegrationId } = await norbix.hub.notifications.getPushIntegrations();
console.log(defaultIntegrationId); // int_iuH9gfpLnR1VPxGgDePOd
```

```sh
norbix hub notifications push integration default set --id int_5w5gi8BSgF9H7E76Ud6K7F
```

The client setup is on the [Push page](/codemash/cloud/push.md#use-it-from-code). API: [Set Push Integration As Default](/codemash/api-reference/notifications/push/set-push-integration-as-default.md)
