The Forge REST API



Forge has a basic REST API currently, which we created to enable our CLI tool and to test automated deployments from our sketch builder concept.

It’s basic and we need to extend it along the same lines as our Health platform with proper Developer accounts etc.

But, since it’s there, you can use it too, for all manner of static site hosting ideas…


First, you need to login your user (they need to have an existing account from Forge


curl -X POST "" \
 -H "Content-Type: application/json" \
 -H "Cache-Control: no-cache" \
 -d '{
    "email": "YOUR_EMAIL",
    "password": "YOUR_PASSWORD"

Response Example:


You’ll want to store the token somewhere safe for further requests to the user account.

Fetch Sites

You’ll probably want to retrieve a list of the Forge users sites at some stage, in order for User to select a site to perform some action.

You can do that like this…


curl -X GET -H "Content-Type: application/json" \ 
-H "Cache-Control: no-cache" \  

Publish Site

You can upload an archive (.zip) of your site to publish on Forge. You need to specify the site you wish to deploy to in the params, along with the user token. The site should be submitted as multipart form data.


Since multipart form data via cURL is a bit fiddly, here’s what it would look like via Postman REST Client

Forge REST API v2

EDIT: Instead of using param site, use archive, when uploading your zip file