Update an Event Monitor
curl --request PUT \
--url https://api.circle.com/v1/w3s/contracts/monitors/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isEnabled": false
}
'import requests
url = "https://api.circle.com/v1/w3s/contracts/monitors/{id}"
payload = { "isEnabled": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({isEnabled: false})
};
fetch('https://api.circle.com/v1/w3s/contracts/monitors/{id}', 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.circle.com/v1/w3s/contracts/monitors/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'isEnabled' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.circle.com/v1/w3s/contracts/monitors/{id}"
payload := strings.NewReader("{\n \"isEnabled\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.circle.com/v1/w3s/contracts/monitors/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isEnabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.circle.com/v1/w3s/contracts/monitors/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isEnabled\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"eventMonitor": {
"id": "e3c998a5-bdf1-4f3e-812f-24da238c0fff",
"blockchain": "MATIC-AMOY",
"contractAddress": "0x1e124d7384cd34448ea5907bd0052a79355ab5eb",
"eventSignature": "Transfer(address indexed from, address indexed to, uint256 value)",
"eventSignatureHash": "0xd3d3dd4b1fd3e53f94deb24e763485b4c925345c5abfa9ad529c67aa55a3b784",
"isEnabled": true
}
}
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}Update an Event Monitor
Update an existing event monitor given its ID.
PUT
/
v1
/
w3s
/
contracts
/
monitors
/
{id}
Update an Event Monitor
curl --request PUT \
--url https://api.circle.com/v1/w3s/contracts/monitors/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isEnabled": false
}
'import requests
url = "https://api.circle.com/v1/w3s/contracts/monitors/{id}"
payload = { "isEnabled": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({isEnabled: false})
};
fetch('https://api.circle.com/v1/w3s/contracts/monitors/{id}', 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.circle.com/v1/w3s/contracts/monitors/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'isEnabled' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.circle.com/v1/w3s/contracts/monitors/{id}"
payload := strings.NewReader("{\n \"isEnabled\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.circle.com/v1/w3s/contracts/monitors/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isEnabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.circle.com/v1/w3s/contracts/monitors/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isEnabled\": false\n}"
response = http.request(request)
puts response.read_body{
"data": {
"eventMonitor": {
"id": "e3c998a5-bdf1-4f3e-812f-24da238c0fff",
"blockchain": "MATIC-AMOY",
"contractAddress": "0x1e124d7384cd34448ea5907bd0052a79355ab5eb",
"eventSignature": "Transfer(address indexed from, address indexed to, uint256 value)",
"eventSignatureHash": "0xd3d3dd4b1fd3e53f94deb24e763485b4c925345c5abfa9ad529c67aa55a3b784",
"isEnabled": true
}
}
}{
"code": 123,
"message": "<string>"
}{
"code": 123,
"message": "<string>"
}Authorizations
Headers
Developer-provided identifier for this request, used for tracing requests in Wallets API logs and the Developer Console, and when communicating with Circle Support. Must be a UUID to appear in logs. Non-UUID values are accepted by the API but are ignored by logging and tracing systems.
A unique identifier, which can be helpful for identifying a request when communicating with Circle support.
Example:
"2adba88e-9d63-44bc-b975-9b6ae3440dde"
Body
application/json
Update Event Monitor Request
Was this page helpful?