REST API
Programmatic access to blob for CI/CD pipelines, scripts, and external tools.
https://app.imblob.com
Authentication
All API requests require a Bearer token in the Authorization header:
Authorization: Bearer <your_api_key>
Getting an API Key
- Sign up at imblob.com and subscribe to any plan
- Go to Settings → API Keys
- Create a key and copy it — it starts with
blob_live_
Key format: blob_live_<prefix>_<secret>
Error Responses
All errors return JSON with an error field:
{ "error": "App not found" }
| Status | Meaning |
|---|---|
| 400 | Bad request — invalid input |
| 401 | Unauthorized — missing or invalid API key |
| 403 | Forbidden — key lacks required scope |
| 404 | Not found — app or resource doesn't exist |
| 413 | Payload too large — upgrade your plan |
| 429 | Rate limit exceeded — wait and retry |
| 501 | Not implemented — use MCP interface instead |
| 500 | Internal error — contact support |
Create App
Create a new app with all infrastructure (database, storage, KV).
Request Body
| Field | Type | Description |
|---|---|---|
| name | string | Required. 3–30 chars, lowercase letters, numbers, hyphens. Must start/end with alphanumeric. |
| template | string | static-site (default), full-stack, api-only |
| runtime | string | worker (default) or container |
Example
curl -X POST "https://app.imblob.com/v1/apps" \
-H "Authorization: Bearer $BLOB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "my-app",
"template": "static-site",
"runtime": "worker"
}'
Response
201 Created{
"appId": "app_abc123",
"name": "my-app",
"url": "https://my-app.imblob.app",
"backupUrl": "https://my-app.imblob.dev",
"resources": {
"database": "provisioned",
"storage": "provisioned",
"kv": "provisioned"
},
"status": "live"
}
Get App
Get app metadata, deployment history, and current status.
Example
curl "https://app.imblob.com/v1/apps/my-app" \
-H "Authorization: Bearer $BLOB_API_KEY"
Response
200 OK{
"name": "my-app",
"url": "https://my-app.imblob.app",
"backupUrl": "https://my-app.imblob.dev",
"runtime": "worker",
"status": "live",
"template": "static-site",
"lastDeployed": "2026-04-07T09:00:00.000Z",
"deployCount": 5,
"createdAt": "2026-04-01T12:00:00.000Z",
"customDomains": [],
"resources": {
"database": true,
"kv": true,
"storage": true,
"externalDatabase": false
},
"tasks": { "open": 0, "done": 0 },
"lastDeploy": {
"version": 5,
"description": "Fix layout bug",
"deployedAt": "2026-04-07T09:00:00.000Z"
}
}
Deploy Files
Deploy files to make an app live. Staging health check is run before production switches.
Request Body
| Field | Type | Description |
|---|---|---|
| files | array | Required. Array of { path, content } objects. At least one file required. |
| serverCode | string | Optional. Custom server code for full-stack apps (JavaScript). |
| description | string | Optional. Changelog description shown in the dashboard. |
| preview | boolean | Optional (default false). Deploy to staging URL first. |
| skip_checks | boolean | Optional (default false). Skip the staging health check. |
| runtime | string | Optional. Override auto-detection: worker or container. |
Example
curl -X POST "https://app.imblob.com/v1/apps/my-app/deploys" \
-H "Authorization: Bearer $BLOB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"files": [
{ "path": "index.html", "content": "<html><body>Hello</body></html>" }
],
"description": "Update homepage"
}'
Response
200 OK{
"success": true,
"url": "https://my-app.imblob.app",
"backupUrl": "https://my-app.imblob.dev",
"status": "live",
"version": 6,
"filesUploaded": 1,
"deployedAt": "2026-04-07T09:00:00.000Z",
"healthCheck": "staging + production passed"
}
Update Environment Variables
Set environment variables. No redeploy needed for Worker apps.
Request Body
{
"variables": [
{ "key": "API_KEY", "value": "secret123" },
{ "key": "DEBUG", "value": "false" }
]
}
To unset a variable, set its value to an empty string "".
Response
200 OK{
"updated": ["API_KEY", "DEBUG"],
"note": "App will use new values on next request (no redeploy needed)."
}
Get Logs
Retrieve recent log lines from the app's Worker.
Query Parameters
| Param | Type | Description |
|---|---|---|
| lines | number | Optional (default 50). Number of log lines to return. |
Example
curl "https://app.imblob.com/v1/apps/my-app/logs?lines=20" \
-H "Authorization: Bearer $BLOB_API_KEY"
Response
200 OK{
"app": "my-app",
"lines": 3,
"logs": [
{ "timestamp": "2026-04-07T09:00:00.000Z", "level": "error", "message": "Unhandled error" }
]
}
List Rollback Versions
List all available rollback versions for an app.
Example
curl "https://app.imblob.com/v1/apps/my-app/rollback" \
-H "Authorization: Bearer $BLOB_API_KEY"
Response
200 OK{
"app": "my-app",
"currentVersion": 5,
"versions": [
{ "version": 5, "deployedAt": "2026-04-07T09:00:00.000Z", "fileCount": 3, "size": "12.4KB" },
{ "version": 4, "deployedAt": "2026-04-06T14:00:00.000Z", "fileCount": 3, "size": "11.8KB" }
]
}
Rollback
Rollback to a previous deployment version.
Request Body
{ "version": 3 }
Response
200 OK{
"app": "my-app",
"url": "https://my-app.imblob.app",
"status": "rolled_back",
"rolledBackFrom": 5,
"newVersion": 6,
"deployedAt": "2026-04-07T09:00:00.000Z"
}
Rate Limits
| Limit | Value |
|---|---|
| Requests per API key | 100 / minute |
On rate limit exceeded, the response includes a Retry-After header:
{
"error": "Rate limit exceeded. Try again later.",
"retryAfter": 45
}
API Key Scopes
When creating an API key, choose which operations it can perform:
| Scope | Operations |
|---|---|
| apps:create | Create new apps |
| apps:read | Get app status |
| apps:deploy | Deploy files |
| apps:env:write | Update environment variables |
| apps:logs:read | Read app logs |
| apps:rollback | List and perform rollbacks |
| domains:write | Manage custom domains (not yet via REST) |
MCP vs REST
Use REST when
- CI/CD pipeline (GitHub Actions, GitLab CI)
- Deploy from a script or external tool
- Simpler integration without MCP overhead
Use MCP when
- You are an AI agent (Claude Code, Cursor)
- You need interactive features (screenshots, previews)
- You are managing container apps
Install MCP in Claude Code:
claude mcp add --transport http blob https://app.imblob.com/mcp
GitHub Actions Example
- name: Deploy to blob
run: |
curl -X POST "https://app.imblob.com/v1/apps/${ env.BLOB_APP }/deploys" \
-H "Authorization: Bearer ${ secrets.BLOB_API_KEY }" \
-H "Content-Type: application/json" \
-d '{
"files": [
{"path": "dist/index.html", "content": "${ steps.build.outputs.html }"},
{"path": "dist/bundle.js", "content": "${ steps.build.outputs.js }"}
],
"description": "Deploy from GitHub Actions"
}'
Set BLOB_APP and BLOB_API_KEY in your repository secrets.