Appearance
Zal Pro API Documentation
Base URL:
https://your-domain.com
Overview
Complete API documentation for the Zal Pro ISP Management System.
The Zal Pro API lets you integrate external systems with your Zal Pro installation to manage subscribers and support tickets programmatically.
🆕 New: API v1
A much larger v1 API is now available — activation & billing, packages, network, resellers/staff/admins, roles & permissions, and more — under the /api/v1/ prefix. This page documents the original (legacy) endpoints, which remain unchanged.
Important
All API endpoints require HTTP Basic Authentication, and the API must be enabled in your Zal Pro admin panel first. See Authentication before making any request.
Authentication
Zal Pro uses HTTP Basic Authentication. Every request must include an Authorization header built from the API username and API password configured in your admin panel (Settings → Others API & Server Settings).
http
Authorization: Basic base64(api_username:api_password)Most HTTP clients build this header for you — for example, cURL with the -u flag:
bash
curl -u "your_api_username:your_api_password" \
"https://your-domain.com/api/user/users"Before you start
- Log in to Zal Pro as an admin.
- Go to Settings → Others API & Server Settings.
- Enable the API, set an API username and API password.
- (Optional) Enable IP Whitelist and add the IPs allowed to call the API.
See the full Authentication guide →
Common Headers
| Header | Value | Required |
|---|---|---|
Authorization | Basic {credentials} | Yes |
Accept | application/json | Yes |
Content-Type | application/x-www-form-urlencoded | Yes (POST) |
Request body format
POST requests use standard form fields (application/x-www-form-urlencoded or multipart/form-data), not raw JSON. All responses are returned as JSON.
API Modules
1. Subscribers (Users)
Manage subscriber accounts
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/user/users | Fetch subscribers (with filters) |
| POST | /api/user/users | Create or update a subscriber |
2. Tickets
Manage support tickets
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/ticket/ticket | Fetch tickets (with filters) |
| POST | /api/ticket/ticket | Create or update a ticket |
| DELETE | /api/ticket/ticket/{id} | Delete a ticket |
| POST | /api/ticket/status | Update a ticket's status |
| POST | /api/ticket/reply | Add a reply/comment to a ticket |
URL Format
If your server does not have clean-URL rewriting enabled, prefix every endpoint with index.php/:
https://your-domain.com/index.php/api/user/usersVerify whether your base URL uses http:// or https://. Always use https:// in production.
HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
400 | Bad Request / Validation Error |
401 | Unauthorized (invalid Basic Auth credentials) |
403 | Forbidden (API disabled, or request from a non-whitelisted IP) |
Note on error codes
For validation failures the API returns 400. Some business-logic errors (e.g. "Ticket Not Found", "Invalid Post Type") are returned with a 200 status code but an error field in the body — always inspect the response body, not just the status code.
Response Format
Success responses vary by endpoint — a GET returns a JSON array of records, while an action returns a short confirmation object:
json
{
"success": "User Successfully Added."
}Error responses use an error field:
json
{
"error": "The Username field is required."
}Access Control Summary
| Control | Where it's configured | Behavior |
|---|---|---|
| API enabled | Settings → API status | If disabled → 403 Zal Pro API Unauthorized Request |
| Basic Auth | Settings → API username / password | Wrong credentials → 401 Unauthorized |
| IP Whitelist (optional) | Settings → API whitelist | Non-listed IP → 403 ...Unauthorized IP Address |
Quick Reference
Method Colors
- GET - Retrieve data
- POST - Create / Update / Action
- DELETE - Delete
Required Fields
Fields marked Required or shown in red are mandatory.
Postman
Prefer testing in Postman? Import our ready-made collection — see the Postman Collection guide →.
