---
title: "Upsert Data Points"
method: PUT
path: "/metrics/{metric_id}/data_points"
tags: ["Data Points"]
---

# Upsert Data Points

`PUT /metrics/{metric_id}/data_points`

Create or update multiple data points for a metric (limited to up to 50 data points per request).

If you don't know the metric's ID you can get it from the metric's URL in the app:
`https://app.visible.vc/companies/{company_id}/data/metrics/{metric_id}`.

## Path parameters

- `metric_id` string, uuid, required

## Request body

- object
  - `data_points` DataPointInput[]
    - `date` string, date, required — Date for this data point (ISO 8601 format)
    - `value` string, required — Value of the metric for this date

## Response `200`

Data points successfully upserted

- object
  - `data_points` DataPoint[]
    - `id` string, uuid, required — Unique identifier for the data point
    - `date` string, date, required — Date for this data point (ISO 8601 format)
    - `value` string, required — Value of the metric for this date (stored as string for precision)
    - `metric_id` string, uuid, required — ID of the associated metric
    - `source` DataPointSource — **Experimental.** Provenance information for a data point, derived from the latest version in the changelog. Only included when `include_source=true` is requested.
      - `source_type` 'ai_inbox' | 'update_request' | 'user_provided' | 'unknown', required — Origin of the data point value
      - `label` string, required — Human-readable description of the source
      - `visible_url` string, uri, nullable, required — Deep link to the source in Visible, when available

## Other responses

- `400` — Bad Request - The request is invalid or malformed
- `401` — Unauthorized - Invalid or missing authentication token
- `404` — Not Found - The requested resource was not found
- `422` — Unprocessable Entity - The request is valid but contains semantic errors
- `429` — Too Many Requests - Rate limit exceeded

---

[API](https://skmtc.dev/visible/apis/visible-api-2.md) · [All operations](https://skmtc.dev/visible/apis/visible-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/visible/visible-api-2/revisions/d63a3bb6d361/schema)
