API Reference
The Slabond REST API provides direct access to the watcher network. All endpoints are served from https://api.slabond.xyz.
Authentication
Protected endpoints require a Bearer token in the Authorization header:
Authorization: Bearer <your-api-key>Public Endpoints
GET /health
Returns the API health status.
curl https://api.slabond.xyz/healthResponse 200:
{
"status": "ok",
"version": "1.0.0",
"uptime": 99.98
}GET /status
Returns the current network status including active operators and pending SLAs.
curl https://api.slabond.xyz/statusResponse 200:
{
"network": "mainnet",
"activeOperators": 42,
"pendingSLAs": 7,
"avgSettlementTime": 45,
"lastBlock": 19847532
}GET /stats
Returns aggregate protocol statistics.
curl https://api.slabond.xyz/statsResponse 200:
{
"activeOperators": 42,
"totalSLAs": 158320,
"successRate": 99.7,
"totalValueSettled": "24500000.00",
"avgSettlementTime": 45,
"uptime": 99.98
}Authenticated Endpoints
POST /jobs
Creates a new SLA job.
curl -X POST https://api.slabond.xyz/jobs \
-H "Authorization: Bearer $SLABOND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"slaId": "payment-001",
"requester": "0xYourWallet",
"amount": "1000.00 USDC",
"targetUrl": "https://api.stripe.com/v1/charges",
"method": "POST",
"bondTier": "instant",
"timeout": 1800
}'Response 201:
{
"id": "job_abc123",
"slaId": "payment-001",
"status": "CREATED",
"requester": "0xYourWallet",
"amount": "1000.00 USDC",
"targetUrl": "https://api.stripe.com/v1/charges",
"operator": null,
"bondAmount": null,
"proof": null,
"settlementTx": null,
"createdAt": "2026-03-15T10:30:00Z",
"updatedAt": "2026-03-15T10:30:00Z"
}GET /jobs
Lists all SLA jobs for the authenticated user.
curl https://api.slabond.xyz/jobs \
-H "Authorization: Bearer $SLABOND_API_KEY"Response 200:
{
"jobs": [
{
"id": "job_abc123",
"slaId": "payment-001",
"status": "SETTLED",
"amount": "1000.00 USDC",
"createdAt": "2026-03-15T10:30:00Z",
"updatedAt": "2026-03-15T10:31:45Z"
}
],
"total": 1
}GET /jobs/:id
Retrieves a specific SLA job by ID.
curl https://api.slabond.xyz/jobs/job_abc123 \
-H "Authorization: Bearer $SLABOND_API_KEY"Response 200:
{
"id": "job_abc123",
"slaId": "payment-001",
"status": "SETTLED",
"requester": "0xYourWallet",
"amount": "1000.00 USDC",
"targetUrl": "https://api.stripe.com/v1/charges",
"operator": "0xOperatorAddress",
"bondAmount": "2000.00 USDC",
"proof": "0x...",
"settlementTx": "0xabc123...",
"createdAt": "2026-03-15T10:30:00Z",
"updatedAt": "2026-03-15T10:31:45Z"
}Error Responses
All errors follow a consistent format:
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable description"
}
}400 Bad Request
Returned when the request body is invalid or missing required fields.
{
"error": {
"code": "INVALID_REQUEST",
"message": "Field 'slaId' is required"
}
}401 Unauthorized
Returned when the Authorization header is missing or the API key is invalid.
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
}404 Not Found
Returned when the requested resource does not exist.
{
"error": {
"code": "NOT_FOUND",
"message": "Job 'job_xyz' not found"
}
}500 Internal Server Error
Returned when an unexpected error occurs on the server.
{
"error": {
"code": "INTERNAL_ERROR",
"message": "An unexpected error occurred"
}
}