ప్రమాణీకరణ
బీయర్ టోకెన్గా API కీని పంపండి. కీ తప్పనిసరిగా sites.view అనుమతిని కలిగి ఉండాలి; అది లేని కీని 404 కాకుండా 403తో తిరస్కరిస్తారు.
ఈ ఎండ్పాయింట్ ఎలాంటి సంస్థ ఐడీని తీసుకోదు. మీ కీ ఇప్పటికే అది ఏ సంస్థకు చెందుతుందో గుర్తిస్తుంది మరియు ప్రతిస్పందన దానికే పరిమితం చేయబడుతుంది.
ప్రయత్నించండి
కోణీయ బ్రాకెట్లలో ఉన్న దేన్నైనా మీ స్వంత విలువలతో భర్తీ చేయండి, మరియు కీ ప్లేస్హోల్డర్ను మీ డాష్బోర్డ్ నుండి తీసుకున్న కీతో భర్తీ చేయండి.
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/subdomains \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string> }'సైన్ ఇన్ చేశారా? మీ డ్యాష్బోర్డ్లోని API కాన్సోల్ మీ అసలైన సంస్థ ID మరియు మీ స్వంత కీని నింపుతుంది, అలాగే మీరు అసలైన ప్రతిస్పందనను చూడటానికి లైవ్ API ద్వారా ఆభ్యర్థనను రన్ చేస్తుంది. ఈ ఎండ్పాయింట్ను API కన్సోల్లో తెరిచండి
వివరాలు
Adds one subdomain to the package. The effective ceiling is applied **before** the vendor is called: a package type that does not permit subdomains, and a customer who has used the last of their allowance, are both `422` with a sentence they can act on. ⛔ The response is the row **the platform stored**, not the name that was requested — the vendor normalises and namespaces it, so the client shows what came back. ⚖️ **On our own fleet this spends one of the plan's site slots** (owner ruling 2026-09-01), so the refusal at the cap is the same event as it is on site create and carries the same `SITE_QUOTA_EXCEEDED` code and figures. The row comes back `pending`: the DNS record, the virtual host and the chosen stack are built by a durable workflow, and the row reaches `active` when the name is serving. A build that cannot be done — a hostname whose DNS we do not control, or one this server's certificate cannot cover — lands in `failed` with the reason in `status_detail`. `404` for a site with no managed hosting package and no own-fleet placement. Requires `sites.view` and `sites.panel_access`.
పారామీటర్లు
| పేరు | రకం | కావలసినది | ఇది ఏమిటి |
|---|---|---|---|
siteId (path) | Uuid | అవును | Site ID (UUIDv7). |
అభ్యర్థన బాడీ
| పేరు | రకం | కావలసినది | ఇది ఏమిటి |
|---|---|---|---|
name | string | అవును | The subdomain to add. What the vendor actually created comes back in `SiteSubdomain.name`, and that — never this — is what the client shows. |
stack_type | string<static, php, wordpress, woocommerce> | కాదు | What the subdomain should run. ⚖️ Owner ruling 2026-09-01 — a new subdomain *"will start as whatever they select"*. `static` and `php` give an empty document root to upload or d… |
స్పందన
| పేరు | రకం | కావలసినది | ఇది ఏమిటి |
|---|---|---|---|
name | string | అవును | The subdomain as the platform stored it. ⛔ Not necessarily what was requested — a vendor normalises it, and the client shows this value. |
document_root | string | అవును | The folder it serves. Relative to the package root on a resold package; an absolute path on our own fleet, where it is read back from the server's own configuration rather than… |
stack_type | string | కాదు | What this subdomain runs, as the customer chose at creation. ⛔ **Empty on a resold package**, where the folder is the vendor's and there is no stack we chose — deliberately blan… |
status | string<pending, active, failed, deleting, > | కాదు | Where the build has got to. `pending` while the record, the virtual host and the stack are being put in place; `active` once the name serves; `deleting` after a delete, when the… |
status_detail | string | కాదు | Why it failed, or a note about a build that partly succeeded — a sentence written for the customer. Empty on a healthy row. |
ఈ ఎండ్పాయింట్ తిరిగి ఇవ్వగల లోపాలు
401 · 403 · 404 · 409 · 422 · 429 · 503