Developer documentation for submitting contact and support requests programmatically.
The Netstat JSON API allows approved clients, applications, and automation systems to submit contact or support requests directly to our backend. All submissions are securely stored in our database and processed by our team.
POST https://netstat.com.au/auth.php → Obtain JWT access + refresh tokens
POST https://netstat.com.au/auth_refresh.php → Refresh an expired access token
POST https://netstat.com.au/contact_api.php → Submit a contact/support request
The API uses a two‑step authentication process combining API keys and short‑lived JWT access tokens.
Send your API key to the authentication endpoint:
POST /auth.php
Header: X-API-KEY: XXX-XXX-XXX
Successful responses return:
{
"access_token": "",
"expires_in": 900,
"refresh_token": ""
}
All API calls must include the JWT access token:
Authorization: Bearer <jwt>
Content-Type: application/json
Requests without a valid JWT will be rejected with 401 Unauthorized.
Access tokens expire after 15 minutes. Use your refresh token to obtain a new access token:
POST /auth_refresh.php
{
"refresh_token": ""
}
The API accepts the following JSON fields:
{
"name": "John Smith",
"email": "john@example.com",
"phone": "0400 000 000",
"business": "ABC Pty Ltd",
"message": "We need help with our server."
}
curl -Method POST `
-Headers @{ "X-API-KEY" = "XXX-XXX-XXX" } `
https://netstat.com.au/auth.php
$jwt = "" $body = @{ name = "PowerShell Test" email = "test@example.com" message = "Testing API" } | ConvertTo-Json Invoke-RestMethod -Uri "https://netstat.com.au/contact_api.php" ` -Method POST ` -Headers @{ "Authorization" = "Bearer $jwt" } ` -ContentType "application/json" ` -Body $body
curl -X POST https://netstat.com.au/contact_api.php ^ -H "Content-Type: application/json" ^ -H "Authorization: Bearer" ^ -d "{\"name\":\"CMD Test\",\"email\":\"cmd@example.com\",\"message\":\"Testing JSON API\"}"
fetch("/contact_api.php", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer "
},
body: JSON.stringify({
name: "Web App",
email: "web@example.com",
message: "Testing API"
})
})
.then(r => r.json())
.then(console.log);
Successful responses return:
{
"status": "success",
"message": "Submission received",
"id": "123"
}
Error responses include:
{
"status": "error",
"message": "Missing field: name"
}
Each API key has its own rate limit configuration. Excessive or abusive requests may be temporarily blocked with 429 Too Many Requests.
For API assistance or integration support, contact us at:
Email: info@netstat.com.au