Skip to main content

Endpoint Migration Guide

The table endpoints have been migrated from /v1/table/* to /v1/uploads/* for better discoverability and consistency. The old endpoints are deprecated but remain functional for backward compatibility.
Deprecated endpoints will be removed in a future version. Please migrate to the new endpoints as soon as possible.

Endpoint Mapping

Old Endpoint (Deprecated)New Endpoint
POST /v1/table/createPOST /v1/uploads
POST /v1/table/:namespace/:table_name/insertPOST /v1/uploads/:namespace/:table_name/insert
POST /v1/table/upload/csvPOST /v1/uploads/csv
POST /v1/table/:namespace/:table_name/clearPOST /v1/uploads/:namespace/:table_name/clear
DELETE /v1/table/:namespace/:table_nameDELETE /v1/uploads/:namespace/:table_name
GET /v1/tablesGET /v1/uploads

What Changed?

URL Structure

All table management endpoints now use the /v1/uploads base path instead of /v1/table or /v1/tables. This change makes it clearer that these endpoints are specifically for managing uploaded tables.

Migration Examples

Create Table

Before:
curl -X POST "https://api.dune.com/api/v1/table/create" \
  -H "X-DUNE-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "namespace": "my_user",
    "table_name": "interest_rates",
    "schema": [
      {"name": "date", "type": "timestamp"},
      {"name": "rate", "type": "double"}
    ]
  }'
After:
curl -X POST "https://api.dune.com/api/v1/uploads" \
  -H "X-DUNE-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "namespace": "my_user",
    "table_name": "interest_rates",
    "schema": [
      {"name": "date", "type": "timestamp"},
      {"name": "rate", "type": "double"}
    ]
  }'

Insert Data

Before:
curl -X POST "https://api.dune.com/api/v1/table/my_user/interest_rates/insert" \
  -H "X-DUNE-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: text/csv" \
  --upload-file data.csv
After:
curl -X POST "https://api.dune.com/api/v1/uploads/my_user/interest_rates/insert" \
  -H "X-DUNE-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: text/csv" \
  --upload-file data.csv

Upload CSV

Before:
curl -X POST "https://api.dune.com/api/v1/table/upload/csv" \
  -H "X-DUNE-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "table_name": "my_table",
    "data": "col1,col2\nval1,val2",
    "is_private": false
  }'
After:
curl -X POST "https://api.dune.com/api/v1/uploads/csv" \
  -H "X-DUNE-API-KEY: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "table_name": "my_table",
    "data": "col1,col2\nval1,val2",
    "is_private": false
  }'

Clear Table

Before:
curl -X POST "https://api.dune.com/api/v1/table/my_user/interest_rates/clear" \
  -H "X-DUNE-API-KEY: YOUR_API_KEY"
After:
curl -X POST "https://api.dune.com/api/v1/uploads/my_user/interest_rates/clear" \
  -H "X-DUNE-API-KEY: YOUR_API_KEY"

Delete Table

Before:
curl -X DELETE "https://api.dune.com/api/v1/table/my_user/interest_rates" \
  -H "X-DUNE-API-KEY: YOUR_API_KEY"
After:
curl -X DELETE "https://api.dune.com/api/v1/uploads/my_user/interest_rates" \
  -H "X-DUNE-API-KEY: YOUR_API_KEY"

List Tables

Before:
curl -X GET "https://api.dune.com/api/v1/tables?limit=10&offset=0" \
  -H "X-DUNE-API-KEY: YOUR_API_KEY"
After:
curl -X GET "https://api.dune.com/api/v1/uploads?limit=10&offset=0" \
  -H "X-DUNE-API-KEY: YOUR_API_KEY"

SDK Support

Python SDK

The Dune Python SDK will be updated to support the new endpoints. Check the Python SDK documentation for the latest version and migration guidance.

TypeScript SDK

The Dune TypeScript SDK will be updated to support the new endpoints. Check the TypeScript SDK documentation for the latest version and migration guidance.

Backward Compatibility

All deprecated endpoints continue to function and will remain available for a transition period. However, we strongly recommend migrating to the new endpoints to ensure compatibility with future versions of the API.

Timeline

  • Backend Migration: ✅ Complete
  • Documentation Migration: ✅ Complete
  • Deprecation Period: 3 months (until March 1, 2026)
  • Old Endpoint Removal: March 1, 2026

Need Help?

If you encounter any issues during migration, please: