REST API

Programmatic access to blob for CI/CD pipelines, scripts, and external tools.

Base URL: 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

  1. Sign up at imblob.com and subscribe to any plan
  2. Go to Settings → API Keys
  3. 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" }
StatusMeaning
400Bad request — invalid input
401Unauthorized — missing or invalid API key
403Forbidden — key lacks required scope
404Not found — app or resource doesn't exist
413Payload too large — upgrade your plan
429Rate limit exceeded — wait and retry
501Not implemented — use MCP interface instead
500Internal error — contact support

Create App

POST /v1/apps

Create a new app with all infrastructure (database, storage, KV).

Request Body

FieldTypeDescription
namestringRequired. 3–30 chars, lowercase letters, numbers, hyphens. Must start/end with alphanumeric.
templatestringstatic-site (default), full-stack, api-only
runtimestringworker (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 /v1/apps/<name>

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

POST /v1/apps/<name>/deploys

Deploy files to make an app live. Staging health check is run before production switches.

Request Body

FieldTypeDescription
filesarrayRequired. Array of { path, content } objects. At least one file required.
serverCodestringOptional. Custom server code for full-stack apps (JavaScript).
descriptionstringOptional. Changelog description shown in the dashboard.
previewbooleanOptional (default false). Deploy to staging URL first.
skip_checksbooleanOptional (default false). Skip the staging health check.
runtimestringOptional. 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"
}
Note: Container deploys are not supported via REST API. Use the MCP interface instead.

Update Environment Variables

PUT /v1/apps/<name>/env

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

GET /v1/apps/<name>/logs

Retrieve recent log lines from the app's Worker.

Query Parameters

ParamTypeDescription
linesnumberOptional (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

GET /v1/apps/<name>/rollback

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

POST /v1/apps/<name>/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

LimitValue
Requests per API key100 / minute

On rate limit exceeded, the response includes a Retry-After header:

429 Too Many Requests
{
  "error": "Rate limit exceeded. Try again later.",
  "retryAfter": 45
}

API Key Scopes

When creating an API key, choose which operations it can perform:

ScopeOperations
apps:createCreate new apps
apps:readGet app status
apps:deployDeploy files
apps:env:writeUpdate environment variables
apps:logs:readRead app logs
apps:rollbackList and perform rollbacks
domains:writeManage 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.