Create tenant

Adds a tenant to your site.


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

Create a tenant

Adds one or more tenants to the specified site.

Required attributes

  • Name
    tenants
    Type
    array
    Description

    An array containing all the tenants you want to add.

Request

POST
/api/servers/{server}/sites/{site}/tenants
curl -X POST "https://ploi.io/api/servers/{server}/sites/{site}/tenants" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "tenants": ["example.com"]
  }'

Response

{
  "data": {
    "tenants": [
      "anotherdomain.com",
      "example.com"
    ],
    "count": 2,
    "main": "example.com"
  }
}