POST /kv/rest/v1/lists REST API Endpoint
Body Parameters
key
string
REQUIRED
Loading...
items
array
REQUIRED
Loading...
Returns
200
Loading...
Request
curl -X POST \ "https://api.quicknode.com/kv/rest/v1/lists" \ -H "accept: application/json" \ -H "Content-Type: application/json" \ -H "x-api-key: YOUR_API_KEY" \ -d $'{ "key": "my-list", "items": ["item1"] }'
var myHeaders = new Headers(); myHeaders.append('accept', 'application/json'); myHeaders.append('Content-Type', 'application/json'); myHeaders.append('x-api-key', 'YOUR_API_KEY'); // Replace with your actual API key var requestOptions = { method: 'POST', headers: myHeaders, redirect: 'follow', body: JSON.stringify({ key: 'my-key', items: ['item1'] }) }; fetch('https://api.quicknode.com/kv/rest/v1/lists', requestOptions) .then(response => response.text()) .then(result => console.log(result)) .catch(error => console.log('error', error));
import requests url = "https://api.quicknode.com/kv/rest/v1/lists" payload = { "key": "my-list", "items": ["item1"] } headers = { "accept": "application/json", "Content-Type": "application/json", "x-api-key": "YOUR_API_KEY" # Replace with your actual API key } response = requests.post(url, headers=headers, json=payload) print(response.text)
require "uri" require "net/http" require "json" # Set up the URL for the request url = URI("https://api.quicknode.com/kv/rest/v1/lists") https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Post.new(url) request["accept"] = "application/json" request["Content-Type"] = "application/json" request["x-api-key"] = "YOUR_API_KEY" # Replace with your actual API key request.body = { "key" => "my-list", "items" => ["item1"] }.to_json response = https.request(request) puts response.body
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free