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.
- Base URL:
https://api.shipsite.sh - OpenAPI 3.1 description: shipsite.sh/openapi.json (also at api.shipsite.sh/openapi.json)
- The same reference as plain text for an AI agent: shipsite.sh/llms.txt
- Other ways in: the shipsite.sh MCP server and the shipsite CLI and GitHub Action
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.
| Endpoint | What it does | operationId |
|---|---|---|
GET /health | Health check | getHealth |
POST /v1/accounts | Create an account | createAccount |
GET /v1/accounts/me | Get the account | getAccount |
GET /v1/accounts/me/keys | List API keys | listApiKeys |
POST /v1/accounts/me/keys | Create an API key | createApiKey |
POST /v1/accounts/me/keys/rotate | Rotate an API key | rotateApiKey |
DELETE /v1/accounts/me/keys/{id} | Revoke an API key | revokeApiKey |
GET /v1/sites | List sites | listSites |
POST /v1/sites | Create a site | createSite |
POST /v1/sites/claim | Claim a trial site | claimSite |
GET /v1/sites/{id} | Get a site | getSite |
PUT /v1/sites/{id} | Update a site | updateSite |
DELETE /v1/sites/{id} | Delete a site | deleteSite |
GET /v1/sites/{id}/deploys | List a site's deploys | listDeploys |
POST /v1/sites/{id}/rollback | Roll a site back | rollbackSite |
POST /v1/sites/{id}/pin | Pin a site | pinSite |
POST /v1/sites/{id}/unpin | Unpin a site | unpinSite |
GET /v1/sites/{id}/domains | List a site's custom domains | listSiteDomains |
POST /v1/sites/{id}/domains | Attach a custom domain | attachSiteDomain |
GET /v1/sites/{id}/domains/{hostname} | Check a custom domain | getSiteDomain |
DELETE /v1/sites/{id}/domains/{hostname} | Detach a custom domain | detachSiteDomain |
GET /v1/domains/search | Search for domains to buy | searchDomains |
GET /v1/domains/check | Check one domain's price | checkDomain |
GET /v1/domains | List bought domains | listDomains |
POST /v1/domains | Buy a domain | buyDomain |
GET /v1/domains/{domain} | Check a domain purchase | getDomain |
PATCH /v1/domains/{domain} | Turn auto-renew on or off | updateDomain |
GET /v1/domains/{domain}/records | List DNS records | listDnsRecords |
POST /v1/domains/{domain}/records | Add a DNS record | createDnsRecord |
PUT /v1/domains/{domain}/records/{record_id} | Replace a DNS record | replaceDnsRecord |
DELETE /v1/domains/{domain}/records/{record_id} | Delete a DNS record | deleteDnsRecord |
GET /v1/domains/{domain}/contact-request | Get the latest registrant change | getContactRequest |
POST /v1/domains/{domain}/contact-request | Request a registrant change | createContactRequest |
GET /v1/accounts/me/plans/custom_domains | Get the Custom Domains plan | getCustomDomainsPlan |
POST /v1/accounts/me/plans/custom_domains | Enable the Custom Domains plan | enableCustomDomainsPlan |
DELETE /v1/accounts/me/plans/custom_domains | Cancel the Custom Domains plan | cancelCustomDomainsPlan |
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.
- Within /v1, changes are additive. New endpoints, new optional request fields and new response fields can appear at any time. Ignore response fields you do not know.
- A breaking change gets a new path. Removing or renaming a field, changing a type, or changing what a call does ships as
/v2, never inside/v1. - Deprecations are announced at least 90 days ahead. An endpoint or field that will be removed is listed in the changelog, and from that day its responses carry a
Deprecationheader (RFC 9745) and aSunsetheader (RFC 8594) with the removal date. - Nothing in
/v1is deprecated today.
Machine-readable descriptions
- /openapi.json: OpenAPI 3.1, with an operationId and typed request and response schemas for every operation
- /.well-known/api-catalog: API catalog (RFC 9727)
- /llms.txt and /llms-full.txt: the full reference as plain text
- /auth.md: how an agent gets credentials
- /.well-known/agent-skills/index.json: agent skills
Help
Email support@shipsite.sh, or see the contact page.