> 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/sdks/files/item/make-file-private.md).

# Make File Private

make File Private.

The Files module provides cloud storage and file management — upload, download, access control, metadata, and CDN-backed delivery. Files can be referenced from Database records and follow the same identity and permission rules as the rest of the project. Handles the file private.

This method is on the **Hub** surface (`norbix.hub.files`) — call it from admin tooling or IaC.

{% hint style="info" %}
These examples assume the SDK is installed and your credentials are set as environment variables — each client reads them automatically, so the constructors below take no arguments. See [Install a Norbix SDK](/codemash/sdks/install.md).
{% endhint %}

{% tabs %}
{% tab title="JavaScript / TypeScript" %}

```ts
import { Norbix } from '@norbix.ai/ts';
const norbix = new Norbix();

const result = await norbix.hub.files.makeFilePrivate({
  filesIntegrationId: 'filesintegration_4kX9mQvR2tYw7ZbC1dFgHj',
  path: 'invoices/2026/invoice.pdf',
});
```

{% endtab %}

{% tab title=".NET" %}

```csharp
using Norbix.Sdk;
using Norbix.Sdk.Types.Hub;

using var client = new NorbixClient();

var result = await client.Files.MakeFilePrivateAsync(new MakeFilePrivateRequest
{
    FilesIntegrationId = "filesintegration_4kX9mQvR2tYw7ZbC1dFgHj",
    Path = "invoices/2026/invoice.pdf",
});
```

{% endtab %}

{% tab title="Python" %}

```python
from norbix_python import NorbixHub

norbix = NorbixHub()

result = norbix.files.make_file_private(
    filesIntegrationId="filesintegration_4kX9mQvR2tYw7ZbC1dFgHj",
    path="invoices/2026/invoice.pdf",
)
```

{% endtab %}

{% tab title="Go" %}

```go
c, _ := norbix.New(norbix.Options{})
ctx := context.Background()

var result map[string]any
err := c.Hub.Files.MakeFilePrivate(ctx, map[string]any{
	"filesIntegrationId": "filesintegration_4kX9mQvR2tYw7ZbC1dFgHj",
	"path": "invoices/2026/invoice.pdf",
}, &result)
```

{% endtab %}

{% tab title="Dart / Flutter" %}

```dart
import 'package:norbix/norbix_hub.dart';

final hub = NorbixHub();

final result = await hub.files.makeFilePrivate(body: {
  'filesIntegrationId': 'filesintegration_4kX9mQvR2tYw7ZbC1dFgHj',
  'path': 'invoices/2026/invoice.pdf',
});
```

{% endtab %}

{% tab title="Swift" %}

```swift
import NorbixHub

let client = try NorbixHubClient()

let result = try await client.files.makeFilePrivate([
    "filesIntegrationId": "filesintegration_4kX9mQvR2tYw7ZbC1dFgHj",
    "path": "invoices/2026/invoice.pdf",
])
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
import ai.norbix.sdk.hub.NorbixHub

val hub = NorbixHub()

val result = hub.files.makeFilePrivate(mapOf(
    "filesIntegrationId" to "filesintegration_4kX9mQvR2tYw7ZbC1dFgHj",
    "path" to "invoices/2026/invoice.pdf",
))
```

{% endtab %}

{% tab title="CLI" %}

```sh
norbix hub fs file private make --filesIntegrationId filesintegration_4kX9mQvR2tYw7ZbC1dFgHj --path invoices/2026/invoice.pdf
```

{% endtab %}
{% endtabs %}

## In Cloud

Manage this visually in Cloud — see [Files → Item](/codemash/cloud/files.md).

## API reference

Full request and response for this endpoint: [Make File Private](/codemash/api-reference/files/item/make-file-private.md).
