Write data

Write data to InfluxDB 3 Cloud using line protocol format.
POST /api/v3/write_lp

Write line protocol

Writes line protocol to the specified database.

This is the native InfluxDB 3 Cloud write endpoint that provides enhanced control over write behavior with advanced parameters for high-performance and fault-tolerant operations.

Use this endpoint to send data in line protocol format to InfluxDB. Use query parameters to specify options for writing data.

Features

  • Partial writes: Use accept_partial=true to allow partial success when some lines in a batch fail
  • Asynchronous writes: Use no_sync=true to skip waiting for WAL synchronization, allowing faster response times but sacrificing durability guarantees
  • Flexible precision: Automatic timestamp precision detection with precision=auto (default)

Column families

InfluxDB 3 Cloud stores data using PachaTree. Assign fields to column families using the :: delimiter in field names. The portion before :: is the family name; everything after is the field name.

metrics,host=sA cpu::usage_user=55.2,cpu::usage_sys=12.1,mem::free=2048i 1000000000

Fields in the same family are stored together on disk. For wide tables, this reduces I/O by letting queries read only the families they need. Fields written without :: are assigned to auto-generated families.

Auto precision detection

When you use precision=auto or omit the precision parameter, InfluxDB 3 automatically detects the timestamp precision based on the magnitude of the timestamp value:

  • Timestamps < 5e9 → Second precision (multiplied by 1,000,000,000 to convert to nanoseconds)
  • Timestamps < 5e12 → Millisecond precision (multiplied by 1,000,000)
  • Timestamps < 5e15 → Microsecond precision (multiplied by 1,000)
  • Larger timestamps → Nanosecond precision (no conversion needed)

Parameters

Query parameters
db required string
precision string
accept_partial boolean
no_sync boolean

Request body

Content-Type: application/json
Example request Ask AI about this
curl --request POST \
  "https://cluster-host.a.influxdb.io/api/v3/write_lp?db=DB" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: text/plain" \
  --data-raw 'measurement,tag=value field=1 1234567890'

Responses

204 Success (“No Content”). All data in the batch is written and queryable.
400 Bad request.
401 Unauthorized access.
data object
error string
403 Access denied.
413 Request entity too large.
422 Unprocessable entity.

Was this page helpful?

Thank you for your feedback!