API Reference
Complete API documentation for all SLC endpoints.
API Versioning
SLC uses versioned API endpoints to ensure backward compatibility and smooth migrations. All public API endpoints support versioning through the `/v1/` namespace.
Default: If not specified, the CLI defaults to `v1`.
All versioned endpoints follow the pattern: /{version}/{endpoint}
App Invocation (Versioned)
POST /v1/invoke/:projectId/:appName/:actorId
Invoke an app handler for a specific actor.
Headers:
- •
Content-Type: application/json - •
x-slc-api-key: sk_your_api_key(required)
Example:
curl -X POST https://api.slc.run/v1/invoke/my-project/hello-world-app/user-123 \
-H "Content-Type: application/json" \
-H "x-slc-api-key: sk_your_api_key" \
-d '{"message":"hi there"}'GET /v1/invoke/:projectId/:appName/:actorId
Invoke an app handler with GET method.
Example:
curl https://api.slc.run/v1/invoke/my-project/hello-world-app/user-123 \
-H "x-slc-api-key: sk_your_api_key"DELETE /v1/invoke/:projectId/:appName/:actorId
Delete actor state completely.
Example:
curl -X DELETE https://api.slc.run/v1/invoke/my-project/hello-world-app/user-123 \
-H "x-slc-api-key: sk_your_api_key"App Deployment
POST /v1/_control/deploy-app
Deploy an app bundle (used by `slc deploy`).
Headers:
- •
Content-Type: application/json - •
x-slc-api-key: sk_your_api_key(required)
Body:
{
"name": "my-app",
"bundle": "<bundled-code>",
"version": 1
}Response:
{
"success": true,
"name": "my-app",
"version": 1,
"apiVersion": "v1"
}Project Management
POST /v1/_control/create-project
Create a new project. Requires admin secret.
Headers:
- •
x-slc-admin-secret: your-admin-secret(required)
GET /v1/_control/list-projects
List all projects. Requires admin secret.
Headers:
- •
x-slc-admin-secret: your-admin-secret(required)
POST /v1/_control/rotate-apikey
Rotate API key for a project. Requires admin secret.
Headers:
- •
x-slc-admin-secret: your-admin-secret(required)
System Endpoints
GET /v1/_health
Health check endpoint that returns server status, database file size, and actor count.
Example:
curl https://api.slc.run/v1/_healthResponse:
{
"status": "ok",
"dbFileSizeBytes": 8192,
"actorCountInDb": 5
}GET /v1/_system/info
Returns system information and version details.
GET /_debug/metrics
Debug metrics endpoint that returns runtime statistics.
Example:
curl https://api.slc.run/_debug/metricsResponse:
{
"activeActors": 3,
"dbFileSizeBytes": 8192,
"requestsLastMinute": 42,
"uptimeSeconds": 3600
}Response Format
Versioned API responses include version metadata:
{
"success": true,
"count": 2,
"actorId": "user1",
"apiVersion": "v1",
"gatewayVersion": "1.0",
"gatewayRegion": "global",
"runtimeRegion": "mumbai"
}Legacy Endpoints (Deprecated)
The following legacy endpoints are still supported but will return a deprecation warning header: `x-slc-warning: deprecated_route_will_be_removed`
- •
POST /invoke/:projectId/:appName/:actorId- Use `/v1/invoke/...` instead - •
POST /_control/deploy-app- Use `/v1/_control/deploy-app` instead - •
GET /_health- Use `/v1/_health` instead