POST /v1/hosting-plans
POST/v1/hosting-plans
Create a hosting plan
Data model
This operation works on the entity hosting_plan (hosting_plan). All 16 fields — type, validation, required status, relationships — are listed in the schema reference.
-
Required fields:
name,diskQuotaGb,bandwidthQuotaGbMonth,maxEmailAccounts,maxDatabases,maxFtpUsers,maxSubdomains,phpVersions,defaultPhpVersion,phpMode,features,monthlyPriceCents -
Server-managed:
_id,schema,schemaVersion,tenantId,version,createdAt,updatedAt,createdBy,updatedBy,deletedAt,deletedBy— the platform assigns these fields; they are discarded in the request.
Request body
| Name | Type | Description |
|---|---|---|
namerequired | string | |
description | string | |
diskQuotaGbrequired | integer | |
bandwidthQuotaGbMonthrequired | integer | |
maxEmailAccountsrequired | integer | |
maxDatabasesrequired | integer | |
maxFtpUsersrequired | integer | |
maxSubdomainsrequired | integer | |
phpVersions | string[] | |
defaultPhpVersion | string | |
phpMode | string | |
priceCents | integer | |
diskOveragePerGbCents | integer | |
preferredServerType | string | |
isActive | boolean |
Example
curl -X POST https://api.codemeta-os.de/v1/hosting-plans \
-H "X-Tenant-Id: $TENANT" \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"name": "string",
"description": "string",
"diskQuotaGb": 0,
"bandwidthQuotaGbMonth": 0,
"maxEmailAccounts": 0,
"maxDatabases": 0,
"maxFtpUsers": 0,
"maxSubdomains": 0,
"phpVersions": [],
"defaultPhpVersion": "string",
"phpMode": "string",
"priceCents": 0,
"diskOveragePerGbCents": 0,
"preferredServerType": "any",
"isActive": true
}'const result = await cm.hosting-plans.post({
"name": "string",
"description": "string",
"diskQuotaGb": 0,
"bandwidthQuotaGbMonth": 0,
"maxEmailAccounts": 0,
"maxDatabases": 0,
"maxFtpUsers": 0,
"maxSubdomains": 0,
"phpVersions": [],
"defaultPhpVersion": "string",
"phpMode": "string",
"priceCents": 0,
"diskOveragePerGbCents": 0,
"preferredServerType": "any",
"isActive": true
});Response codes
| HTTP | Meaning |
|---|---|
201 |
Default Response |