Skip to content

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

  1. Log in to Zal Pro as an admin.
  2. Go to Settings → Others API & Server Settings.
  3. Enable the API, set an API username and API password.
  4. (Optional) Enable IP Whitelist and add the IPs allowed to call the API.

See the full Authentication guide →

Common Headers

HeaderValueRequired
AuthorizationBasic {credentials}Yes
Acceptapplication/jsonYes
Content-Typeapplication/x-www-form-urlencodedYes (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

MethodEndpointDescription
GET/api/user/usersFetch subscribers (with filters)
POST/api/user/usersCreate or update a subscriber

📁 View Subscribers API →


2. Tickets

Manage support tickets

MethodEndpointDescription
GET/api/ticket/ticketFetch tickets (with filters)
POST/api/ticket/ticketCreate or update a ticket
DELETE/api/ticket/ticket/{id}Delete a ticket
POST/api/ticket/statusUpdate a ticket's status
POST/api/ticket/replyAdd a reply/comment to a ticket

📁 View Tickets API →


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/users

Verify whether your base URL uses http:// or https://. Always use https:// in production.


HTTP Status Codes

CodeDescription
200Success
400Bad Request / Validation Error
401Unauthorized (invalid Basic Auth credentials)
403Forbidden (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

ControlWhere it's configuredBehavior
API enabledSettings → API statusIf disabled → 403 Zal Pro API Unauthorized Request
Basic AuthSettings → API username / passwordWrong credentials → 401 Unauthorized
IP Whitelist (optional)Settings → API whitelistNon-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 →.

www.onezeroart.com