---
title: "Create or update samples"
method: POST
path: "/samples/upsert/bulk"
tags: ["samples"]
---

# Create or update samples

`POST /samples/upsert/bulk`

Create or update multiple samples.

## Request body

- object[]
  - `messageBody` string — Optional message about the sample value. Informational only--not used to determine the status of the sample. It's up to the lens whether/how to display this, will typically be displayed only on hover or click.
  - `messageCode` string — Optional 5-charater code about the sample value. Informational only--not used to determine the status of the sample. It's up to the lens whether/how to display this, will typically be displayed without having to hover or click.
  - `name` string, required — TODO
  - `value` string — Stored as a string but will be treated as whatever the aspect’s valueType was specified as, i.e. [BOOLEAN|NUMERIC|PERCENT]. If timeout occurs, value is set to null.
  - `owner` string — The name of the user to assign as the owner. Defaults to the user that created it

## Response `200`

Success, returns OK

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `404` — Resource Not Found
- `default` — Error

---

[API](https://skmtc.net/salesforce/apis/refocus-api.md) · [All operations](https://skmtc.net/salesforce/apis/refocus-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/salesforce/refocus-api/versions/42c2153b047e/schema)
