PATCH
/
v1
/
query
/
{queryId}
curl --request PATCH \
  --url https://api.dune.com/api/v1/query/{queryId} \
  --header 'Content-Type: application/json' \
  --header 'X-DUNE-API-KEY: <x-dune-api-key>' \
  --data '{
  "query_id": 1252207,
  "query_sql": "SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}",
}'
{
  "query_id": 123
}

To access Query endpoints, a Plus plan or higher is required.

curl --request PATCH \
  --url https://api.dune.com/api/v1/query/{queryId} \
  --header 'Content-Type: application/json' \
  --header 'X-DUNE-API-KEY: <x-dune-api-key>' \
  --data '{
  "query_id": 1252207,
  "query_sql": "SELECT * FROM {{blockchain}}.transactions WHERE to = {{address}} AND block_number > {{blocknumber}}",
}'

Headers

X-Dune-Api-Key
string
required

API Key for the service

Path Parameters

queryId
integer
required

Query ID

Query Parameters

api_key
string

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

Response

200
application/json
OK
query_id
integer

The unique ID of the query that was updated