cURL
curl --request GET \
--url https://api.jiffyscan.xyz/v0/createWebhook \
--header 'x-api-key: <api-key>'import requests
url = "https://api.jiffyscan.xyz/v0/createWebhook"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.jiffyscan.xyz/v0/createWebhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jiffyscan.xyz/v0/createWebhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.jiffyscan.xyz/v0/createWebhook"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jiffyscan.xyz/v0/createWebhook")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jiffyscan.xyz/v0/createWebhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyThis response has no body data.Webhook
Create Webhook
GET
/
createWebhook
cURL
curl --request GET \
--url https://api.jiffyscan.xyz/v0/createWebhook \
--header 'x-api-key: <api-key>'import requests
url = "https://api.jiffyscan.xyz/v0/createWebhook"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.jiffyscan.xyz/v0/createWebhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jiffyscan.xyz/v0/createWebhook",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.jiffyscan.xyz/v0/createWebhook"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jiffyscan.xyz/v0/createWebhook")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jiffyscan.xyz/v0/createWebhook")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_bodyThis response has no body data.Creating a Webhook with JiffyLabs API
Sample Curl Request
curl --request GET \
--url 'https://api.jiffyscan.xyz/v0/createWebhook?webhookUrl=<URL to which the webhook should send the data> \
&filter=ADDRESS \
&identifier=0x5CCeC8AA262cB4729a2d4FF7B15b03BdeeA44DC2 \
&chainId=8453 \
&apiName=TestWebHook' \
--header 'x-api-key: <Your JiffyLabs API Key>'
Sample Response when success
200 - response
{
"webhook":{
"apiName":"TestWebHook",
// A custom name or identifier for the API by using which API is created (in this case, it's set to "TestWebHook")
"webhookUrl":"https://381b-2402-a00-1b0-fc1-950c-f59e-1e40-ad90.ngrok-free.app",
// The URL of the API endpoint that will receive webhook notifications. We are using a sample Ngrok url here to expose our local ports
"filter":"ADDRESS",
// The type of filter applied to the webhook (in this case, it's filtering by address)
"chainId":"8453",
// The Chain ID of the blockchain network the webhook is monitoring (8453 corresponds to Base Network )
"identifier":"0x5CCeC8AA262cB4729a2d4FF7B15b03BdeeA44DC2",
// The specific address being monitored by this webhook
"id":"1725944496899",
// A unique identifier for this webhook instance
"createdAt":"2024-09-10T05:01:36.900Z"
// The timestamp when this webhook was created (in UTC)
},
"success":true
// Indicates that the webhook was successfully created
}
Authorizations
Query Parameters
The URL to which the webhook should send the data
The filter to apply to the webhook. Must be one of: ADDRESS, FACTORY, BUNDLER, PAYMASTER
The identifier to filter on, i.e. ADDRESS
The chainId to filter on, i.e. 1 for Ethereum, 8453 for Base ...
The name of the API to create the webhook for
Response
⌘I