Health Check
POST
https://api-v3.sweeppea.com/account/health-check
Description
This endpoint allows you to verify that the API is healthy and your API token is valid. Use this for monitoring purposes or to check the connection status before making other API calls. This is a lightweight endpoint that requires only authentication and returns a simple success message.
Code Examples
curl -X POST "https://api-v3.sweeppea.com/account/health-check" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
const response = await fetch('https://api-v3.sweeppea.com/account/health-check', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
}
});
const data = await response.json();
console.log(data);
import requests
url = "https://api-v3.sweeppea.com/account/health-check"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
}
response = requests.post(url, headers=headers)
print(response.json())
Response
{
"Response": true,
"Message": "API is healthy",
"Telemetry": {
"DataConsumed": 0,
"APICalls": 142,
"MaxAPICalls": 500000
}
}
Error Responses
{
"Response": false,
"Message": "Missing or invalid Bearer token. Send your API token in the Authorization header as: Authorization: Bearer YOUR_API_TOKEN"
}
{
"Response": false,
"Message": "Internal server error. Please try again; if it persists, contact support with the time of this request."
}