Create webspace
POST/v1/webspaces
Create a new webspace in the active tenant.
Data model
This operation works on the entity webspace (webspace). All 32 fields — type, validation, required status, relationships — are listed in the schema reference.
-
Required fields:
domainName,dnsMode -
Server-managed:
_id,schema,schemaVersion,tenantId,version,createdAt,updatedAt,createdBy,updatedBy,deletedAt,deletedBy,webspaceNumber,pleskDomainId,pleskClientLogin,pleskServerId,dnsMode,status— the platform assigns these fields; they are discarded in the request.
Request body
| Name | Type | Description |
|---|---|---|
domainNamerequired | string | |
hostingType | string | |
dnsModerequired | string | |
pleskServerId | string | |
preferredRegion | string | |
plan | string | |
partyIdrequired | string | |
assignedToId | string | |
phpVersion | string | |
phpMode | string | |
documentRoot | string | |
diskQuotaGb | integer | |
billingEnabled | boolean | |
billingPriceCents | integer | |
tags | string[] |
Example
curl -X POST https://api.codemeta-os.de/v1/webspaces \
-H "X-Tenant-Id: $TENANT" \
-H "Content-Type: application/json" \
-b cookies.txt \
-d '{
"domainName": "string",
"hostingType": "webspace",
"dnsMode": "inwx",
"pleskServerId": "string",
"preferredRegion": "string",
"plan": "string",
"partyId": "string",
"assignedToId": "string",
"phpVersion": "8.3",
"phpMode": "fpm",
"documentRoot": "/httpdocs",
"diskQuotaGb": 10,
"billingEnabled": false,
"billingPriceCents": 0,
"tags": []
}'const result = await cm.webspaces.post({
"domainName": "string",
"hostingType": "webspace",
"dnsMode": "inwx",
"pleskServerId": "string",
"preferredRegion": "string",
"plan": "string",
"partyId": "string",
"assignedToId": "string",
"phpVersion": "8.3",
"phpMode": "fpm",
"documentRoot": "/httpdocs",
"diskQuotaGb": 10,
"billingEnabled": false,
"billingPriceCents": 0,
"tags": []
});Response codes
| HTTP | Meaning |
|---|---|
202 |
Default Response |