> 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/database/collections/update-one-record.md).

# Update One Record

Update One Record.

**Collections** hold your records. Norbix generates a full CRUD + query API over each collection from its schema, with record-level ownership and triggers. This method updates the one record — only the fields you send are changed.

This method is on the **Hub** surface (`norbix.hub.database`) — 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.database.updateOneRecord({
  collectionName: 'orders',
  id: 'rec_4kX9mQvR2tYw7ZbC1dFgHj',
  update: '{"$set":{"status":"shipped"}}',
  databaseIntegrationId: 'int_4kX9mQvR2tYw7ZbC1dFgHj',
});
```

{% endtab %}

{% tab title=".NET" %}

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

using var client = new NorbixClient();

var result = await client.Database.UpdateOneRecordAsync(new UpdateOneRecord
{
    CollectionName = "orders",
    Id = "rec_4kX9mQvR2tYw7ZbC1dFgHj",
    Update = "{\"$set\":{\"status\":\"shipped\"}}",
    DatabaseIntegrationId = "int_4kX9mQvR2tYw7ZbC1dFgHj",
});
```

{% endtab %}

{% tab title="Python" %}

```python
from norbix_python import NorbixHub

norbix = NorbixHub()

result = norbix.database.update_one_record(
    collectionName="orders",
    id="rec_4kX9mQvR2tYw7ZbC1dFgHj",
    update="{\"$set\":{\"status\":\"shipped\"}}",
    databaseIntegrationId="int_4kX9mQvR2tYw7ZbC1dFgHj",
)
```

{% endtab %}

{% tab title="Go" %}

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

var result map[string]any
err := c.Hub.Database.UpdateOneRecord(ctx, "orders", "rec_4kX9mQvR2tYw7ZbC1dFgHj", map[string]any{
	"update": "{\"$set\":{\"status\":\"shipped\"}}",
	"databaseIntegrationId": "int_4kX9mQvR2tYw7ZbC1dFgHj",
}, &result)
```

{% endtab %}

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

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

final hub = NorbixHub();

final result = await hub.database.updateOneRecord(collectionName: 'orders', id: 'rec_4kX9mQvR2tYw7ZbC1dFgHj', body: {
  'update': '{"$set":{"status":"shipped"}}',
  'databaseIntegrationId': 'int_4kX9mQvR2tYw7ZbC1dFgHj',
});
```

{% endtab %}

{% tab title="Swift" %}

```swift
import NorbixHub

let client = try NorbixHubClient()

let result = try await client.database.updateOneRecord([
    "collectionName": "orders",
    "id": "rec_4kX9mQvR2tYw7ZbC1dFgHj",
    "update": "{\"$set\":{\"status\":\"shipped\"}}",
    "databaseIntegrationId": "int_4kX9mQvR2tYw7ZbC1dFgHj",
])
```

{% endtab %}

{% tab title="Kotlin" %}

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

val hub = NorbixHub()

val result = hub.database.updateOneRecord(mapOf(
    "collectionName" to "orders",
    "id" to "rec_4kX9mQvR2tYw7ZbC1dFgHj",
    "update" to "{\"$set\":{\"status\":\"shipped\"}}",
    "databaseIntegrationId" to "int_4kX9mQvR2tYw7ZbC1dFgHj",
))
```

{% endtab %}

{% tab title="CLI" %}

```sh
norbix hub db one record update rec_4kX9mQvR2tYw7ZbC1dFgHj --collectionName orders --update '{"$set":{"status":"shipped"}}' --databaseIntegrationId int_4kX9mQvR2tYw7ZbC1dFgHj
```

{% endtab %}
{% endtabs %}

## In Cloud

Manage this visually in Cloud — see [Database → Collections](/codemash/cloud/database/collections.md).

## API reference

Full request and response for this endpoint: [Update One Record](/codemash/api-reference/database/collections/update-one-record.md).
