Documentation

API Quick Start

InfluxDB offers a rich API and client libraries ready to integrate with your application. Use popular tools like Curl and Postman for rapidly testing API requests.

This section guides you through the most commonly used API methods.

For detailed documentation on the entire API, see the InfluxDB v2 API Reference.

Use InfluxDB 1.x API clients with Cloud

If you need to use InfluxDB Cloud with InfluxDB 1.x API clients and integrations, see the 1.x compatibility guide.

Bootstrap your application

With most API requests, you’ll need to provide a minimum of your InfluxDB URL and Authorization Token (API Token).

Install InfluxDB OSS v2.x or upgrade to an InfluxDB Cloud account.

Authentication

InfluxDB uses API tokens to authorize API requests. InfluxDB filters API requests and response data based on the permissions associated with the token.

  1. Before exploring the API, use the influx CLI or the InfluxDB UI to create an initial API token for your application.

  2. Include your API token in an Authorization: Token API_TOKEN HTTP header with each request–for example:

# Use a token to authorize a GET request to the InfluxDB API.
# List buckets in your organization that the token can read.
curl -X GET "http://cloud2.influxdata.com/api/v2/buckets" \
  --header 'Accept: application/json' \
  --header 'Authorization: Token 
API_TOKEN
'
/**
  * Use a token to authorize a GET request to the InfluxDB API.
  * List buckets in your organization that the token can read.
  */

const https = require('https');

function listBuckets() {

  const options = {
    host: 'cloud2.influxdata.com',
    path: "/api/v2/buckets",
    headers: {
      'Authorization': 'Token 
API_TOKEN
'
,
'Content-type': 'application/json' }, }; const request = https.get(options, (response) => { let rawData = ''; response.on('data', () => { response.on('data', (chunk) => { rawData += chunk; }); }) response.on('end', () => { console.log(rawData); }) }); request.end(); }

Postman is another popular tool for exploring APIs. See how to send authenticated requests with Postman.

Buckets API

Before writing data you’ll need to create a bucket in your InfluxDB instance. To use the API to create a bucket, send a request to the following endpoint:

POST /api/v2/buckets
curl --request POST \
  "http://localhost:8086/api/v2/buckets" \
  --header "Authorization: Token 
API_TOKEN
"
\
--json '{ "orgID": "'"
ORG_ID
"
'",
"name": "
BUCKET_NAME
",
"retentionRules": [ { "type": "expire", "everySeconds":
RETENTION_PERIOD_SECONDS
,
"shardGroupDurationSeconds": 0 } ] }'

Replace the following placeholders with your values:

  • API_TOKEN - your token.
  • ORG_ID - the ID of the organization that owns the bucket.
  • BUCKET_NAME - the name of the bucket to create.
  • Optional: RETENTION_PERIOD_SECONDS - the retention period (in number of seconds) to retain data in the bucket. Default is 0 (infinite retention).
    • For example, 31536000 (1 year) or 604800 (7 days).

For more information, see Create a bucket.

Write API

Write data to InfluxDB using an HTTP request to the InfluxDB API /api/v2/write endpoint.

Query API

Query from InfluxDB using an HTTP request to the /api/v2/query endpoint.


Was this page helpful?

Thank you for your feedback!


InfluxDB OSS 2.9.0: API tokens are hashed by default

Stronger token security in InfluxDB OSS 2.9.0 — tokens are hashed on disk by default. Existing tokens are hashed on first startup and can’t be recovered afterward. Capture any plaintext tokens you still need before you upgrade.

View InfluxDB OSS 2.9.0 release notes

Hashed tokens authenticate exactly like unhashed tokens — clients and integrations keep working.

Also new in 2.9.0:

  • Configurable backup compression
  • Restore support for backups containing hashed tokens
  • Tighter Edge Data Replication queue validation
  • Flux upgrade
  • Compaction reliability improvements

Key enhancements in Explorer 1.9

Explorer 1.9 is now available with InfluxQL support, an AI-assisted Flux to SQL converter (beta), and new live sample data simulators.

View Explorer 1.9 release notes

Explorer 1.9 includes new features and improvements that make it easier to query, visualize, and manage data.

Highlights:

  • Flux to SQL converter (beta): Convert Flux queries to SQL with an AI-assisted converter.
  • InfluxQL support: Query data with InfluxQL in the Data Explorer and dashboards, and save and load InfluxQL queries.
  • InfluxQL visualizations: Render line and bar charts from InfluxQL results with per-tag series grouping.
  • Query error history: Review a history of query errors in the query tool.
  • Live sample data simulators: Generate continuous live sample data with new bird data and signal generator simulators.

For more details, see Explorer 1.9 release notes

InfluxDB 3.10 is now available

InfluxDB 3 Core 3.10 adds an automatic catalog format upgrade, a configurable query-concurrency limit, and processing engine improvements.

Key updates in InfluxDB 3 Core 3.10:

  • Catalog format upgrade: the on-disk catalog automatically upgrades from format v2 to v3 on first 3.10 startup. Migration is one-way—back up your catalog before upgrading.
  • --max-concurrent-queries: limit concurrent queries (adjustable at runtime).
  • GET /ready endpoint for readiness probes.
  • Processing engine: cross-database queries and trigger lockdown flags.

For more information, see the InfluxDB 3 Core release notes.

InfluxDB 3.10 is now available

InfluxDB 3 Enterprise 3.10 adds automated backup and restore, row-level deletions, and user management, with an automatic catalog format upgrade and performance preview improvements.

Key updates in InfluxDB 3 Enterprise 3.10:

  • Catalog format upgrade: the on-disk catalog automatically upgrades from format v2 to v3 on first 3.10 startup. Migration is one-way—back up your catalog before upgrading.
  • Automated backup and restore (beta)
  • Row-level deletions
  • User management (authentication and RBAC) — preview
  • Performance preview improvements

Backup and restore, row-level deletions, and the performance preview require the Enterprise storage engine upgrade (opt-in beta). Beta and preview features are subject to breaking changes and aren’t recommended for production use.

For more information, see the InfluxDB 3 Enterprise release notes

Telegraf Enterprise is now generally available

Telegraf Enterprise is now generally available, along with Telegraf Controller v1.0.

Telegraf Enterprise combines Telegraf Controller, a centralized management console for Telegraf, with official support from InfluxData. Manage configurations, monitor fleet health, and operate tens of thousands of Telegraf agents from a single system.

InfluxDB Docker latest tag changing to InfluxDB 3 Core

On September 15, 2026, the latest tag for InfluxDB Docker images will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments.

If using Docker to install and run InfluxDB, the latest tag will point to InfluxDB 3 Core. To avoid unexpected upgrades, use specific version tags in your Docker deployments. For example, if using Docker to run InfluxDB v2, replace the latest version tag with a specific version tag in your Docker pull command–for example:

docker pull influxdb:2

InfluxDB Cloud powered by TSM