Skip to main content

Website Endpoints

This page describe website endpoints: https://web-counter.azurewebsites.net/api/website

Base URL: https://web-counter.azurewebsites.net

Create a website

To add your website and generate an API Key

URL: /api/website

Method: POST

Content Type: application/json

Request Body

{
"websiteurl": "https://www.riddlelink.com",
"email": "my_recovery_email@riddlelink.com"
}

Example Requests

const response = await fetch("https://web-counter.azurewebsites.net/api/website", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
websiteurl: "https://www.riddlelink.com",
email: "my_recovery_email@riddlelink.com",
}),
});

Example Responses

{
"apiKey": "123456789",
"hostname": "riddlelink.com",
"email": "my_recovery_email@riddlelink.com"
}

Retrieve or Validate Website

Validate and retrieve website details using the API Key

URL: /api/website

Method: GET

Request Parameters

Headers

X-API-Key: YOUR_API_KEY_GOES_HERE

Example Requests

const response = await fetch("https://web-counter.azurewebsites.net/api/website", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
websiteurl: "https://www.riddlelink.com",
email: "my_recovery_email@riddlelink.com",
}),
});

Example Responses

{
"hostname": "riddlelink.com"
}