/webhooks/rest/v1/webhooks/{id}/activate REST API Endpoint
Parâmetros do caminho
id
cadeia de caracteres
OBRIGATÓRIO
A carregar...
Parâmetros corporais
startFrom
cadeia de caracteres
OBRIGATÓRIO
A carregar...
lastlatestDevoluções
201 Created
A carregar...
Pedido
1curl -X POST \2"https://api.quicknode.com/webhooks/rest/v1/webhooks/YOUR_WEBHOOK_ID/activate" \3-H "accept: application/json" \4-H "Content-Type: application/json" \5-H "x-api-key: YOUR_API_KEY" \6-d $'{7"startFrom": "latest"8}'
1curl -X POST \2"https://api.quicknode.com/webhooks/rest/v1/webhooks/YOUR_WEBHOOK_ID/activate" \3-H "accept: application/json" \4-H "Content-Type: application/json" \5-H "x-api-key: YOUR_API_KEY" \6-d $'{7"startFrom": "latest"8}'
1const axios = require('axios')23const webhookId = 'YOUR_WEBHOOK_ID' // Replace with your actual webhook ID4const url = `https://api.quicknode.com/webhooks/rest/v1/webhooks/${webhookId}/activate`56const payload = {7startFrom: 'latest',8}910const cabeçalhos = {11accept: 'application/json',12'Content-Type': 'application/json',13'x-api-key': 'YOUR_API_KEY', // Replace with your actual API key14}1516axios17.post(url, payload, { headers })18.then(response => {19console.log(response.data)20})21.catch(error => {22console.error('Error:', error.response?.data || error.message)23})24
1const axios = require('axios')23const webhookId = 'YOUR_WEBHOOK_ID' // Replace with your actual webhook ID4const url = `https://api.quicknode.com/webhooks/rest/v1/webhooks/${webhookId}/activate`56const payload = {7startFrom: 'latest',8}910const cabeçalhos = {11accept: 'application/json',12'Content-Type': 'application/json',13'x-api-key': 'YOUR_API_KEY', // Replace with your actual API key14}1516axios17.post(url, payload, { headers })18.then(response => {19console.log(response.data)20})21.catch(error => {22console.error('Error:', error.response?.data || error.message)23})24
1importar pedidos23webhook_id = "YOUR_WEBHOOK_ID" # Replace with your actual webhook ID4url = f"https://api.quicknode.com/webhooks/rest/v1/webhooks/{webhook_id}/activate"56carga útil = {7"startFrom": "latest"8}910cabeçalhos = {11"accept": "application/json",12"Content-Type": "application/json",13"x-api-key": "YOUR_API_KEY" # Replace with your actual API key14}1516response = requests.post(url, headers=headers, json=payload)1718print(response.text)
1importar pedidos23webhook_id = "YOUR_WEBHOOK_ID" # Replace with your actual webhook ID4url = f"https://api.quicknode.com/webhooks/rest/v1/webhooks/{webhook_id}/activate"56carga útil = {7"startFrom": "latest"8}910cabeçalhos = {11"accept": "application/json",12"Content-Type": "application/json",13"x-api-key": "YOUR_API_KEY" # Replace with your actual API key14}1516response = requests.post(url, headers=headers, json=payload)1718print(response.text)
1exigir "uri"2require "net/http"3require "json"45webhook_id = "YOUR_WEBHOOK_ID" # Replace with your actual webhook ID6url = URI("https://api.quicknode.com/webhooks/rest/v1/webhooks/#{webhook_id}/activate")78https = Net::HTTP.novo(url.host, url.porta)9https.use_ssl = true1011pedido = Líquido::HTTP::POST.novo(url)12pedido["aceitar"] = "application/json"13pedido["Content-Type"] = "application/json"14request["x-api-key"] = "YOUR_API_KEY" # Replace with your actual API key1516request.body = {17"startFrom" => "latest"18}.to_json1920resposta = https.pedido(pedido)21puts response.body
1exigir "uri"2require "net/http"3require "json"45webhook_id = "YOUR_WEBHOOK_ID" # Replace with your actual webhook ID6url = URI("https://api.quicknode.com/webhooks/rest/v1/webhooks/#{webhook_id}/activate")78https = Net::HTTP.novo(url.host, url.porta)9https.use_ssl = true1011pedido = Líquido::HTTP::POST.novo(url)12pedido["aceitar"] = "application/json"13pedido["Content-Type"] = "application/json"14request["x-api-key"] = "YOUR_API_KEY" # Replace with your actual API key1516request.body = {17"startFrom" => "latest"18}.to_json1920resposta = https.pedido(pedido)21puts response.body
1qn webhook activate {webhook_id} --start-from last -o json
1qn webhook activate {webhook_id} --start-from last -o json
1importar { QuicknodeSdk } de "@quicknode/sdk"23const qn = new QuicknodeSdk({ apiKey: "YOUR_API_KEY" })45const response = await qn.webhooks.activateWebhook("WEBHOOK_ID", { startFrom: "latest" })6consola.registo(resposta)7
1importar { QuicknodeSdk } de "@quicknode/sdk"23const qn = new QuicknodeSdk({ apiKey: "YOUR_API_KEY" })45const response = await qn.webhooks.activateWebhook("WEBHOOK_ID", { startFrom: "latest" })6consola.registo(resposta)7
1import asyncio2de quicknode_sdk import QuicknodeSdk, SdkFullConfig345async def main():6qn = QuicknodeSdk(SdkFullConfig(api_key="A SUA_CHAVE_API"))7response = await qn.webhooks.activate_webhook("WEBHOOK_ID", start_from="latest")8imprimir(resposta)91011asyncio.executar(main()))12
1import asyncio2de quicknode_sdk import QuicknodeSdk, SdkFullConfig345async def main():6qn = QuicknodeSdk(SdkFullConfig(api_key="A SUA_CHAVE_API"))7response = await qn.webhooks.activate_webhook("WEBHOOK_ID", start_from="latest")8imprimir(resposta)91011asyncio.executar(main()))12
1necessita de "quicknode_sdk"23qn = QuicknodeSdk::SDK.from_config(api_key: "A SUA_CHAVE_API")45response = qn.webhooks.activate_webhook("WEBHOOK_ID", start_from: "latest")6apresenta a resposta7
1necessita de "quicknode_sdk"23qn = QuicknodeSdk::SDK.from_config(api_key: "A SUA_CHAVE_API")45response = qn.webhooks.activate_webhook("WEBHOOK_ID", start_from: "latest")6apresenta a resposta7
1use quicknode_sdk::{QuicknodeSdk, SdkFullConfig};23#[tokio::main]4async fn main() -> Result<(), Box<dyn std::error::Error>> {5deixa qn = QuicknodeSdk::new(&SdkFullConfig::builder().api_key("A SUA_CHAVE_API").build())?;6let response = qn.webhooks.activate_webhook("WEBHOOK_ID", &quicknode_sdk::webhooks::ActivateWebhookParams { start_from: quicknode_sdk::webhooks::WebhookStartFrom::Latest }).await?;78println!("{:?}", response);9Ok(())10}11
1use quicknode_sdk::{QuicknodeSdk, SdkFullConfig};23#[tokio::main]4async fn main() -> Result<(), Box<dyn std::error::Error>> {5deixa qn = QuicknodeSdk::new(&SdkFullConfig::builder().api_key("A SUA_CHAVE_API").build())?;6let response = qn.webhooks.activate_webhook("WEBHOOK_ID", &quicknode_sdk::webhooks::ActivateWebhookParams { start_from: quicknode_sdk::webhooks::WebhookStartFrom::Latest }).await?;78println!("{:?}", response);9Ok(())10}11
Ainda não tem uma conta?
Crie o seu ponto de extremidade Quicknode em segundos e comece a desenvolver
Comece gratuitamente