---
title: Write Time Series Data
slug: api/write-time-series-data
docTags: qTu4g35szZVJsjCIROvmT,fu_CgXzjBnePyWRJ1hjWo
createdAt: 2025-09-18T16:29:26.976Z
---

# Writing Points to a Measurement

:::hint{type="warning"}
If you're writing data points through the Historian API, it's important to understand how InfluxDB stores time series data. We recommend reviewing the [Data model](docId\:b6BfdKcZA5V8hIdjzxQ1h), especially the section on choosing between tags and fields. Misusing tags—for example, storing high-cardinality or numeric values—can have serious performance implications.
:::

This code writes data points to a measurement ([my Swagger](https://historian.mycompany.com:18000/api/swagger/#/collectors/createPoints)).
It requires a CollectorUUID and MeasurementUUID to be filled in. The collector UUID can be retrieved by [listing the collectors](docId\:pC5_4LdexBIrYsHMxCDPh). The measurement UUID can be retrieved from where it was created: [Manage Measurements](docId\:oCUYPOPzCoUIhWWzC_VJ7).

<font color="#6366F1">**POST** </font>[https://historian.mycompany.com:18000/api/collector/collectors/\\\\\\\{collector\\\\\\\_uuid}/points](https://historian.mycompany.com:18000/api/collector/collectors/\{collector_uuid}/points) (replace `{collector_uuid}` with your collector UUID)

```python
def write_points(collector_uuid: str, points):
    url = f"{BASE_URL}/collector/collectors/{collector_uuid}/points"
    resp = session.post(url, json=points, timeout=60)
    resp.raise_for_status()
    return resp.json()

points = [{
        "MeasurementUUID": "my-measurement-uuid",
        "Timestamp": "2025-09-19T12:41:33.854Z",
        "Value": "string"  # First point
    },
    {
        "ErrorStatus": "This is a bad status!",
        "MeasurementUUID": "my-measurement-uuid",
        "Tags": {},
        "Timestamp": "2025-09-19T12:42:30.854Z",
        "Value": "bad string"  # Second point
}]

write_result = write_points("my-collector-uuid", points)
print(json.dumps(write_result, indent=2))
```

:::ExpandableHeading
### Successful response

```json
{
}
```
:::
