The pages.sr.ht API is a convenience wrapper around the GraphQL API and allows one to easily publish a site with tools like curl.

API endpoints

The following endpoints are available to users with an OAuth2 token valid for the specified scope.

POST /publish/:domain

Scopes: PAGES:RW

Publish a site.

The request body must use the multipart/form-data content type. The following fields are supported:

  • content (required): a .tar.gz file containing the new site content.
  • protocol: select which protocol variant of the site to update. If unset, defaults to HTTPS.

A sub-directory can be appended to the URL (e.g. /publish/example.org/subdir) in which case only the specified sub-directory is updated. The rest of the files are left unchanged.

The response contains the new site version as plain-text.

About this wiki

commit aa91af4fa09eb84be3388f5d8ff4c5bb3059ae5e
Author: Runxi Yu <me@runxiyu.org>
Date:   2025-03-15T15:39:35+08:00

lists.sr.ht: HTML emails are rejected by most lists, not always

Signed-off-by: Runxi Yu <me@runxiyu.org>
References: https://git.sr.ht/~sircmpwn/lists.sr.ht/commit/d2470931a39c6816db9427abfd03b3b3093987e3
Clone this wiki
https://git.sr.ht/~sircmpwn/sr.ht-docs (read-only)
git@git.sr.ht:~sircmpwn/sr.ht-docs (read/write)