Skip to content

Website Management

Manage the websites you are monitoring.

Endpoints

List Websites

GET /api/customers/:customerId/websites

Lists all websites associated with a specific customer.

Parameters

  • customerId (path, required): The ID of the customer.

Response

json
[
  {
    "id": 101,
    "name": "Main Marketing Site",
    "url": "https://example.com",
    "status": "active",
    "checkInterval": 60,
    "lastCheckAt": "2023-10-27T10:00:00Z",
    "uptimePercentage": 99.98
  },
  {
    "id": 102,
    "name": "App Dashboard",
    "url": "https://app.example.com",
    "status": "maintenance",
    "checkInterval": 300
  }
]

Create Website

POST /api/websites

Creates a new website monitor for a customer.

Request Body

json
{
  "customerId": 1,
  "name": "New Landing Page",
  "url": "https://landing.example.com",
  "checkInterval": 60 // Optional, defaults to package limit
}

Response

json
{
  "id": 103,
  "customerId": 1,
  "name": "New Landing Page",
  "url": "https://landing.example.com",
  "status": "active",
  "createdAt": "2023-10-27T10:05:00Z"
}

Get Website Details

GET /api/websites/:id

Returns detailed information about a specific website, including SSL status.

Response

json
{
  "id": 101,
  "name": "Main Marketing Site",
  "url": "https://example.com",
  "status": "active",
  "sslStatus": "valid",
  "sslExpiry": "2024-05-15T00:00:00Z",
  "customer": {
    "id": 1,
    "name": "Acme Corp"
  }
}

Update Website

PUT /api/websites/:id

Updates the configuration of a website monitor.

Request Body

json
{
  "name": "Updated Name",
  "url": "https://new-url.example.com",
  "checkInterval": 120
}

Change Status

PATCH /api/websites/:id/status

Changes the monitoring status of a website.

Request Body

json
{
  "status": "maintenance" // active, maintenance, disabled
}

Delete Website

DELETE /api/websites/:id

Permanently removes a website and its monitoring history.