API reference
Public REST API endpoints for Unsparing.dev.
API reference
The Unsparing.dev API is a REST API under /api/v1/. Authentication uses Bearer tokens (Sanctum). Base URL: https://api.unsparing.dev.
Authentication
Pass your API token as a Bearer token in the Authorization header:
Authorization: Bearer <your-token>Create and manage tokens from Settings → API Tokens in the app.
Response format
All responses return JSON. Successful responses follow this envelope:
{
"data": { ... },
"meta": { ... }
}Errors return:
{
"message": "Human-readable error",
"errors": { ... }
}Endpoints
Account
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/me | Current user and workspace info |
Cron
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/cron/tasks | List all scheduled tasks |
| POST | /api/v1/cron/tasks | Create a new task |
| GET | /api/v1/cron/tasks/{id} | Get a task |
| PATCH | /api/v1/cron/tasks/{id} | Update a task |
| DELETE | /api/v1/cron/tasks/{id} | Delete a task |
| POST | /api/v1/cron/tasks/{id}/run | Trigger a run immediately |
| GET | /api/v1/cron/tasks/{id}/executions | List execution history |
| GET | /api/v1/cron/tasks/{id}/executions/{exec_id} | Get execution details |
DNS
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/dns/watchers | List all watchers |
| POST | /api/v1/dns/watchers | Create a new watcher |
| GET | /api/v1/dns/watchers/{id} | Get a watcher |
| PATCH | /api/v1/dns/watchers/{id} | Update a watcher |
| DELETE | /api/v1/dns/watchers/{id} | Delete a watcher |
| GET | /api/v1/dns/watchers/{id}/snapshots | List snapshots |
| GET | /api/v1/dns/watchers/{id}/snapshots/{snap_id} | Get a snapshot |
| GET | /api/v1/dns/watchers/{id}/alerts | List alert history |
Full OpenAPI specification is available in the app at Settings → API Tokens.
Rate limits
Rate limits apply per workspace. Current limits are returned in response headers:
X-RateLimit-Limit: total requests per windowX-RateLimit-Remaining: requests remainingX-RateLimit-Reset: Unix timestamp when the window resets