Ploi API
Ploi API

Install Statamic

This endpoint allows you to install Statamic to your website

POST api/servers/{server}/sites/{id}/statamic


Parameter Type Status Description
type string optional When set to repository, it will also require repository details
provider string required when type is set to repository The repository provider uses, could be any of: github, bitbucket, gitlab, you will need to have either of these providers attached to your profile
name string required when type is set to repository The name for your new repository
private boolean optional when setting type to repository, defaults to false Whether your new repository should be private
description string optional when type is set to repository The description for your new repository
installation_type string optional when type is set to repository, defaults to default Use any of the starter kits, more info on those:, more info on the available values below

Installation type values

Value Description
default Default's to a clean Statamic installation
This call could potentially take longer than usual. This is because the repository is being created inside this request for validation reasons via the API of the Git provider which might be slower at times.

Example request:

curl -X POST "{server}/sites/{id}/statamic" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"   
    --data '{"type": "repository", "name": "my_new_repository", "private": true, "description": "My new awesome Statamic installation"}'

Example response:

HTTP/1.1 200 OK
Content-Type: application/json

    "data": {
        "id": 1,
        "status": "statamic-installing",
        "server_id": 1,
        "domain": "",
        "test_domain": null,
        "deploy_script": false,
        "web_directory": "/public",
        "project_type": "statamic",
        "project_root": "/",
        "last_deploy_at": null,
        "system_user": "ploi",
        "php_version": 7.4,
        "health_url": null,
        "has_repository": false,
        "zero_downtime_deployment": false,
        "fastcgi_cache": false,
        "created_at": "2021-01-01 00:00:00"
    "message": "Statamic is being installed"