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

# Associate Data with Sample

> Attach data entries to a physical sample

Associates one or more data entries with a physical sample. To detach the data entries from their current sample, pass `null` for `physical_sample_id`.

**data\_ids** `array` *required*

UUIDs of the data entries to associate

**physical\_sample\_id** `string` *required*

UUID of the physical sample to associate with the data entries. Pass `null` to detach the data entries from their current sample.

## Response

Returns an empty response on success.

```bash cURL theme={null}
curl -X POST "https://api.atomscale.ai/data_entries/physical_sample" \
  -H "X-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "data_ids": ["d290f1ee-6c54-4b01-90e6-d701748f0851"],
    "physical_sample_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab"
  }'
```

```python Python theme={null}
import requests

response = requests.post(
    "https://api.atomscale.ai/data_entries/physical_sample",
    headers={
        "X-API-KEY": "YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    json={
        "data_ids": ["d290f1ee-6c54-4b01-90e6-d701748f0851"],
        "physical_sample_id": "a1b2c3d4-5678-90ab-cdef-1234567890ab"
    }
)
```

```json 200 theme={null}
null
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.