Update Project Domain

Changes the project subdomain on the Zenifra platform.

PATCH /project/:id/domain

Path Parameters

ParameterTypeDescription
idstringProject ID (ObjectId)

Headers

HeaderRequiredDescription
x-api-keyYesProject API Key
x-organization-idYesActive project organization
Content-Type: application/jsonYesRequired because the request has a JSON body

Body

FieldTypeRequiredDescription
domainstringYesNew 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.com zone