API Documentation

RESTful API for SSL certificate monitoring and management

Business Plan Feature • Base URL: https://sslexpired.com/api/v1

Quick Start

  1. Upgrade to Business plan to access API features
  2. Generate an API key in your dashboard settings
  3. Include the API key in the X-API-Key header with every request
  4. All responses are in JSON format

Authentication

All API requests require authentication using an API key. Include your API key in the request header:

Request Header
X-API-Key: your-api-key-here
Example Request
curl https://sslexpired.com/api/v1/domains \
  -H "X-API-Key: sk_live_abc123xyz456"

API Endpoints

GET /api/v1/account

Retrieve your account information including plan details and usage statistics.

Request
curl https://sslexpired.com/api/v1/account \
  -H "X-API-Key: your-api-key"
Response (200 OK)
{
  "id": 123,
  "email": "user@example.com",
  "name": "John Doe",
  "plan": "business",
  "domain_count": 15,
  "domain_limit": 100,
  "api_enabled": true,
  "created_at": "2024-01-15T10:30:00Z"
}
GET /api/v1/domains

List all monitored domains in your account.

Request
curl https://sslexpired.com/api/v1/domains \
  -H "X-API-Key: your-api-key"
Response (200 OK)
{
  "domains": [
    {
      "id": 1,
      "domain_name": "example.com",
      "port": 443,
      "ip_address": null,
      "status": "valid",
      "certificate_expiry": "2025-06-15T23:59:59Z",
      "days_until_expiry": 145,
      "last_checked": "2025-01-20T12:00:00Z",
      "created_at": "2024-12-01T10:00:00Z"
    }
  ],
  "total": 1
}
POST /api/v1/domains

Add a new domain to monitor.

Request
curl -X POST https://sslexpired.com/api/v1/domains \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "domain_name": "example.com",
    "port": 443,
    "ip_address": "192.168.1.1"
  }'
Parameters:
  • domain_name (string, required) - Domain name to monitor
  • port (integer, optional) - Port number (default: 443)
  • ip_address (string, optional) - Specific IP address to connect to
Response (201 Created)
{
  "id": 2,
  "domain_name": "example.com",
  "port": 443,
  "ip_address": "192.168.1.1",
  "status": "pending",
  "created_at": "2025-01-30T14:30:00Z"
}
GET /api/v1/domains/:id

Get detailed information about a specific domain.

Request
curl https://sslexpired.com/api/v1/domains/1 \
  -H "X-API-Key: your-api-key"
Response (200 OK)
{
  "id": 1,
  "domain_name": "example.com",
  "port": 443,
  "ip_address": null,
  "status": "valid",
  "certificate_expiry": "2025-06-15T23:59:59Z",
  "certificate_issuer": "Let's Encrypt",
  "certificate_subject": "example.com",
  "days_until_expiry": 145,
  "last_checked": "2025-01-20T12:00:00Z",
  "error_message": null,
  "created_at": "2024-12-01T10:00:00Z"
}
DELETE /api/v1/domains/:id

Remove a domain from monitoring.

Request
curl -X DELETE https://sslexpired.com/api/v1/domains/1 \
  -H "X-API-Key: your-api-key"
Response (200 OK)
{
  "message": "Domain deleted successfully"
}
POST /api/v1/domains/:id/check

Trigger an immediate SSL certificate check for a domain.

Request
curl -X POST https://sslexpired.com/api/v1/domains/1/check \
  -H "X-API-Key: your-api-key"
Response (200 OK)
{
  "message": "Certificate check completed",
  "status": "valid",
  "days_until_expiry": 145,
  "last_checked": "2025-01-30T14:45:00Z"
}
GET /api/v1/notifications

Retrieve notification history for your account.

Request
curl https://sslexpired.com/api/v1/notifications \
  -H "X-API-Key: your-api-key"
Response (200 OK)
{
  "notifications": [
    {
      "id": 1,
      "domain_id": 1,
      "domain_name": "example.com",
      "type": "expiring_soon",
      "days_until_expiry": 7,
      "sent_at": "2025-01-25T09:00:00Z"
    }
  ],
  "total": 1
}

Error Codes

The API uses standard HTTP status codes to indicate success or failure:

Code Status Description
200 OK Request succeeded
201 Created Resource successfully created
400 Bad Request Invalid request parameters
401 Unauthorized Invalid or missing API key
403 Forbidden API access not enabled for your plan
404 Not Found Resource not found
429 Too Many Requests Rate limit exceeded
500 Internal Server Error Server error occurred
Error Response Format
{
  "error": "Unauthorized",
  "message": "Invalid API key provided"
}

Rate Limits

API requests are subject to the following rate limits:

  • 1,000 requests per hour per API key
  • Rate limit headers are included in every response
  • Exceeding the rate limit returns a 429 Too Many Requests error
Rate Limit Headers
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 995
X-RateLimit-Reset: 1643644800

MCP Server Integration

The Business plan includes MCP (Model Context Protocol) server support, allowing you to manage SSL certificates through AI assistants like Claude Desktop, Cline, and other MCP-compatible tools.

View MCP Documentation →

Need Help?

For API support, technical questions, or to report issues, contact us at info@sslexpired.com