Set proxy comments
POSThttps://geonix.com/personal/api/v1/{apiKey}/proxy/comment/set
This endpoint allows you to add comments to your proxies. This is a convenient way to add notes or tags to them for easier management and organization.
Headers
Name | Value |
|---|---|
Content-Type |
|
Path parameters
Name | Type | Description |
|---|---|---|
| string | API key to authorize requests |
Body parameters
Name | Type | Description |
|---|---|---|
| array of integers | The IDs of the proxies you wish to comment on |
| string | The comment you want to associate with the specified proxies |
Request examples
curl -X POST "https://geonix.com/personal/api/v1/YOUR_API_KEY_HERE/proxy/comment/set" \
-H "Content-Type: application/json" \
-d '{"ids": [105487, 458746], "comment": "New comment"}'<?php
$apiKey = 'YOUR_API_KEY_HERE'; // Replace with your actual API key
$url = "https://geonix.com/personal/api/v1/$apiKey/proxy/comment/set";
$data = array("ids" => array(105487, 458746), "comment" => "New comment");
$data_json = json_encode($data);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.nio.charset.StandardCharsets;
public class SetProxyCommentExample {
public static void main(String[] args) {
String apiKey = "YOUR_API_KEY_HERE"; // Replace with your actual API key
String queryUrl = "https://geonix.com/personal/api/v1/" + apiKey + "/proxy/comment/set";
String jsonInputString = "{\"ids\": [105487, 458746], \"comment\": \"New comment\"}";
try {
URL url = new URL(queryUrl);
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("Content-Type", "application/json");
con.setDoOutput(true);
// Send request
try(OutputStream os = con.getOutputStream()) {
byte[] input = jsonInputString.getBytes(StandardCharsets.UTF_8);
os.write(input, 0, input.length);
}
// Print response
int responseCode = con.getResponseCode();
System.out.println("Response Code: " + responseCode);
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
// Print result
System.out.println(response.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
Response examples
{
"status": "success",
"data": {
"updated": 5
},
"errors": []
}{
"status": "error",
"data": null,
"errors": [
{
"message": "IP not found",
"code": 0,
"customData": null
}
]
}