Create Certificate

Create a certificate in your site

POST api/servers/{server}/sites/{site}/certificates

Parameters

Parameter Type Status Description
certificate string required The domain you want to request a certificate for
type string required Possible values: 'letsencrypt'

Example request:

curl -X POST "https://ploi.io/api/servers/{server}/sites/{site}/certificates" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
   --data '{"certificate":"domain.com", "type":"letsencrypt"}'

Example response:

HTTP/1.1 201 CREATED
Content-Type: application/json

{
    "data": {
        "id": 1,
        "status": "created",
        "domain": "domain.com",
        "site_id": 1,
        "server_id": 1,
        "expires_at": null,
        "created_at": "2019-07-31 08:34:25"
    }
}