Guides REST API

Using the REST API

Integrate DriftWatch into your CI/CD pipeline and internal tooling.

10 min read
By Tom Beech Published March 2026

Authentication

The DriftWatch API uses Sanctum token authentication. Create an API token from Settings → API Tokens in the app. Include it in the Authorization header:

Authorization: Bearer your-api-token

All API requests are scoped to the team associated with your token. Rate limits depend on your plan: 1,000 requests/day on Pro, 50,000 on Enterprise.

Endpoints

Domains

GET /api/v1/domains - List all domains
POST /api/v1/domains - Add a domain
GET /api/v1/domains/{id} - Get domain details
DELETE /api/v1/domains/{id} - Remove a domain
POST /api/v1/domains/{id}/discover - Trigger discovery

DNS Records

GET /api/v1/domains/{id}/records - List records
PATCH /api/v1/domains/{id}/records/{record} - Update monitoring

Changes

GET /api/v1/changes - List all changes
GET /api/v1/domains/{id}/changes - Changes for a domain
PATCH /api/v1/changes/{id}/acknowledge - Acknowledge

Alert Channels & Rules

GET /api/v1/alert-channels - List channels
POST /api/v1/alert-channels - Create channel
GET /api/v1/alert-rules - List rules
POST /api/v1/alert-rules - Create rule

Example: Add a domain and start monitoring

# Add domain
curl -X POST https://app.driftwatch.io/api/v1/domains \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "example.com"}'

# Trigger discovery
curl -X POST https://app.driftwatch.io/api/v1/domains/1/discover \
  -H "Authorization: Bearer $TOKEN"

# List discovered records
curl https://app.driftwatch.io/api/v1/domains/1/records \
  -H "Authorization: Bearer $TOKEN"

# Enable monitoring on a record
curl -X PATCH https://app.driftwatch.io/api/v1/domains/1/records/5 \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"is_monitored": true}'