Logo ZenifraZenifra

Project Information

Learn how to update your project's name and description via API.

Update Project Name

Changes the project name.

PATCH /project/:id/name

Path Parameters

ParameterTypeDescription
idstringProject ID (ObjectId)

Body

FieldTypeRequiredDescription
namestringYesNew project name (minimum 6 characters, maximum 32, lowercase letters and numbers only, hyphens allowed)

Example

{
  "name": "my-new-project"
}

Response

{
  "status": "success",
  "data": {
    "id": "507f1f77bcf86cd799439011",
    "name": "my-new-project"
  }
}

Update Project Description

Changes the project description.

PATCH /project/:id/description

Path Parameters

ParameterTypeDescription
idstringProject ID (ObjectId)

Body

FieldTypeRequiredDescription
descriptionstringNoNew project description (maximum 256 characters)

Response

{
  "status": "success",
  "message": "Description updated"
}

Examples

Update Name

curl -X PATCH "https://api.zenifra.com/v1/project/507f1f77bcf86cd799439011/name" \
  -H "x-api-key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-new-project"}'

Update Description

curl -X PATCH "https://api.zenifra.com/v1/project/507f1f77bcf86cd799439011/description" \
  -H "x-api-key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"description": "My web application in production"}'

Python

import requests

API_KEY = "your-api-key"
PROJECT_ID = "507f1f77bcf86cd799439011"

headers = {"x-api-key": API_KEY}

# Update name
requests.patch(
    f"https://api.zenifra.com/v1/project/{PROJECT_ID}/name",
    headers=headers,
    json={"name": "my-new-project"}
)

# Update description
requests.patch(
    f"https://api.zenifra.com/v1/project/{PROJECT_ID}/description",
    headers=headers,
    json={"description": "My web application in production"}
)