---
title: "Adding Data to VxData"
image: "https://docs.virdx.dev/img/virdx-social-card.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.virdx.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Adding Data to VxData

## Creating New Resources

:::info

Read [the full guide](/documentation/vxdata-api/guides/integrating-datasets) on the mental models behind adding data before starting to add large amounts of data.

:::

The VxData SDK exposes `ResourceCreate` requests that allow you to create new resources in the database.

```py
from vxdata.schemas.create import MeasurementCreate

client.resources.create(MeasurementCreate(
identifier="psa/BB12345/2025-01-01",
license="VIRDX-PSEUDONYMIZED",
value=1.23,
unit="ng/ml"
))
```

This operation will fail if a resource with the same identifier already exists. 
Read below for a guide on updating existing resources.

## Updating Existing Resources

```py
from vxdata.schemas.update import MeasurementUpdate

client.resources.update(
"psa/BB12345/2025-01-01",
MeasurementUpdate(
    value=100.0,
))
```

Source: https://docs.virdx.dev/documentation/vxdata-api/guides/writing/index.mdx
