Docs
Network
UDP Check
Test UDP reachability on a host and port.
POST
/v1/udp-check
udp.run
Sends a UDP probe to the given host and port with configurable timeout and retry count.
Authentication
This endpoint requires a valid API key sent as a Bearer token, and the key must carry the scope listed above. See Authentication and Scopes for details.
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Required | Bearer token — Bearer pk_live_... |
| Content-Type | Required | application/json |
Request Example
curl -X POST "https://api.paqet.net/v1/udp-check" \
-H "Authorization: Bearer pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"domain": "example.com",
"port": 53,
"timeout": 5,
"retry": 3
}'
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new("Bearer", "pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
var body = new StringContent("""
{
"domain": "example.com",
"port": 53,
"timeout": 5,
"retry": 3
}
""", System.Text.Encoding.UTF8, "application/json");
var response = await client.PostAsync("https://api.paqet.net/v1/udp-check", body);
var json = await response.Content.ReadAsStringAsync();
Console.WriteLine(json);
const response = await fetch("https://api.paqet.net/v1/udp-check", {
method: "POST",
headers: {
"Authorization": "Bearer pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
"domain": "example.com",
"port": 53,
"timeout": 5,
"retry": 3
})
});
const data = await response.json();
console.log(data);
interface ApiResponse<T> {
success: boolean;
data?: T;
code?: string;
message?: string;
}
const response = await fetch("https://api.paqet.net/v1/udp-check", {
method: "POST",
headers: {
"Authorization": "Bearer pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json"
},
body: JSON.stringify({
"domain": "example.com",
"port": 53,
"timeout": 5,
"retry": 3
})
});
const data: ApiResponse<unknown> = await response.json();
console.log(data);
import requests
headers = {"Authorization": "Bearer pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
response = requests.post(
"https://api.paqet.net/v1/udp-check",
headers=headers,
json={
"domain": "example.com",
"port": 53,
"timeout": 5,
"retry": 3
}
)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{
"domain": "example.com",
"port": 53,
"timeout": 5,
"retry": 3
}`)
req, _ := http.NewRequest("POST", "https://api.paqet.net/v1/udp-check", body)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
data, _ := io.ReadAll(resp.Body)
fmt.Println(string(data))
}
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paqet.net/v1/udp-check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => '{
"domain": "example.com",
"port": 53,
"timeout": 5,
"retry": 3
}',
CURLOPT_HTTPHEADER => [
"Authorization: Bearer pk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type: application/json"
]
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response Example
200 OK
{
"success": true,
"data": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"summary": "UDP 53 responded on example.com",
"durationMs": 310,
"results": [
{ "port": 53, "responded": true, "attempts": 1 }
]
}
}
Error Responses
| Status | Code | Meaning |
|---|---|---|
| 401 | API_KEY_INVALID | The API key is missing, malformed, or doesn't match any active key. |
| 401 | API_KEY_REVOKED | The API key was manually revoked and can never be reactivated. |
| 401 | API_KEY_EXPIRED | The API key's expiration date has passed. |
| 403 | PLAN_EXPIRED | Your Enterprise subscription is no longer active. |
| 403 | ENTERPRISE_REQUIRED | The Public API is only available on the Enterprise plan. |
| 403 | SCOPE_REQUIRED | The API key doesn't have the scope required for this endpoint. |
| 429 | RATE_LIMIT_EXCEEDED | The API key has exceeded its request limit for the current window. |
| 422 | VALIDATION_ERROR | One or more request parameters failed validation. |
| 500 | INTERNAL_ERROR | An unexpected error occurred on Paqet's side. |
Rate Limits
This endpoint counts against your API key's standard request limit. See Rate Limits for current limits, response headers, and retry guidance.
Notes
- UDP is connectionless — a lack of response doesn't always mean the port is closed.
Related APIs
Try this endpoint
Run it live from the Playground using your own API key.