Zenifra API
Complete documentation of the Zenifra REST API for project management via API Key.
Zenifra API
The Zenifra API allows you to manage your projects programmatically. All endpoints listed in this documentation use API Key authentication (header x-api-key).
Authentication
To use the API, you need to include the x-api-key header in all requests. The API Key can be found in your project settings in the console.
Required Header
| Header | Description |
|---|---|
x-api-key | Your project API Key |
Base URL
All requests should be made to:
https://api.zenifra.com/v1Request Example
curl -X GET "https://api.zenifra.com/v1/project/{id}/metrics" \
-H "x-api-key: your-api-key-here"Available Endpoints
Project Management
| Endpoint | Description |
|---|---|
| Update Deploy Image | Update the Docker image of the project |
| Metrics and Logs | Get metrics and logs of the project |
| Project Information | Update name and description |
| Environment Variables | Manage environment variables |
| Domain | Update project subdomain |
| Lifecycle | Stop and resume the project |
| Plan | Change project plan |
| Storage | Manage storage |
HTTP Status Codes
| Code | Description |
|---|---|
200 | Request successful |
400 | Invalid or malformed data |
401 | Invalid or missing API Key |
404 | Project not found |
500 | Internal server error |
Usage Examples
Python
import requests
API_KEY = "your-api-key"
BASE_URL = "https://api.zenifra.com/v1"
headers = {
"x-api-key": API_KEY,
"Content-Type": "application/json"
}
# Get project metrics
response = requests.get(
f"{BASE_URL}/project/507f1f77bcf86cd799439011/metrics",
headers=headers
)
print(response.json())Node.js
const axios = require('axios');
const API_KEY = 'your-api-key';
const BASE_URL = 'https://api.zenifra.com/v1';
const headers = {
'x-api-key': API_KEY,
'Content-Type': 'application/json'
};
async function getMetrics(projectId) {
const response = await axios.get(
`${BASE_URL}/project/${projectId}/metrics`,
{ headers }
);
return response.data;
}
getMetrics('507f1f77bcf86cd799439011')
.then(console.log)
.catch(console.error);FAQ
Where do I find my project's API Key and Project ID?
Important: Both the API Key and Project ID are shown only once, at the time of project creation. After this initial screen, it is no longer possible to access them through the console.
Therefore, store this information in a safe place immediately after creating your project.
Can I use the API Key for any project?
Yes, each project has its own API Key. The key grants access only to the specific project it belongs to.
Do the endpoints have rate limiting?
Yes, the API has rate limiting to ensure stability. If you exceed the limit, you will receive 429 (Too Many Requests) errors.