Base URL
/api/v1/ or /api/auth/.
Authentication
Authenticated endpoints require a Bearer token in theAuthorization header:
sl_live_ followed by 32 hex characters. See Authentication for how to get one.
Some endpoints work without authentication (anonymous publishing), but with limitations.
Content Type
All request bodies must be JSON:Response Format
All responses return JSON. Successful responses include the relevant data. Error responses follow a consistent format:Rate Limiting
Every API response includes rate limit headers:Endpoints
Publishing
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v1/publish | Create a new site |
PUT | /api/v1/_upload/:key | Upload a file |
POST | /api/v1/publish/:slug/finalize | Finalize and go live |
PUT | /api/v1/publish/:slug | Update an existing site |
Management
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/publishes | List all sites |
GET | /api/v1/publish/:slug | Get site details |
DELETE | /api/v1/publish/:slug | Delete a site |
POST | /api/v1/publish/:slug/duplicate | Duplicate a site |
PATCH | /api/v1/publish/:slug/metadata | Update metadata |
POST | /api/v1/publish/:slug/claim | Claim anonymous site |
Authentication
| Method | Endpoint | Description |
|---|---|---|
POST | /api/auth/agent/request-code | Request verification code |
POST | /api/auth/agent/verify-code | Verify code and get API key |