---
title: Write data to InfluxDB
description: Collect and write time series data to InfluxDB Cloud Serverless and InfluxDB OSS.
url: https://docs.influxdata.com/influxdb3/cloud-serverless/write-data/
estimated_tokens: 875
product: InfluxDB Cloud Serverless
version: cloud-serverless
---

# Write data to InfluxDB

Write data to InfluxDB Cloud Serverless using the following tools and methods:

#### Choose the write endpoint for your workload

When bringing existing v1 write workloads, use the InfluxDB Cloud Serverless HTTP API [`/write` endpoint](/influxdb3/cloud-serverless/guides/api-compatibility/v1/). When creating new write workloads, use the HTTP API [`/api/v2/write` endpoint](/influxdb3/cloud-serverless/guides/api-compatibility/v2/).

### [Use Telegraf to write data](/influxdb3/cloud-serverless/write-data/use-telegraf/)

Use Telegraf to collect and write data to InfluxDB. Create Telegraf configurations in the InfluxDB UI or manually configure Telegraf.

### [Write CSV data to InfluxDB](/influxdb3/cloud-serverless/write-data/csv/)

Use the `influx CLI`, InfluxDB user interface, or Telegraf to write CSV data to InfluxDB.

### [Write line protocol data to InfluxDB Cloud Serverless](/influxdb3/cloud-serverless/write-data/line-protocol/)

Use Telegraf and API clients to write line protocol data to InfluxDB Cloud Serverless.

### [Best practices for writing data](/influxdb3/cloud-serverless/write-data/best-practices/)

Learn about the recommendations and best practices for writing data to InfluxDB.

### [Troubleshoot issues writing data](/influxdb3/cloud-serverless/write-data/troubleshoot/)

Troubleshoot issues writing data. Find response codes for failed writes. Discover how writes fail, from exceeding rate or payload limits, to syntax errors and schema conflicts.

### [Delete data](/influxdb3/cloud-serverless/write-data/delete-data/)

Use measurements, tags, and timestamp columns to avoid querying unwanted data.

### [Use the v1 write API](/influxdb3/cloud-serverless/write-data/api/v1-http/)

Use the InfluxDB v1 HTTP write API to write data stored in InfluxDB Cloud Serverless.

```sh
curl "https://cloud2.influxdata.com/write?db=DATABASE_NAME&rp=RETENTION_POLICY&precision=s" \
  --header "Authorization: Token API_TOKEN" \
  --header "Content-type: text/plain; charset=utf-8" \
  --data-binary 'home,room=kitchen temp=72 1463683075'
```

#### Related

-   [Line protocol](/influxdb3/cloud-serverless/reference/syntax/line-protocol/)
-   [influx write](/influxdb3/cloud-serverless/reference/cli/influx/write/)
