Skip to main content

Domains API

The Domains API allows you to manage domain monitoring, retrieve uptime statistics, and access SSL certificate information.

Authentication

All requests require authentication via Bearer token. See Authentication for details.

Base URL

https://api.ipulse.one

Create Domain

curl -X POST "https://api.ipulse.one/api/domains" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "name": "My Website",
    "check_interval": 300,
    "ssl_check": {
      "enabled": true,
      "warn_days_before_expiry": 30
    }
  }'

Get Domain Statistics

curl -X GET "https://api.ipulse.one/api/domains/domain_123/stats?period=30d" \
  -H "Authorization: Bearer YOUR_API_KEY"
curl -X GET "https://api.ipulse.one/api/domains/domain_123/response-time-trends?period=24h&resolution=5m" \
  -H "Authorization: Bearer YOUR_API_KEY"

Accessibility Scan

curl -X POST "https://api.ipulse.one/api/domains/domain_123/accessibility" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "standards": ["WCAG2AA"]
  }'

Generate QR Code

curl -X POST "https://api.ipulse.one/api/domains/domain_123/generate-qr" \
  -H "Authorization: Bearer YOUR_API_KEY"

Error Handling

Common Errors

Status CodeErrorDescription
400VALIDATION_ERRORInvalid request data
401UNAUTHORIZEDInvalid or missing authentication
403FORBIDDENInsufficient permissions
404DOMAIN_NOT_FOUNDDomain does not exist
429RATE_LIMIT_EXCEEDEDAPI rate limit exceeded
500INTERNAL_ERRORServer error

Error Response Format

{
  "error": "VALIDATION_ERROR",
  "message": "Invalid domain URL format",
  "details": {
    "field": "url",
    "reason": "URL must include protocol (http/https)"
  }
}

Rate Limits

  • GET requests: 1000 per hour
  • POST/PUT/DELETE: 100 per hour
  • Bulk operations: 10 per hour

Webhooks

Domains support webhooks for real-time notifications. Configure webhooks in your dashboard settings.

Webhook Events

  • domain_up - Domain comes back online
  • domain_down - Domain goes offline
  • ssl_expiring - SSL certificate expires soon
  • ssl_expired - SSL certificate has expired
  • dns_changed - DNS records have changed

Webhook Payload

{
  "event": "domain_down",
  "domain": {
    "id": "domain_123",
    "url": "https://example.com",
    "name": "My Website"
  },
  "check": {
    "timestamp": "2024-01-17T10:30:00Z",
    "status": "down",
    "response_time_ms": null,
    "error": "Connection timeout after 30 seconds",
    "location": "ams"
  },
  "incident_id": "incident_456"
}