Skip to Content
InstaHost

Concepts

Artifacts, access modes, credentials and lifetimes.

Artifacts, access and lifetimes

An artifact is either one file or a site (a directory with an index.html at its root). Its id is 26 characters from a-z and 2-7 (130 random bits), which is also a valid DNS label.

Status

StatusMeaningContent URLs answer
pendingCreated; waiting for its uploads and complete.404
publishedLive until expires_at (or forever when persistent).200
expiredPublished, and expires_at has passed. Not stored: computed on every request.410
failedPublication failed (uploads did not match the manifest, or the upload window ended). Create a new artifact.404
deletedDeleted by its owner.410
blockedTaken down by the operator.410

Deleted and expired artifacts keep a tombstone for 7 days, during which their URLs answer 410; after that, 404. Blocked tombstones are kept.

Access modes

AccessWho can open itNotes
unlisted (default)Anyone with the URL.X-Robots-Tag: noindex, nofollow. The id is unguessable, but anyone who has the URL can open it.
publicAnyone with the URL.No noindex: search engines may index it.
privateOnly with the access token.Files only. Sites cannot be private (422 private_sites_unsupported).

Lifetimes

  • Default lifetime: 1 day. Minimum: 1 minute.
  • Anonymous artifacts live at most 7 days. With an API key: up to 90 days, or persistent (never expires; allowed: yes).
  • expires_at is fixed at create, counted from creation (not from publication), and never changes.
  • Expiry, deletion and takedown take effect on the next request: content is never cached at the edge, and every request checks the artifact's current state.

Credentials

Every credential travels as Authorization: Bearer <token>. The API never uses cookies and never accepts a credential in the URL. The only exception is the access token of a private file, which the files host also accepts as ?token= so that a browser can open it.

CredentialFormatGrants
Delete tokenihd_ + 43 charactersManage one artifact: /uploads, /complete, the full GET, DELETE. Returned once by create.
API keyihk_ + 12-character id + _ + 43 charactersCreate as owner (longer lifetimes, persistence, higher limits); manage the artifacts it created. Issued by the operator.
Access tokeniha_ + 43 charactersRead one private file on the files host (header or ?token=). Returned once by create, with a ready-made access_url. Never accepted by the API.
Admin secretopaqueThe admin routes only.

Tokens are shown once; the service stores only their SHA-256 hashes and cannot show them again. A malformed, unknown or revoked ihk_ key is always 401 invalid_api_key; it never falls back to anonymous.