Skip to main content
POST
Minimum required API key scope: Read/Write
To access Query endpoints, an Analyst plan or higher is required.

Headers

X-Dune-Api-Key
string
required

API Key for the service

Query Parameters

api_key
string

API Key, alternative to using the HTTP header X-Dune-Api-Key

Body

*/*

CreateQueryRequest

name
string
required

The name of the created query.

query_sql
string
required

The SQL of the query.

description
string

The description of the created query.

is_private
boolean

Indicates if the query is private, meaning that only the team or, in case of personal queries, the user that created it can see it.

Example:

true

is_temp
boolean

Indicates if the query is temporary (unsaved). Temporary queries can be executed but won't appear in the library.

Example:

false

parameters
object[]

The parameters that the SQL query accepts.

tags
string[]

The tags of the query.

Response

OK

query_id
integer

The Unique ID of the created query

Example:

1