> ## 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.

# Update Project Samples

> Update the physical samples associated with a project

Updates the association between physical samples and a project.

<ParamField path="project_id" type="string" required>
  The UUID of the project
</ParamField>

<ParamField body="physical_sample_ids" type="array" required>
  Array of physical sample UUIDs to associate with the project
</ParamField>

<ParamField body="set" type="boolean" default="false">
  If `true`, replaces all existing sample associations with the provided list. If `false`, adds the provided samples to the existing associations.
</ParamField>

## Response

Returns an array of the physical sample UUIDs now associated with the project.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.atomscale.ai/projects/d290f1ee-6c54-4b01-90e6-d701748f0851/physical_samples" \
    -H "X-API-KEY: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "physical_sample_ids": [
        "a1b2c3d4-5678-90ab-cdef-1234567890ab",
        "b2c3d4e5-6789-01bc-defg-2345678901bc"
      ],
      "set": false
    }'
  ```

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

  response = requests.post(
      "https://api.atomscale.ai/projects/d290f1ee-6c54-4b01-90e6-d701748f0851/physical_samples",
      headers={
          "X-API-KEY": "YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json={
          "physical_sample_ids": [
              "a1b2c3d4-5678-90ab-cdef-1234567890ab",
              "b2c3d4e5-6789-01bc-defg-2345678901bc"
          ],
          "set": False
      }
  )
  result = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    "a1b2c3d4-5678-90ab-cdef-1234567890ab",
    "b2c3d4e5-6789-01bc-defg-2345678901bc"
  ]
  ```
</ResponseExample>
