Skip to main content
PUT
/
disablePolicy
/
{id}
disablePolicy/{id}
curl --request PUT \
  --url https://rpc.etherspot.io/paymaster/disablePolicy/{id} \
  --header 'apikey: <apikey>'
import requests

url = "https://rpc.etherspot.io/paymaster/disablePolicy/{id}"

headers = {"apikey": "<apikey>"}

response = requests.put(url, headers=headers)

print(response.text)
const options = {method: 'PUT', headers: {apikey: '<apikey>'}};

fetch('https://rpc.etherspot.io/paymaster/disablePolicy/{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://rpc.etherspot.io/paymaster/disablePolicy/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"apikey: <apikey>"
],
]);

$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://rpc.etherspot.io/paymaster/disablePolicy/{id}"

req, _ := http.NewRequest("PUT", url, nil)

req.Header.Add("apikey", "<apikey>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://rpc.etherspot.io/paymaster/disablePolicy/{id}")
.header("apikey", "<apikey>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://rpc.etherspot.io/paymaster/disablePolicy/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["apikey"] = '<apikey>'

response = http.request(request)
puts response.read_body
{
  "message": "Successfully disabled policy with id 123"
}
{
"error": "Invalid sponsorship policy ID or API key does not exist for the wallet address"
}
{
"error": "Wallet address does not match for the API key"
}
{
"error": "Sponsorship policy not found"
}
{
"error": "Failed to disable sponsorship policy"
}
Example values you can use to demo the API:
{
  "headers": {
    "apikey": "your_api_key_here"
  },
  "pathVariables": {
    "id": "policy_id_here"
  }
}
Example response:
{
  "message": "Policy disabled successfully."
}

Headers

apikey
string
required

API key associated with the wallet address.

Path Parameters

id
integer
required

The ID of the sponsorship policy to disable.

Response

Successfully disabled the sponsorship policy

message
string
Example:

"Successfully disabled policy with id 123"