API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console

POST /v1/webspaces/{id}/subdomains

POST/v1/webspaces/{id}/subdomains

Create a subdomain for a webspace

Data model

This operation works on the entity webspace (webspace). All 32 fields — type, validation, required status, relationships — are listed in the schema reference.

Request body

NameTypeDescription
namerequiredstring
documentRootstring
typestring
redirectUrlstring
redirectTypeinteger
tagsstring[]

Path parameters

NameTypeDescription
idrequiredstring

Example

curl -X POST https://api.codemeta-os.de/v1/webspaces/{id}/subdomains \
  -H "X-Tenant-Id: $TENANT" \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
  "name": "string",
  "documentRoot": "/httpdocs",
  "type": "subdomain",
  "redirectUrl": "string",
  "redirectType": 301,
  "tags": []
}'
const result = await cm.webspaces.post({
  "name": "string",
  "documentRoot": "/httpdocs",
  "type": "subdomain",
  "redirectUrl": "string",
  "redirectType": 301,
  "tags": []
});

Response codes

HTTP Meaning
201 Default Response

Search