Blinkhost
Docs

Blinkhost API and UI reference

This page documents the endpoints Blinkhost already serves today and the actions already wired into the current UI. The homepage copies the same setup prompt available at https://blinkhost.co.in/setup-instructions.txt.

Base URL: https://blinkhost.co.in/v1
Auth: session cookie for the web UI, or Authorization: Bearer blk_... for API-key backed requests.

Install

Install Blinkhost in the agent environment first:

curl -fsSL https://blinkhost.co.in/install.sh | bash

Skill bundle

The install flow serves these files from the same origin:

  • /skill/VERSION
  • /skill/blinkhost/SKILL.md
  • /skill/blinkhost/references/REFERENCE.md
  • /skill/blinkhost/scripts/publish.sh

UI today

  • / shows the landing page and copies the setup prompt.
  • /login sends a magic-link login request.
  • /dashboard lists stored sites and versions for the signed-in account.
  • The dashboard already supports bulk deployment deletion through POST https://blinkhost.co.in/v1/dashboard/deployments/delete.
  • The dashboard log-out button already calls POST https://blinkhost.co.in/v1/auth/logout.

Publish flow

  1. Create a site with a file manifest using POST https://blinkhost.co.in/v1/sites.
  2. Upload each file to the returned one-time put_url.
  3. Finalize the version with POST https://blinkhost.co.in/v1/sites/:slug/finalize.
  4. If an upload URL expires before the file is uploaded, request a fresh one with POST https://blinkhost.co.in/v1/sites/:slug/refresh-uploads.
curl -sS https://blinkhost.co.in/v1/sites \
  -H 'content-type: application/json' \
  -d '{
    "files": [
      {
        "path": "index.html",
        "sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
        "size_bytes": 128,
        "content_type": "text/html; charset=utf-8"
      }
    ]
  }'

API reference

GET https://blinkhost.co.in/v1/health

Health check for the platform service.

{
  "ok": true,
  "service": "blinkhost-platform",
  "node_env": "production",
  "time": "2026-03-26T00:00:00.000Z"
}
POST https://blinkhost.co.in/v1/auth/login

Starts the email magic-link flow used by the login page.

{
  "email": "you@example.com"
}
GET https://blinkhost.co.in/v1/auth/verify?token=...

Consumes a magic-link token, sets the session cookie, and redirects to /dashboard.

POST https://blinkhost.co.in/v1/auth/logout

Clears the current session cookie.

GET https://blinkhost.co.in/v1/auth/me

Returns the signed-in account when the request has a valid session cookie or Bearer API key.

GET https://blinkhost.co.in/v1/api-keys

Lists active API keys for the current signed-in account.

POST https://blinkhost.co.in/v1/api-keys

Creates a new API key for the current signed-in account.

{
  "name": "local agent"
}
DELETE https://blinkhost.co.in/v1/api-keys/:id

Revokes one API key owned by the current signed-in account.

POST https://blinkhost.co.in/v1/sites

Creates a new site and returns the upload sessions for the first version.

Anonymous requests can send ttl_seconds. Authenticated requests get a long-lived site automatically.

{
  "files": [
    {
      "path": "index.html",
      "sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
      "size_bytes": 128,
      "content_type": "text/html; charset=utf-8"
    }
  ],
  "ttl_seconds": 86400
}
PUT https://blinkhost.co.in/v1/uploads/:uploadId?token=...

Uploads the raw file bytes for one manifest entry. The request body must exactly match the manifest size and SHA-256 hash.

GET https://blinkhost.co.in/v1/sites/:slug

Returns public metadata for one site.

PUT https://blinkhost.co.in/v1/sites/:slug

Creates a replacement version for an existing site. Requires the site manage_token.

{
  "manage_token": "site-manage-token",
  "files": [
    {
      "path": "index.html",
      "sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
      "size_bytes": 128,
      "content_type": "text/html; charset=utf-8"
    }
  ]
}
POST https://blinkhost.co.in/v1/sites/:slug/finalize

Marks a version live after all uploads complete.

{
  "manage_token": "site-manage-token",
  "version_id": "ver_123"
}
POST https://blinkhost.co.in/v1/sites/:slug/refresh-uploads

Refreshes upload URLs for unfinished files in a pending version.

{
  "manage_token": "site-manage-token",
  "version_id": "ver_123",
  "paths": ["index.html"]
}
DELETE https://blinkhost.co.in/v1/sites/:slug

Deletes a site. Requires the site manage_token.

{
  "manage_token": "site-manage-token"
}
GET https://blinkhost.co.in/manage/:token

Looks up site status from the manage token returned on site creation.

POST https://blinkhost.co.in/v1/dashboard/deployments/delete

Bulk deletion endpoint used by the current dashboard UI for selected deployments.

{
  "slugs": ["blue-river-12", "amber-sky-8453"]
}

What the agent should return

After publish, the expected output is the live URL plus any manage URL or local state path Blinkhost gives back.