shipsite.sh API documentation

The shipsite.sh API is a REST API that puts a static website online: send the files as JSON, get a live HTTPS URL back. This page covers authentication, the endpoints, example requests, rate limits, errors and versioning.

Quick start

The first deploy needs no account and no API key. It makes a free trial site that stays online for 24 hours:

curl -X POST https://api.shipsite.sh/v1/sites \
  -H "Content-Type: application/json" \
  -d '{"files": {"index.html": "<h1>Hello</h1>"}}'

The response has the live url, and a trial.claim_token that is shown once. Use the token to update the trial site, or to move it into an account and keep it.

Authentication

Every other request carries an API key as a bearer token:

Authorization: Bearer sk_live_...

Get a key by creating an account. The key is returned once, and it does nothing (402 payment_required) until the account owner adds a card at the returned setup_url, a Stripe checkout page:

curl -X POST https://api.shipsite.sh/v1/accounts \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com"}'

A key is full (everything) or deploy (sites only, for CI), and can be given an expiry. The step-by-step version for agents is in auth.md. The hosted MCP server also accepts OAuth sign-in.

Deploy a site

curl -X POST https://api.shipsite.sh/v1/sites \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "files": {
      "index.html": "<h1>Hello</h1>",
      "style.css": "h1 { color: teal }",
      "logo.png": "base64:iVBORw0KGgo..."
    },
    "name": "my-project"
  }'

Text files are plain strings. Binary files are strings that start with base64:. The response:

{
  "id": "site_a7x9k2mq",
  "url": "https://my-project.shipsite.sh",
  "permanent_url": "https://site_a7x9k2mq.shipsite.sh",
  "files": ["index.html", "style.css", "logo.png"],
  "expires_at": "...",
  "cost_per_day": 0.1,
  "deploy": { "id": "dpl_...", "status": "live" },
  "next_step": "..."
}

A site expires after 24 hours unless you send a ttl or pin it with POST /v1/sites/{id}/pin. To update it, send the changed files to PUT /v1/sites/{id}; a file set to null is deleted. Many responses carry a next_step: a sentence that says what to tell the user and what to do next.

Endpoints

Every operation, with the operationId it has in the OpenAPI description. Request and response schemas are in openapi.json.

EndpointWhat it doesoperationId
GET /healthHealth checkgetHealth
POST /v1/accountsCreate an accountcreateAccount
GET /v1/accounts/meGet the accountgetAccount
GET /v1/accounts/me/keysList API keyslistApiKeys
POST /v1/accounts/me/keysCreate an API keycreateApiKey
POST /v1/accounts/me/keys/rotateRotate an API keyrotateApiKey
DELETE /v1/accounts/me/keys/{id}Revoke an API keyrevokeApiKey
GET /v1/sitesList siteslistSites
POST /v1/sitesCreate a sitecreateSite
POST /v1/sites/claimClaim a trial siteclaimSite
GET /v1/sites/{id}Get a sitegetSite
PUT /v1/sites/{id}Update a siteupdateSite
DELETE /v1/sites/{id}Delete a sitedeleteSite
GET /v1/sites/{id}/deploysList a site's deployslistDeploys
POST /v1/sites/{id}/rollbackRoll a site backrollbackSite
POST /v1/sites/{id}/pinPin a sitepinSite
POST /v1/sites/{id}/unpinUnpin a siteunpinSite
GET /v1/sites/{id}/domainsList a site's custom domainslistSiteDomains
POST /v1/sites/{id}/domainsAttach a custom domainattachSiteDomain
GET /v1/sites/{id}/domains/{hostname}Check a custom domaingetSiteDomain
DELETE /v1/sites/{id}/domains/{hostname}Detach a custom domaindetachSiteDomain
GET /v1/domains/searchSearch for domains to buysearchDomains
GET /v1/domains/checkCheck one domain's pricecheckDomain
GET /v1/domainsList bought domainslistDomains
POST /v1/domainsBuy a domainbuyDomain
GET /v1/domains/{domain}Check a domain purchasegetDomain
PATCH /v1/domains/{domain}Turn auto-renew on or offupdateDomain
GET /v1/domains/{domain}/recordsList DNS recordslistDnsRecords
POST /v1/domains/{domain}/recordsAdd a DNS recordcreateDnsRecord
PUT /v1/domains/{domain}/records/{record_id}Replace a DNS recordreplaceDnsRecord
DELETE /v1/domains/{domain}/records/{record_id}Delete a DNS recorddeleteDnsRecord
GET /v1/domains/{domain}/contact-requestGet the latest registrant changegetContactRequest
POST /v1/domains/{domain}/contact-requestRequest a registrant changecreateContactRequest
GET /v1/accounts/me/plans/custom_domainsGet the Custom Domains plangetCustomDomainsPlan
POST /v1/accounts/me/plans/custom_domainsEnable the Custom Domains planenableCustomDomainsPlan
DELETE /v1/accounts/me/plans/custom_domainsCancel the Custom Domains plancancelCustomDomainsPlan

Errors

An error is a JSON object with a stable code and a message that says what went wrong and how to fix it:

{
  "error": {
    "code": "payment_required",
    "message": "This account has no payment card yet...",
    "setup_url": "https://checkout.stripe.com/..."
  }
}

Common codes: validation_error (400), unauthorized (401), payment_required (402), insufficient_scope (403), not_found (404), rate_limited (429).

Rate limits

An account can deploy to 120 sites per hour, counting creates and updates. Reads and deletes are not limited. Every deploy response (POST /v1/sites with a key, and PUT /v1/sites/{id}) says where the account stands:

RateLimit-Policy: "deploys";q=120;w=3600
RateLimit: "deploys";r=119;t=3600
RateLimit-Limit: 120
RateLimit-Remaining: 119
RateLimit-Reset: 3600

RateLimit-Policy and RateLimit follow the IETF draft RateLimit header fields for HTTP: q is the quota, w the window in seconds, r what is left, and t the seconds until quota frees up. The three RateLimit-* fields carry the same numbers for older clients. Over the limit, the API answers 429 rate_limited with a Retry-After header in seconds.

Other limits: 1,000 active sites per account, 500 files and 15 MB per request, 10 MB per file, 1,000 files and 100 MB per site, and 60 DNS record changes per account per hour. A trial site is limited to 50 files, 5 MB and 20 deploys, with 3 trial sites per network address per day.

Versioning and deprecation

The API version is in the URL path: /v1.

Machine-readable descriptions

Help

Email support@shipsite.sh, or see the contact page.