Update Project Domain
Changes the project subdomain on the Zenifra platform.
PATCH /project/:id/domainPath Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Project ID (ObjectId) |
Headers
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Project API Key |
x-organization-id | Yes | Active project organization |
Content-Type: application/json | Yes | Required because the request has a JSON body |
Body
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | Yes | New subdomain (minimum 6 characters, maximum 32, lowercase letters only, hyphens allowed) |
Example
{
"domain": "my-subdomain"
}Response
{
"status": "success",
"message": "updated with success"
}Examples
curl -X PATCH "https://api.zenifra.com/v1/project/507f1f77bcf86cd799439011/domain" \
-H "x-api-key: your-api-key" \
-H "x-organization-id: your-organization-id" \
-H "Content-Type: application/json" \
-d '{"domain": "my-subdomain"}'Python
import requests
API_KEY = "your-api-key"
ORGANIZATION_ID = "your-organization-id"
PROJECT_ID = "507f1f77bcf86cd799439011"
response = requests.patch(
f"https://api.zenifra.com/v1/project/{PROJECT_ID}/domain",
headers={"x-api-key": API_KEY, "x-organization-id": ORGANIZATION_ID},
json={"domain": "my-subdomain"}
)
print(response.json())Domain Rules
- Minimum of 6 characters
- Maximum of 32 characters
- Lowercase letters and hyphens only
- Cannot start or end with hyphen
- The resulting Zenifra default domain uses the
clients.zenifra.comzone