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

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

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

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

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

fetch('https://rpc.etherspot.io/paymaster/deletePolicy/{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/deletePolicy/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/deletePolicy/{id}"

req, _ := http.NewRequest("DELETE", 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.delete("https://rpc.etherspot.io/paymaster/deletePolicy/{id}")
.header("apikey", "<apikey>")
.asString();
require 'uri'
require 'net/http'

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

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

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

response = http.request(request)
puts response.read_body
{
  "message": "Successfully deleted policy with id 123"
}
{
"error": "Invalid sponsorship policy ID"
}
{
"error": "Wallet address does not match for the API key"
}
{
"error": "Sponsorship policy not found"
}
{
"error": "Failed to delete 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 deleted successfully."
}

Headers

apikey
string
required

API key for authentication

Path Parameters

id
integer
required

The ID of the policy to delete

Response

Successfully deleted policy

message
string
Example:

"Successfully deleted policy with id 123"