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

# Set an integration as default

Make a files integration the default of its environment.

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

The **default** integration is the storage that file calls use when they name no integration, the one the Browser and [Collection Exports](/codemash/cloud/files/collection-exports.md) open first, and the one the folder list of a [trigger](/codemash/cloud/files/triggers/new.md) shows. There is one default per environment.

## Before you start

* The integration is saved and **enabled**. **Set as default** is off for a disabled integration and for the one that already is the default.
* Moving the default does not move files: files stay in the storage they were written to.

## Steps

1. Open **Files → Integrations** and click the integration, for example `Archive`.
2. Open **Actions** (top right) and choose **Set as default**.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-53e349a48bd843a8b04917e379bbfbfff1edb1bd%2Fset-default-1.png?alt=media" alt="Editing Local integration Archive, badges ENABLED and NOT TESTED, with the Actions menu open: Set as default, Disable, See Local documentation, See SDK documentation, See API documentation, Delete"><figcaption><p>Actions → Set as default.</p></figcaption></figure>

## Result

The integration gets the **DEFAULT** badge in the list, and the earlier default loses it.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-4f53cb8eb23efa3fc8bd86735b02608f755cc4f0%2Fset-default-2.png?alt=media" alt="Files Integrations list: Archive with the DEFAULT badge, Product images without it"><figcaption><p>Archive is now the default.</p></figcaption></figure>

## Change or remove it later

* Set another integration as default the same way — in the example, **Product images** was set back as the default.
* A default integration can be disabled or deleted — see [Disable or delete an integration](/codemash/cloud/files/integrations/disable.md).

## Do it from code

```ts
await norbix.hub.files.setFilesIntegrationAsDefault({ id: 'int_45rkbZX4ecZBkiv6gXe5Da' });
const { defaultIntegrationId } = await norbix.hub.files.getFilesIntegrations(); // int_45rkbZX4ecZBkiv6gXe5Da
```

```sh
norbix hub files integration as default set --id int_45rkbZX4ecZBkiv6gXe5Da
```

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