Core
Ping
Check connectivity to the ShortPen API. Limited to 30 requests per minute per IP address.
GET
/
v1
/
ping
Ping
curl --request GET \
--url https://{environment}.shortpen.com/v1/pingimport requests
url = "https://{environment}.shortpen.com/v1/ping"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{environment}.shortpen.com/v1/ping', 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://{environment}.shortpen.com/v1/ping",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://{environment}.shortpen.com/v1/ping"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{environment}.shortpen.com/v1/ping")
.asString();require 'uri'
require 'net/http'
url = URI("https://{environment}.shortpen.com/v1/ping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"PONG"{
"success": false,
"status_code": 401,
"message": "There was an error while processing your request.",
"data": "<unknown>"
}Use this endpoint to verify that your client can reach the ShortPen API host.
No authentication is required, but the route is rate limited to 30 requests per minute per IP address.
- Returns the plain-text string
PONGwhen the service is healthy. - Ideal for uptime probes and health checks before issuing authenticated calls.
- Because the response is not JSON, you may need to force your HTTP client to treat it as plain text.
Response
API is reachable
The response is of type string.
Example:
"PONG"
Was this page helpful?
⌘I
Ping
curl --request GET \
--url https://{environment}.shortpen.com/v1/pingimport requests
url = "https://{environment}.shortpen.com/v1/ping"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{environment}.shortpen.com/v1/ping', 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://{environment}.shortpen.com/v1/ping",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://{environment}.shortpen.com/v1/ping"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{environment}.shortpen.com/v1/ping")
.asString();require 'uri'
require 'net/http'
url = URI("https://{environment}.shortpen.com/v1/ping")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body"PONG"{
"success": false,
"status_code": 401,
"message": "There was an error while processing your request.",
"data": "<unknown>"
}