{"openapi":"3.1.0","info":{"title":"shipsite.sh API","version":"1.0.0","description":"Static site hosting for LLM agents: send files as JSON, get a live URL. Human-readable docs: https://shipsite.sh/docs. Full reference for agents: https://shipsite.sh/llm. Versioning: the version is in the URL path (/v1). Within /v1, changes are additive only: new endpoints, new optional request fields and new response fields can appear at any time, so ignore fields you do not know. A breaking change ships under a new path (/v2), never inside /v1. Deprecation: an endpoint or field that will be removed is announced in https://shipsite.sh/changelog at least 90 days before removal, and from that day its responses carry the Deprecation header (RFC 9745) and a Sunset header (RFC 8594) with the removal date. Nothing in /v1 is deprecated today. Rate limits: an account can deploy to 120 sites per hour (creates and updates). Every authenticated deploy response (POST /v1/sites, PUT /v1/sites/{id}) carries RateLimit-Policy (\"deploys\";q=120;w=3600) and RateLimit (\"deploys\";r=<remaining>;t=<seconds until quota frees up>), as in the IETF RateLimit header fields draft, plus the older RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. Over the limit the API answers 429 rate_limited with Retry-After in seconds. Reads and deletes are not limited.","contact":{"name":"shipsite.sh support","email":"support@shipsite.sh","url":"https://shipsite.sh/contact"},"termsOfService":"https://shipsite.sh/terms"},"externalDocs":{"description":"shipsite.sh API documentation","url":"https://shipsite.sh/docs"},"servers":[{"url":"https://api.shipsite.sh","description":"Production"}],"paths":{"/health":{"get":{"operationId":"getHealth","summary":"Health check","description":"Returns {status: ok} when the API is up. No authentication.","security":[],"responses":{"200":{"description":"The API is up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts":{"post":{"operationId":"createAccount","summary":"Create an account","description":"Creates an account with no authentication. Returns api_key (shown once) and a Stripe setup_url. The key is inert (402) until the user completes checkout at setup_url.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"claim_token":{"type":"string","description":"Optional. The claim token of a trial site, which moves to this account once payment is set up."}}}}}},"responses":{"201":{"description":"Account created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountCreated"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/me":{"get":{"operationId":"getAccount","summary":"Get the account","description":"Account status, active site count, and the state of each plan.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/me/keys":{"get":{"operationId":"listApiKeys","summary":"List API keys","description":"Every key on the account, newest first, with scope and expiry. Key values are never returned.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The account's keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyList"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createApiKey","summary":"Create an API key","description":"Creates a key, returned once. Optional scope and expiry.","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"scope":{"type":"string","enum":["full","deploy"],"default":"full","description":"\"deploy\" can only manage sites; everything else returns 403 insufficient_scope."},"expires_in":{"type":"integer","minimum":300,"maximum":31536000,"description":"Seconds until the key stops working (401 key_expired). Omit for a key that never expires."}}}}}},"responses":{"201":{"description":"Key created. Save api_key now; it is not shown again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewApiKey"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/me/keys/rotate":{"post":{"operationId":"rotateApiKey","summary":"Rotate an API key","description":"Creates a new key and revokes an old one in one call. The new key keeps the old key's scope.","security":[{"bearerAuth":[]}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"revoke_key_id":{"type":"string","description":"The id of the key to revoke. Defaults to the key making the request."},"expires_in":{"type":"integer","minimum":300,"maximum":31536000,"description":"Seconds until the new key stops working. Omit for a key that never expires."}}}}}},"responses":{"201":{"description":"New key created and old key revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyRotation"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/me/keys/{id}":{"delete":{"operationId":"revokeApiKey","summary":"Revoke an API key","description":"Revokes a key at once. The last working full-access key cannot be revoked (409 last_key).","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Key revoked","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyRevoked"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sites":{"get":{"operationId":"listSites","summary":"List sites","description":"The account's sites, newest first.","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":50}},{"name":"offset","in":"query","schema":{"type":"integer","minimum":0,"default":0}}],"responses":{"200":{"description":"A page of sites","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteList"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createSite","summary":"Create a site","description":"Deploys files and returns a live URL. With no Authorization header this creates a free trial site: 24 hours, up to 50 files and 5 MB, files only. The response then includes trial.claim_token (shown once).","security":[{"bearerAuth":[]},{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteInput"}}}},"responses":{"201":{"description":"Site created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}},"headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"429":{"description":"Too many deploys this hour (rate_limited), or the account is at its site limit (site_limit_reached).","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sites/claim":{"post":{"operationId":"claimSite","summary":"Claim a trial site","description":"Moves a trial site into this account. It keeps its expiry and loses its trial limits.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["claim_token"],"properties":{"claim_token":{"type":"string"}}}}}},"responses":{"200":{"description":"The site, now in this account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sites/{id}":{"get":{"operationId":"getSite","summary":"Get a site","description":"Site details: URL, file list, custom domains, expiry and the live deploy id.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The site","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"updateSite","summary":"Update a site","description":"Changes files, name, meta, ttl or password. Files left out are unchanged; set a file to null to delete it. A change to files goes live all at once.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteInput"}}}},"responses":{"200":{"description":"The updated site","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Site"}}},"headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"}}},"429":{"description":"Too many deploys this hour (rate_limited), or the account is at its site limit (site_limit_reached).","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"},"RateLimit":{"$ref":"#/components/headers/RateLimit"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteSite","summary":"Delete a site","description":"Deletes the site and its files at once, detaches its custom domains, and stops billing for it.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Site deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SiteDeleted"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sites/{id}/deploys":{"get":{"operationId":"listDeploys","summary":"List a site's deploys","description":"The versions of a site that are kept, newest first, each live, published or draft.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The site's deploys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeployList"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sites/{id}/rollback":{"post":{"operationId":"rollbackSite","summary":"Roll a site back","description":"Serves an earlier deploy again: the one published before the live one, or the one named by deploy. Nothing is deleted.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"deploy":{"type":"string","description":"A deploy id (dpl_...) from GET /v1/sites/{id}/deploys"}}}}}},"responses":{"200":{"description":"The site, serving the earlier deploy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Rollback"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sites/{id}/pin":{"post":{"operationId":"pinSite","summary":"Pin a site","description":"Removes auto-expiry. The site stays online, and billed, until it is deleted.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Site pinned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinState"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sites/{id}/unpin":{"post":{"operationId":"unpinSite","summary":"Unpin a site","description":"Makes a pinned site expire again: 24 hours from now, or after the optional ttl. Refused while custom domains are attached (409 site_has_domains).","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"ttl":{"$ref":"#/components/schemas/Ttl"}}}}}},"responses":{"200":{"description":"Site unpinned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PinState"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sites/{id}/domains":{"get":{"operationId":"listSiteDomains","summary":"List a site's custom domains","description":"Every custom domain attached to the site, with its status.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The site's custom domains","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainList"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"attachSiteDomain","summary":"Attach a custom domain","description":"Attaches a hostname the user owns. Requires the Custom Domains plan and a pinned site. Returns the DNS record to add and a next_step.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["hostname"],"properties":{"hostname":{"type":"string","description":"Hostname only, e.g. www.example.com"}}}}}},"responses":{"201":{"description":"Domain attached; add the returned DNS record, then poll its status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/sites/{id}/domains/{hostname}":{"get":{"operationId":"getSiteDomain","summary":"Check a custom domain","description":"The domain's status (pending_dns, pending_ssl, active, error). Poll until it is active.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"hostname","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The custom domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomain"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"detachSiteDomain","summary":"Detach a custom domain","description":"Removes the hostname from the site. The user should then delete its DNS record.","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"hostname","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Domain detached","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomDomainDeleted"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/domains/search":{"get":{"operationId":"searchDomains","summary":"Search for domains to buy","description":"Finds domains to buy, with prices. Results may be a few minutes out of date.","security":[{"bearerAuth":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","maxLength":100},"description":"Keyword, brand name, or domain"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":20,"default":10}}],"responses":{"200":{"description":"Matching domains","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainSearch"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/domains/check":{"get":{"operationId":"checkDomain","summary":"Check one domain's price","description":"Live availability, first-year price, and renewal price for one domain.","security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"query","required":true,"schema":{"type":"string"},"description":"Domain without www, e.g. example.com"}],"responses":{"200":{"description":"The domain's availability and price","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainCheck"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/domains":{"get":{"operationId":"listDomains","summary":"List bought domains","description":"Domains bought through shipsite on this account.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The account's domains","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchasedDomainList"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"buyDomain","summary":"Buy a domain","description":"Buys a domain and attaches it to a pinned site. Charges the card on file immediately at cost; not refundable once registered. Requires the Custom Domains plan.","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["domain","price","site_id"],"properties":{"domain":{"type":"string","description":"Domain without www, e.g. example.com"},"price":{"type":"number","description":"First-year price in US dollars the user agreed to, from /v1/domains/check"},"site_id":{"type":"string","description":"A pinned site to serve on the domain"},"auto_renew":{"type":"boolean","description":"Renew automatically each year. Defaults to true."},"contact":{"$ref":"#/components/schemas/RegistrantContact","description":"Optional. The user's own registrant details. Filed as a registrant change once the domain is registered."}}}}}},"responses":{"201":{"description":"Domain registered and attached; DNS and HTTPS are set up automatically","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchasedDomain"}}}},"202":{"description":"Purchase in progress; poll GET /v1/domains/{domain}","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchasedDomain"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/domains/{domain}":{"get":{"operationId":"getDomain","summary":"Check a domain purchase","description":"Where a purchase stands (charging, registering, configuring, active, failed). Poll until it is active.","security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchasedDomain"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"updateDomain","summary":"Turn auto-renew on or off","description":"Sets whether the domain renews automatically each year.","security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["auto_renew"],"properties":{"auto_renew":{"type":"boolean"}}}}}},"responses":{"200":{"description":"The domain","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchasedDomain"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/domains/{domain}/records":{"get":{"operationId":"listDnsRecords","summary":"List DNS records","description":"The DNS records of a domain bought through shipsite. Records marked managed serve the site and cannot be changed.","security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The domain's DNS records","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnsRecordList"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createDnsRecord","summary":"Add a DNS record","description":"Adds a record: email (MX, TXT), verification (TXT), or a subdomain (A, AAAA, CNAME). The domain itself and www cannot take an A, AAAA or CNAME record. Limited to 60 record changes per account per hour.","security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","name","content"],"properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT"]},"name":{"type":"string","description":"\"@\" for the domain itself, or the part before it, e.g. \"mail\""},"content":{"type":"string","description":"An IPv4 address (A), an IPv6 address (AAAA), a hostname (CNAME, MX), or the text (TXT)"},"priority":{"type":"integer","description":"MX only. Lower numbers are tried first. Defaults to 10."},"ttl":{"type":"integer","description":"Seconds, 60 to 86400. Omit to have it set automatically."}}}}}},"responses":{"201":{"description":"Record added; usually visible on the internet within a few minutes","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnsRecord"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/domains/{domain}/records/{record_id}":{"put":{"operationId":"replaceDnsRecord","summary":"Replace a DNS record","description":"Replaces a record. Send the whole record.","security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["type","name","content"],"properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT"]},"name":{"type":"string","description":"\"@\" for the domain itself, or the part before it, e.g. \"mail\""},"content":{"type":"string","description":"An IPv4 address (A), an IPv6 address (AAAA), a hostname (CNAME, MX), or the text (TXT)"},"priority":{"type":"integer","description":"MX only. Lower numbers are tried first. Defaults to 10."},"ttl":{"type":"integer","description":"Seconds, 60 to 86400. Omit to have it set automatically."}}}}}},"responses":{"200":{"description":"The replaced record","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnsRecord"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteDnsRecord","summary":"Delete a DNS record","description":"Deletes a record. Managed records cannot be deleted.","security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}},{"name":"record_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Record deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DnsRecordDeleted"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/domains/{domain}/contact-request":{"get":{"operationId":"getContactRequest","summary":"Get the latest registrant change","description":"The latest registrant contact change requested for a bought domain (waiting, open, done, rejected).","security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The latest request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createContactRequest","summary":"Request a registrant change","description":"Asks for the registrant contact of a bought domain to be changed. shipsite makes the change by hand, usually within 2 business days. A new request replaces an open one.","security":[{"bearerAuth":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["contact"],"properties":{"contact":{"$ref":"#/components/schemas/RegistrantContact"},"note":{"type":"string"}}}}}},"responses":{"202":{"description":"Request filed; poll GET on the same URL for its status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactRequest"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/accounts/me/plans/custom_domains":{"get":{"operationId":"getCustomDomainsPlan","summary":"Get the Custom Domains plan","description":"Whether the plan is active, its price, and when it is next invoiced or ends.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"The plan's state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Plan"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"enableCustomDomainsPlan","summary":"Enable the Custom Domains plan","description":"Enables the plan: $4.99 per billing period on the regular invoice, never prorated, nothing charged at enable time.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Plan was already active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChange"}}}},"201":{"description":"Plan enabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChange"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"cancelCustomDomainsPlan","summary":"Cancel the Custom Domains plan","description":"Cancels the plan at the end of the current billing period. Custom domains keep working until then.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Cancellation scheduled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanChange"}}}},"default":{"description":"Error. error.code says what went wrong; error.message says how to fix it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API key (sk_live_...) from POST /v1/accounts or POST /v1/accounts/me/keys. See https://shipsite.sh/auth.md."}},"headers":{"RateLimit-Policy":{"description":"The deploy quota, as a Structured Fields list: \"deploys\";q=120;w=3600 means 120 per 3600 seconds.","schema":{"type":"string"},"example":"\"deploys\";q=120;w=3600"},"RateLimit":{"description":"What is left of the deploy quota: r is the remaining count, t is the seconds until quota frees up.","schema":{"type":"string"},"example":"\"deploys\";r=119;t=3600"},"Retry-After":{"description":"Seconds to wait before sending the request again.","schema":{"type":"integer"},"example":60}},"schemas":{"SiteInput":{"type":"object","properties":{"files":{"type":"object","description":"Path → content. Text as plain strings, binary with \"base64:\" prefix. null deletes (PUT only).","additionalProperties":{"type":["string","null"]}},"name":{"type":["string","null"],"description":"Optional vanity slug (3–63 chars, lowercase, digits, hyphens)"},"meta":{"type":"object"},"ttl":{"$ref":"#/components/schemas/Ttl"},"publish":{"type":"boolean","description":"false holds the file changes back as an unpublished deploy; the response carries deploy.id. Default true."},"deploy":{"type":"string","description":"PUT only. The id of an unpublished deploy to add these files to. Without publish: false, the request publishes it."},"password":{"type":["string","null"],"minLength":6,"maxLength":128,"description":"Visitors must enter this to view the site (HTTP Basic auth, any username). null removes it (PUT only). Never returned; responses carry password_protected instead."}}},"Ttl":{"type":"integer","minimum":300,"maximum":31536000,"description":"Seconds from now until the site expires. Default 86400 (24 hours). On PUT, restarts the expiry clock; refused with 409 site_pinned on a pinned site."},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable machine-readable code, e.g. payment_required, rate_limited, validation_error, not_found"},"message":{"type":"string","description":"What went wrong and how to fix it"},"param":{"type":"string","description":"The request field the error is about"},"details":{"type":"object"},"setup_url":{"type":"string","description":"A Stripe checkout link for the user to open, when payment is what is missing"}}}}},"Health":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["ok"]}}},"AccountCreated":{"type":"object","required":["id","api_key","setup_url","status","message","next_step"],"properties":{"id":{"type":"string"},"api_key":{"type":"string","description":"Shown only once. Store it now."},"setup_url":{"type":"string","description":"Stripe checkout page for the user to open"},"status":{"type":"string","enum":["pending"]},"claimed_site":{"type":"string","description":"The trial site that moves to this account once payment is set up"},"message":{"type":"string"},"next_step":{"type":"string","description":"What to tell the user now, and what to do next"}}},"Account":{"type":"object","required":["id","email","status","active_sites","created_at","plans"],"properties":{"id":{"type":"string"},"email":{"type":"string"},"status":{"type":"string","enum":["pending","active","suspended"]},"active_sites":{"type":"integer"},"created_at":{"type":"string","description":"UTC timestamp"},"activated_at":{"type":["string","null"],"description":"UTC timestamp, or null"},"plans":{"type":"object","required":["custom_domains"],"properties":{"custom_domains":{"$ref":"#/components/schemas/Plan"}}}}},"Plan":{"type":"object","required":["plan","active","price_per_period","currency"],"properties":{"plan":{"type":"string","enum":["custom_domains"]},"active":{"type":"boolean"},"price_per_period":{"type":"number","description":"US dollars per billing period"},"currency":{"type":"string","enum":["usd"]},"since":{"type":["string","null"],"description":"UTC timestamp, or null"},"next_invoice_date":{"type":["string","null"],"description":"When the fee for the current period lands on the regular invoice"},"cancel_at":{"type":["string","null"],"description":"When the plan ends, if a cancellation is scheduled"}}},"PlanChange":{"allOf":[{"$ref":"#/components/schemas/Plan"},{"type":"object","required":["message"],"properties":{"charged_now":{"type":"number","description":"Always 0: the fee goes on the regular invoice"},"next_invoice":{"type":"object","properties":{"amount":{"type":"number"},"date":{"type":"string"}}},"message":{"type":"string"}}}]},"ApiKey":{"type":"object","required":["id","prefix","created_at","scope","expired"],"properties":{"id":{"type":"string"},"prefix":{"type":"string","description":"The first characters of the key, to tell keys apart"},"created_at":{"type":"string","description":"UTC timestamp"},"revoked_at":{"type":["string","null"],"description":"UTC timestamp, or null"},"scope":{"type":"string","enum":["full","deploy"]},"expires_at":{"type":["string","null"],"description":"UTC timestamp, or null"},"expired":{"type":"boolean"}}},"ApiKeyList":{"type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"$ref":"#/components/schemas/ApiKey"}}}},"NewApiKey":{"type":"object","required":["id","api_key","prefix","scope","created_at","warning"],"properties":{"id":{"type":"string"},"api_key":{"type":"string","description":"Shown only once. Store it now."},"prefix":{"type":"string"},"scope":{"type":"string","enum":["full","deploy"]},"expires_at":{"type":["string","null"],"description":"UTC timestamp, or null"},"created_at":{"type":"string","description":"UTC timestamp"},"warning":{"type":"string"}}},"KeyRotation":{"type":"object","required":["new_key","revoked_key"],"properties":{"new_key":{"$ref":"#/components/schemas/NewApiKey"},"revoked_key":{"$ref":"#/components/schemas/KeyRevoked"}}},"KeyRevoked":{"type":"object","required":["id","revoked"],"properties":{"id":{"type":"string"},"revoked":{"type":"boolean"}}},"DomainSummary":{"type":"object","required":["hostname","status"],"properties":{"hostname":{"type":"string"},"status":{"type":"string","enum":["pending_dns","pending_ssl","active","error"]}}},"Site":{"type":"object","required":["id","url","permanent_url","name","files","expires_at"],"properties":{"id":{"type":"string","description":"Site id (site_...)"},"url":{"type":"string","description":"Where the site is served: its name if it has one, otherwise its id"},"permanent_url":{"type":"string","description":"The URL at the site id, which never changes"},"name":{"type":["string","null"],"description":"Vanity slug, or null"},"files":{"type":"array","items":{"type":"string"},"description":"Paths of the files being served"},"meta":{"type":"object"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/DomainSummary"},"description":"Custom domains attached to the site"},"password_protected":{"type":"boolean"},"pinned":{"type":"boolean"},"expires_at":{"type":["string","null"],"description":"When the site is deleted. null for a pinned site."},"created_at":{"type":"string","description":"UTC timestamp"},"updated_at":{"type":["string","null"],"description":"UTC timestamp, or null"},"cost_per_day":{"type":"number","description":"US dollars per day while the site exists"},"deploy":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string","description":"Deploy id (dpl_...)"},"status":{"type":"string","enum":["live","draft"]}},"description":"The deploy this request made, or the live one. Absent when no files changed."},"trial":{"type":"object","description":"Present on a trial site (one deployed with no API key)","properties":{"claim_token":{"type":"string","description":"Shown only once, when the trial site is created"},"expires_at":{"type":["string","null"],"description":"UTC timestamp, or null"},"limits":{"type":"object","properties":{"max_files":{"type":"integer"},"max_bytes":{"type":"integer"},"max_deploys":{"type":"integer"}}}}},"message":{"type":"string"},"next_step":{"type":"string","description":"What to tell the user now, and what to do next"}}},"SiteList":{"type":"object","required":["sites","limit","offset"],"properties":{"sites":{"type":"array","items":{"$ref":"#/components/schemas/Site"}},"limit":{"type":"integer"},"offset":{"type":"integer"}}},"SiteDeleted":{"type":"object","required":["deleted","id"],"properties":{"deleted":{"type":"boolean"},"id":{"type":"string"},"removed_domains":{"type":"array","items":{"type":"string"},"description":"Custom domains that were detached"}}},"PinState":{"type":"object","required":["id","pinned","expires_at"],"properties":{"id":{"type":"string"},"pinned":{"type":"boolean"},"expires_at":{"type":["string","null"],"description":"UTC timestamp, or null"},"next_step":{"type":"string","description":"What to tell the user now, and what to do next"}}},"Deploy":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string","description":"Deploy id (dpl_...)"},"status":{"type":"string","enum":["live","published","draft"],"description":"live is being served; published was live earlier and can be rolled back to; draft has never been published"},"file_count":{"type":"integer"},"total_bytes":{"type":"integer"},"created_at":{"type":"string","description":"UTC timestamp"},"published_at":{"type":["string","null"],"description":"UTC timestamp, or null"}}},"DeployList":{"type":"object","required":["deploys","live_deploy"],"properties":{"deploys":{"type":"array","items":{"$ref":"#/components/schemas/Deploy"}},"live_deploy":{"type":["string","null"],"description":"The id of the deploy being served"}}},"Rollback":{"type":"object","required":["id","url","permanent_url","files","deploy"],"properties":{"id":{"type":"string"},"url":{"type":"string"},"permanent_url":{"type":"string"},"name":{"type":["string","null"]},"files":{"type":"array","items":{"type":"string"}},"deploy":{"type":"object","required":["id","status"],"properties":{"id":{"type":"string","description":"Deploy id (dpl_...)"},"status":{"type":"string","enum":["live","draft"]}}},"replaced_deploy":{"type":["string","null"],"description":"The deploy that was live before the rollback"},"pinned":{"type":"boolean"},"expires_at":{"type":["string","null"],"description":"UTC timestamp, or null"},"updated_at":{"type":"string","description":"UTC timestamp"}}},"CustomDomain":{"type":"object","required":["hostname","site_id","status","url","dns","next_step","check_url"],"properties":{"hostname":{"type":"string"},"site_id":{"type":"string"},"status":{"type":"string","enum":["pending_dns","pending_ssl","active","error"]},"url":{"type":"string"},"is_apex":{"type":"boolean","description":"True when the hostname is a domain itself, e.g. example.com rather than www.example.com"},"dns":{"type":"object","description":"The DNS record the user must add at their DNS provider","required":["type","name","full_name","value"],"properties":{"type":{"type":"string","enum":["CNAME"]},"name":{"type":"string"},"full_name":{"type":"string"},"value":{"type":"string"}}},"next_step":{"type":"string","description":"What to tell the user now, and what to do next"},"check_url":{"type":"string","description":"GET this to check the domain's status"},"error":{"type":"string","description":"Why the domain is in the error status"},"detail":{"type":"string","description":"What the domain is still waiting for"},"created_at":{"type":"string","description":"UTC timestamp"},"activated_at":{"type":["string","null"],"description":"UTC timestamp, or null"}}},"CustomDomainList":{"type":"object","required":["domains"],"properties":{"domains":{"type":"array","items":{"$ref":"#/components/schemas/CustomDomain"}}}},"CustomDomainDeleted":{"type":"object","required":["deleted","hostname","site_id"],"properties":{"deleted":{"type":"boolean"},"hostname":{"type":"string"},"site_id":{"type":"string"},"next_step":{"type":"string","description":"What to tell the user now, and what to do next"}}},"DomainOffer":{"type":"object","required":["domain","available","price","renewal_price","currency","purchasable"],"properties":{"domain":{"type":"string"},"available":{"type":"boolean"},"price":{"type":["number","null"],"description":"First-year price in US dollars"},"renewal_price":{"type":["number","null"],"description":"Price per year after the first, in US dollars"},"currency":{"type":"string","enum":["usd"]},"purchasable":{"type":"boolean","description":"True when the domain can be bought with POST /v1/domains"},"reason":{"type":"string","description":"Why the domain cannot be bought, when purchasable is false"}}},"DomainSearch":{"type":"object","required":["query","domains"],"properties":{"query":{"type":"string"},"domains":{"type":"array","items":{"$ref":"#/components/schemas/DomainOffer"}},"next_step":{"type":"string","description":"What to tell the user now, and what to do next"}}},"DomainCheck":{"allOf":[{"$ref":"#/components/schemas/DomainOffer"},{"type":"object","required":["next_step"],"properties":{"next_step":{"type":"string","description":"What to tell the user now, and what to do next"}}}]},"PurchasedDomain":{"type":"object","required":["domain","status","site_id","hostnames","price","renewal_price","currency","auto_renew","next_step","check_url"],"properties":{"domain":{"type":"string"},"status":{"type":"string","enum":["charging","registering","configuring","active","failed"]},"site_id":{"type":["string","null"],"description":"The site served on the domain"},"hostnames":{"type":"array","items":{"type":"string"},"description":"The domain and its www"},"price":{"type":"number","description":"What the first year cost, in US dollars"},"renewal_price":{"type":"number","description":"Price per year to renew, in US dollars"},"currency":{"type":"string","enum":["usd"]},"auto_renew":{"type":"boolean"},"expires_at":{"type":["string","null"],"description":"When the registration ends unless renewed"},"renewal":{"type":["object","null"],"description":"The next yearly renewal. null when the domain will not renew.","properties":{"status":{"type":"string","enum":["scheduled","notified","paid","renewed","lapsed","refunded","owed","expiring"]},"expires_on":{"type":"string"},"price":{"type":"number"},"charge_on":{"type":["string","null"],"description":"The day the card on file is charged"}}},"refunded":{"type":"boolean"},"registrant_request":{"type":["string","null"],"enum":["open","waiting",null],"description":"On purchase: where the registrant details sent with it stand"},"suspended":{"type":"boolean","description":"True when the domain was taken down for abuse"},"error":{"type":"string","description":"Why the purchase failed"},"next_step":{"type":"string","description":"What to tell the user now, and what to do next"},"check_url":{"type":"string","description":"GET this to check the purchase"},"created_at":{"type":"string","description":"UTC timestamp"},"registered_at":{"type":["string","null"],"description":"UTC timestamp, or null"}}},"PurchasedDomainList":{"type":"object","required":["domains"],"properties":{"domains":{"type":"array","items":{"$ref":"#/components/schemas/PurchasedDomain"}}}},"DnsRecord":{"type":"object","required":["id","type","name","full_name","content","ttl","managed"],"properties":{"id":{"type":"string"},"type":{"type":"string"},"name":{"type":"string","description":"\"@\" for the domain itself, or the part before it"},"full_name":{"type":"string"},"content":{"type":"string"},"ttl":{"oneOf":[{"type":"integer"},{"type":"string","enum":["auto"]}]},"priority":{"type":"integer","description":"MX only"},"managed":{"type":"boolean","description":"True for the records that serve the site, which cannot be changed"},"next_step":{"type":"string","description":"What to tell the user now, and what to do next"}}},"DnsRecordList":{"type":"object","required":["domain","records"],"properties":{"domain":{"type":"string"},"records":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecord"}},"next_step":{"type":"string","description":"What to tell the user now, and what to do next"}}},"DnsRecordDeleted":{"type":"object","required":["deleted","record"],"properties":{"deleted":{"type":"boolean"},"record":{"$ref":"#/components/schemas/DnsRecord"}}},"RegistrantContact":{"type":"object","required":["first_name","last_name","email","phone","address1","city","postal_code","country"],"properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"organization":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string","description":"International format, e.g. +14155550100"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string","description":"Two-letter country code, e.g. US"}}},"ContactRequest":{"type":"object","required":["id","domain","status","contact","created_at","next_step"],"properties":{"id":{"type":"string"},"domain":{"type":"string"},"status":{"type":"string","enum":["waiting","open","done","rejected"]},"contact":{"type":"object","description":"The registrant details that were requested, as sent"},"note":{"type":["string","null"],"description":"The note sent with the request"},"message":{"type":["string","null"],"description":"A note from shipsite about the request"},"created_at":{"type":"string","description":"UTC timestamp"},"resolved_at":{"type":["string","null"],"description":"UTC timestamp, or null"},"next_step":{"type":"string","description":"What to tell the user now, and what to do next"}}}}}}