Appearance
User - Tickets
Base URL:
https://your-domain.com
Staff endpoints for support tickets: list, view with replies, create, update, reply, change status and delete. Non-admin users need the ticket_module permission (and api_access).
The fields, statuses and priorities are the web panel's. The old field names subject (for title), assigned_to (for assign_to_id) and message (for a reply's reply) are still accepted.
Statuses, Priorities and Visibility
Statuses (status):
| Value | Label |
|---|---|
1 | Pending |
2 | In Progress |
3 | On Hold |
4 | Re-Opened |
5 | Assigned |
6 | Resolved |
7 | Closed |
8 | Cancelled |
9 | Escalated |
Priorities (priority):
| Value | Label |
|---|---|
1 | Low |
2 | Medium |
3 | High |
4 | Urgent |
5 | Suggestion |
Every ticket in an answer carries status_label and priority_label next to the numeric values. Any other status or priority value answers 422.
Who sees which tickets:
| Caller | Tickets |
|---|---|
| Admin, Super admin, Admin staff | Every ticket of the ISP and branch |
| Reseller, Sub-reseller, Retailer | Tickets of its own subscribers (salesperson = itself), tickets assigned to itself and tickets assigned to its staff |
| Reseller / sub-reseller / retailer staff | Tickets of the parent's own subscribers, tickets assigned to itself, to its parent and to sibling staff of the same parent |
A ticket the caller may not see answers 404 Ticket not found. on every single-ticket endpoint, as if it did not exist.
A reseller-family caller may open a ticket only for a subscriber of its own tree, and assign it only to the users the web ticket form offers it: a reseller to itself and the sub-resellers / retailers it created, a sub-reseller to itself and its retailers, a retailer to itself, reseller staff to their parent. Anything else answers 403.
Fetch All Tickets
Retrieve the tickets the caller may see, newest first, with optional filters and pagination.
| Property | Value |
|---|---|
| Endpoint | Fetch All Tickets |
| Method | GET |
| URL | /api/v1/tickets |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
user_id | integer | Yes | Your user ID |
search | string | No | Matches the title, the subscriber username or the assignee username (partial match). A number also matches the ticket ID exactly |
status | integer | No | Filter by status (1-9, see Statuses) |
priority | integer | No | Filter by priority (1-5) |
category_id | integer | No | Filter by ticket category |
subscriber_id | integer | No | Filter by subscriber |
per_page | integer | No | Tickets per page, 1 to 100 (default: 15) |
page | integer | No | Page number (default: 1) |
Request Body: None
Success Response (200 OK):
json
{
"status": "success",
"data": {
"tickets": [
{
"id": 214,
"title": "No internet since morning",
"subscriber_id": 1532,
"subscriber_username": "rahim.uttara",
"assign_to_id": 18,
"assign_to_username": "noc.karim",
"category_id": 3,
"priority": 4,
"status": 5,
"description": "ONU LOS light is red, subscriber cannot connect.",
"view_at": null,
"view_from": null,
"isp_id": 1,
"branch_id": 1,
"created_by_id": 1,
"created_by_username": "admin",
"created_at": "2026-10-22T03:15:30.000000Z",
"updated_at": "2026-10-22T04:02:11.000000Z",
"category_data": {
"id": 3,
"name": "Connectivity"
},
"subscriber_data": {
"id": 1532,
"username": "rahim.uttara",
"fullname": "Abdur Rahim"
},
"user_data": {
"id": 18,
"username": "noc.karim",
"name": "Karim Hossain"
},
"status_label": "Assigned",
"priority_label": "Urgent"
}
],
"pagination": {
"current_page": 1,
"per_page": 15,
"total": 1,
"last_page": 1
}
}
}user_data is the assigned user (assign_to_id); category_data, subscriber_data and user_data are null when the ticket has none.
Error Response (422 Validation Error):
json
{
"status": "error",
"message": ["The selected status is invalid."]
}Error Response (500 Server Error):
json
{
"status": "error",
"message": "Failed to fetch tickets."
}Code Examples:
bash
curl -X GET "https://your-domain.com/api/v1/tickets?isp_id=1&branch_id=1&user_id=1&search=john&per_page=15" \
-H "Accept: application/json" \
-H "Authorization: Bearer your-auth-token"php
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://your-domain.com']);
$response = $client->request('GET', '/api/v1/tickets', [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer your-auth-token',
],
'query' => [
'isp_id' => 1,
'branch_id' => 1,
'user_id' => 1,
'search' => 'john',
'per_page' => 15,
],
]);
$data = json_decode($response->getBody(), true);
print_r($data);javascript
const BASE_URL = 'https://your-domain.com';
const TOKEN = 'your-auth-token';
const params = new URLSearchParams({
isp_id: 1,
branch_id: 1,
user_id: 1,
search: 'john',
per_page: 15,
});
const response = await fetch(`${BASE_URL}/api/v1/tickets?${params}`, {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: `Bearer ${TOKEN}`,
},
});
const data = await response.json();
console.log(data);python
import requests
BASE_URL = "https://your-domain.com"
TOKEN = "your-auth-token"
response = requests.get(
f"{BASE_URL}/api/v1/tickets",
headers={
"Accept": "application/json",
"Authorization": f"Bearer {TOKEN}",
},
params={
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"search": "john",
"per_page": 15,
},
)
data = response.json()
print(data)go
package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
const baseURL = "https://your-domain.com"
const token = "your-auth-token"
func main() {
endpoint := baseURL + "/api/v1/tickets"
q := url.Values{}
q.Set("isp_id", "1")
q.Set("branch_id", "1")
q.Set("user_id", "1")
q.Set("search", "john")
q.Set("per_page", "15")
endpoint += "?" + q.Encode()
req, _ := http.NewRequest("GET", endpoint, nil)
req.Header.Set("Accept", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode, string(body))
}rust
use reqwest::Client;
const BASE_URL: &str = "https://your-domain.com";
const TOKEN: &str = "your-auth-token";
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let response = client
.get(format!("{BASE_URL}/api/v1/tickets"))
.header("Accept", "application/json")
.bearer_auth(TOKEN)
.query(&[
("isp_id", "1"),
("branch_id", "1"),
("user_id", "1"),
("search", "john"),
("per_page", "15"),
])
.send()
.await?;
let data: serde_json::Value = response.json().await?;
println!("{data:#}");
Ok(())
}Fetch Ticket
Retrieve one ticket with all its replies, oldest reply first.
| Property | Value |
|---|---|
| Endpoint | Fetch Ticket |
| Method | GET |
| URL | /api/v1/tickets/{id} |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Ticket ID |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
user_id | integer | Yes | Your user ID |
Request Body: None
Success Response (200 OK):
json
{
"status": "success",
"data": {
"ticket": {
"id": 214,
"title": "No internet since morning",
"subscriber_id": 1532,
"subscriber_username": "rahim.uttara",
"assign_to_id": 18,
"assign_to_username": "noc.karim",
"category_id": 3,
"priority": 4,
"status": 2,
"description": "ONU LOS light is red, subscriber cannot connect.",
"view_at": null,
"view_from": null,
"isp_id": 1,
"branch_id": 1,
"created_by_id": 1,
"created_by_username": "admin",
"created_at": "2026-10-22T03:15:30.000000Z",
"updated_at": "2026-10-22T04:20:45.000000Z",
"category_data": {
"id": 3,
"name": "Connectivity"
},
"subscriber_data": {
"id": 1532,
"username": "rahim.uttara",
"fullname": "Abdur Rahim"
},
"user_data": {
"id": 18,
"username": "noc.karim",
"name": "Karim Hossain"
},
"status_label": "In Progress",
"priority_label": "Urgent"
},
"replies": [
{
"id": 981,
"ticket_id": 214,
"reply": "Checking the ONU from the OLT now.",
"created_by_id": 18,
"created_by_username": "noc.karim",
"created_at": "2026-10-22T04:20:45.000000Z",
"updated_at": "2026-10-22T04:20:45.000000Z"
}
],
"replies_count": 1
}
}Error Response (404 Not Found):
Returned when the ticket does not exist in your ISP and branch, or you may not see it.
json
{
"status": "error",
"message": "Ticket not found."
}Code Examples:
bash
curl -X GET "https://your-domain.com/api/v1/tickets/1?isp_id=1&branch_id=1&user_id=1" \
-H "Accept: application/json" \
-H "Authorization: Bearer your-auth-token"php
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://your-domain.com']);
$ticketId = 1;
$response = $client->request('GET', "/api/v1/tickets/{$ticketId}", [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer your-auth-token',
],
'query' => [
'isp_id' => 1,
'branch_id' => 1,
'user_id' => 1,
],
]);
$data = json_decode($response->getBody(), true);
print_r($data);javascript
const BASE_URL = 'https://your-domain.com';
const TOKEN = 'your-auth-token';
const ticketId = 1;
const params = new URLSearchParams({
isp_id: 1,
branch_id: 1,
user_id: 1,
});
const response = await fetch(`${BASE_URL}/api/v1/tickets/${ticketId}?${params}`, {
method: 'GET',
headers: {
Accept: 'application/json',
Authorization: `Bearer ${TOKEN}`,
},
});
const data = await response.json();
console.log(data);python
import requests
BASE_URL = "https://your-domain.com"
TOKEN = "your-auth-token"
ticket_id = 1
response = requests.get(
f"{BASE_URL}/api/v1/tickets/{ticket_id}",
headers={
"Accept": "application/json",
"Authorization": f"Bearer {TOKEN}",
},
params={
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
},
)
data = response.json()
print(data)go
package main
import (
"fmt"
"io"
"net/http"
"net/url"
"strconv"
)
const baseURL = "https://your-domain.com"
const token = "your-auth-token"
func main() {
ticketId := 1
endpoint := baseURL + "/api/v1/tickets/" + strconv.Itoa(ticketId)
q := url.Values{}
q.Set("isp_id", "1")
q.Set("branch_id", "1")
q.Set("user_id", "1")
endpoint += "?" + q.Encode()
req, _ := http.NewRequest("GET", endpoint, nil)
req.Header.Set("Accept", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode, string(body))
}rust
use reqwest::Client;
const BASE_URL: &str = "https://your-domain.com";
const TOKEN: &str = "your-auth-token";
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let ticket_id = 1;
let response = client
.get(format!("{BASE_URL}/api/v1/tickets/{ticket_id}"))
.header("Accept", "application/json")
.bearer_auth(TOKEN)
.query(&[
("isp_id", "1"),
("branch_id", "1"),
("user_id", "1"),
])
.send()
.await?;
let data: serde_json::Value = response.json().await?;
println!("{data:#}");
Ok(())
}Create Ticket
Open a new ticket. It is created by the token's user.
| Property | Value |
|---|---|
| Endpoint | Create Ticket |
| Method | POST |
| URL | /api/v1/tickets |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Content-Type | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"title": "No internet since morning",
"description": "ONU LOS light is red, subscriber cannot connect.",
"category_id": 3,
"priority": 4,
"status": 5,
"subscriber_id": 1532,
"assign_to_id": 18
}| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
user_id | integer | Yes | Your user ID |
title | string | Yes | Ticket title, up to 255 characters (old name: subject) |
description | string | Yes | The issue |
category_id | integer | No | Ticket category ID |
priority | integer | No | 1-5 (default: 2 Medium) |
status | integer | No | 1-9 (default: 1 Pending) |
subscriber_id | integer | No | The subscriber the ticket is about. Must be one you may manage |
assign_to_id | integer | No | The user to assign the ticket to (old name: assigned_to). Must be one you may assign to |
The server fills subscriber_username and assign_to_username from the IDs.
Success Response (201 Created):
json
{
"status": "success",
"message": "Ticket created successfully.",
"data": {
"title": "No internet since morning",
"description": "ONU LOS light is red, subscriber cannot connect.",
"category_id": 3,
"priority": 4,
"status": 5,
"subscriber_id": 1532,
"subscriber_username": "rahim.uttara",
"assign_to_id": 18,
"assign_to_username": "noc.karim",
"created_by_id": 1,
"created_by_username": "admin",
"isp_id": 1,
"branch_id": 1,
"updated_at": "2026-10-22T03:15:30.000000Z",
"created_at": "2026-10-22T03:15:30.000000Z",
"id": 214,
"category_data": {
"id": 3,
"name": "Connectivity"
},
"subscriber_data": {
"id": 1532,
"username": "rahim.uttara",
"fullname": "Abdur Rahim"
},
"user_data": {
"id": 18,
"username": "noc.karim",
"name": "Karim Hossain"
},
"status_label": "Assigned",
"priority_label": "Urgent"
}
}Error Response (403 Forbidden):
Returned when subscriber_id is not a subscriber of your ISP and branch that you may manage, or assign_to_id is outside your ISP and branch or not one you may assign to.
json
{
"status": "error",
"message": "The selected subscriber_id does not belong to your ISP and branch."
}The same answer names assign_to_id for a refused assignee.
Error Response (422 Validation Error):
json
{
"status": "error",
"message": [
"The title field is required.",
"The description field is required."
]
}Code Examples:
bash
curl -X POST "https://your-domain.com/api/v1/tickets" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-auth-token" \
-d '{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"title": "No internet since morning",
"description": "ONU LOS light is red, subscriber cannot connect.",
"category_id": 3,
"priority": 4,
"status": 5,
"subscriber_id": 1532,
"assign_to_id": 18
}'php
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://your-domain.com']);
$response = $client->request('POST', '/api/v1/tickets', [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer your-auth-token',
],
'json' => [
'isp_id' => 1,
'branch_id' => 1,
'user_id' => 1,
'title' => 'No internet since morning',
'description' => 'ONU LOS light is red, subscriber cannot connect.',
'category_id' => 3,
'priority' => 4,
'status' => 5,
'subscriber_id' => 1532,
'assign_to_id' => 18,
],
]);
$data = json_decode($response->getBody(), true);
print_r($data);javascript
const BASE_URL = 'https://your-domain.com';
const TOKEN = 'your-auth-token';
const response = await fetch(`${BASE_URL}/api/v1/tickets`, {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: `Bearer ${TOKEN}`,
},
body: JSON.stringify({
isp_id: 1,
branch_id: 1,
user_id: 1,
title: 'No internet since morning',
description: 'ONU LOS light is red, subscriber cannot connect.',
category_id: 3,
priority: 4,
status: 5,
subscriber_id: 1532,
assign_to_id: 18,
}),
});
const data = await response.json();
console.log(data);python
import requests
BASE_URL = "https://your-domain.com"
TOKEN = "your-auth-token"
response = requests.post(
f"{BASE_URL}/api/v1/tickets",
headers={
"Accept": "application/json",
"Authorization": f"Bearer {TOKEN}",
},
json={
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"title": "No internet since morning",
"description": "ONU LOS light is red, subscriber cannot connect.",
"category_id": 3,
"priority": 4,
"status": 5,
"subscriber_id": 1532,
"assign_to_id": 18,
},
)
data = response.json()
print(data)go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
const baseURL = "https://your-domain.com"
const token = "your-auth-token"
func main() {
endpoint := baseURL + "/api/v1/tickets"
payload, _ := json.Marshal(map[string]any{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"title": "No internet since morning",
"description": "ONU LOS light is red, subscriber cannot connect.",
"category_id": 3,
"priority": 4,
"status": 5,
"subscriber_id": 1532,
"assign_to_id": 18,
})
req, _ := http.NewRequest("POST", endpoint, bytes.NewBuffer(payload))
req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode, string(body))
}rust
use reqwest::Client;
use serde_json::json;
const BASE_URL: &str = "https://your-domain.com";
const TOKEN: &str = "your-auth-token";
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let response = client
.post(format!("{BASE_URL}/api/v1/tickets"))
.header("Accept", "application/json")
.bearer_auth(TOKEN)
.json(&json!({
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"title": "No internet since morning",
"description": "ONU LOS light is red, subscriber cannot connect.",
"category_id": 3,
"priority": 4,
"status": 5,
"subscriber_id": 1532,
"assign_to_id": 18
}))
.send()
.await?;
let data: serde_json::Value = response.json().await?;
println!("{data:#}");
Ok(())
}Update Ticket
Change a ticket. Only the fields you send are changed; an empty value leaves the field as it is.
| Property | Value |
|---|---|
| Endpoint | Update Ticket |
| Method | PUT |
| URL | /api/v1/tickets/{id} |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Content-Type | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Ticket ID |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"title": "No internet since morning (fibre cut)",
"priority": 3,
"assign_to_id": 21
}| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
user_id | integer | Yes | Your user ID |
title | string | No | New title, up to 255 characters (old name: subject) |
description | string | No | New description |
category_id | integer | No | New category ID |
priority | integer | No | 1-5 |
status | integer | No | 1-9 |
subscriber_id | integer | No | New subscriber. Must be one you may manage |
assign_to_id | integer | No | New assignee (old name: assigned_to). Must be one you may assign to |
Success Response (200 OK):
json
{
"status": "success",
"message": "Ticket updated successfully.",
"data": {
"id": 214,
"title": "No internet since morning (fibre cut)",
"subscriber_id": 1532,
"subscriber_username": "rahim.uttara",
"assign_to_id": 21,
"assign_to_username": "noc.salma",
"category_id": 3,
"priority": 3,
"status": 2,
"description": "ONU LOS light is red, subscriber cannot connect.",
"view_at": null,
"view_from": null,
"isp_id": 1,
"branch_id": 1,
"created_by_id": 1,
"created_by_username": "admin",
"created_at": "2026-10-22T03:15:30.000000Z",
"updated_at": "2026-10-22T05:10:02.000000Z",
"category_data": {
"id": 3,
"name": "Connectivity"
},
"subscriber_data": {
"id": 1532,
"username": "rahim.uttara",
"fullname": "Abdur Rahim"
},
"user_data": {
"id": 21,
"username": "noc.salma",
"name": "Salma Akter"
},
"status_label": "In Progress",
"priority_label": "High"
}
}Error Response (403 Forbidden):
json
{
"status": "error",
"message": "The selected assign_to_id does not belong to your ISP and branch."
}Error Response (404 Not Found):
json
{
"status": "error",
"message": "Ticket not found."
}Error Response (422 Validation Error):
json
{
"status": "error",
"message": ["The selected priority is invalid."]
}Code Examples:
bash
curl -X PUT "https://your-domain.com/api/v1/tickets/1" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-auth-token" \
-d '{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"title": "No internet since morning (fibre cut)",
"priority": 3,
"assign_to_id": 21
}'php
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://your-domain.com']);
$ticketId = 1;
$response = $client->request('PUT', "/api/v1/tickets/{$ticketId}", [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer your-auth-token',
],
'json' => [
'isp_id' => 1,
'branch_id' => 1,
'user_id' => 1,
'title' => 'No internet since morning (fibre cut)',
'priority' => 3,
'assign_to_id' => 21,
],
]);
$data = json_decode($response->getBody(), true);
print_r($data);javascript
const BASE_URL = 'https://your-domain.com';
const TOKEN = 'your-auth-token';
const ticketId = 1;
const response = await fetch(`${BASE_URL}/api/v1/tickets/${ticketId}`, {
method: 'PUT',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: `Bearer ${TOKEN}`,
},
body: JSON.stringify({
isp_id: 1,
branch_id: 1,
user_id: 1,
title: 'No internet since morning (fibre cut)',
priority: 3,
assign_to_id: 21,
}),
});
const data = await response.json();
console.log(data);python
import requests
BASE_URL = "https://your-domain.com"
TOKEN = "your-auth-token"
ticket_id = 1
response = requests.put(
f"{BASE_URL}/api/v1/tickets/{ticket_id}",
headers={
"Accept": "application/json",
"Authorization": f"Bearer {TOKEN}",
},
json={
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"title": "No internet since morning (fibre cut)",
"priority": 3,
"assign_to_id": 21,
},
)
data = response.json()
print(data)go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"strconv"
)
const baseURL = "https://your-domain.com"
const token = "your-auth-token"
func main() {
ticketId := 1
endpoint := baseURL + "/api/v1/tickets/" + strconv.Itoa(ticketId)
payload, _ := json.Marshal(map[string]any{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"title": "No internet since morning (fibre cut)",
"priority": 3,
"assign_to_id": 21,
})
req, _ := http.NewRequest("PUT", endpoint, bytes.NewBuffer(payload))
req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode, string(body))
}rust
use reqwest::Client;
use serde_json::json;
const BASE_URL: &str = "https://your-domain.com";
const TOKEN: &str = "your-auth-token";
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let ticket_id = 1;
let response = client
.put(format!("{BASE_URL}/api/v1/tickets/{ticket_id}"))
.header("Accept", "application/json")
.bearer_auth(TOKEN)
.json(&json!({
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"title": "No internet since morning (fibre cut)",
"priority": 3,
"assign_to_id": 21
}))
.send()
.await?;
let data: serde_json::Value = response.json().await?;
println!("{data:#}");
Ok(())
}Delete Ticket
Delete a ticket together with all its replies.
| Property | Value |
|---|---|
| Endpoint | Delete Ticket |
| Method | DELETE |
| URL | /api/v1/tickets/{id} |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Ticket ID |
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
user_id | integer | Yes | Your user ID |
Request Body: None
Success Response (200 OK):
json
{
"status": "success",
"message": "Ticket deleted successfully.",
"data": {
"deleted_id": 214,
"title": "No internet since morning (fibre cut)"
}
}Error Response (404 Not Found):
json
{
"status": "error",
"message": "Ticket not found."
}Code Examples:
bash
curl -X DELETE "https://your-domain.com/api/v1/tickets/1?isp_id=1&branch_id=1&user_id=1" \
-H "Accept: application/json" \
-H "Authorization: Bearer your-auth-token"php
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://your-domain.com']);
$ticketId = 1;
$response = $client->request('DELETE', "/api/v1/tickets/{$ticketId}", [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer your-auth-token',
],
'query' => [
'isp_id' => 1,
'branch_id' => 1,
'user_id' => 1,
],
]);
$data = json_decode($response->getBody(), true);
print_r($data);javascript
const BASE_URL = 'https://your-domain.com';
const TOKEN = 'your-auth-token';
const ticketId = 1;
const params = new URLSearchParams({
isp_id: 1,
branch_id: 1,
user_id: 1,
});
const response = await fetch(`${BASE_URL}/api/v1/tickets/${ticketId}?${params}`, {
method: 'DELETE',
headers: {
Accept: 'application/json',
Authorization: `Bearer ${TOKEN}`,
},
});
const data = await response.json();
console.log(data);python
import requests
BASE_URL = "https://your-domain.com"
TOKEN = "your-auth-token"
ticket_id = 1
response = requests.delete(
f"{BASE_URL}/api/v1/tickets/{ticket_id}",
headers={
"Accept": "application/json",
"Authorization": f"Bearer {TOKEN}",
},
params={
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
},
)
data = response.json()
print(data)go
package main
import (
"fmt"
"io"
"net/http"
"net/url"
"strconv"
)
const baseURL = "https://your-domain.com"
const token = "your-auth-token"
func main() {
ticketId := 1
endpoint := baseURL + "/api/v1/tickets/" + strconv.Itoa(ticketId)
q := url.Values{}
q.Set("isp_id", "1")
q.Set("branch_id", "1")
q.Set("user_id", "1")
endpoint += "?" + q.Encode()
req, _ := http.NewRequest("DELETE", endpoint, nil)
req.Header.Set("Accept", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode, string(body))
}rust
use reqwest::Client;
const BASE_URL: &str = "https://your-domain.com";
const TOKEN: &str = "your-auth-token";
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let ticket_id = 1;
let response = client
.delete(format!("{BASE_URL}/api/v1/tickets/{ticket_id}"))
.header("Accept", "application/json")
.bearer_auth(TOKEN)
.query(&[
("isp_id", "1"),
("branch_id", "1"),
("user_id", "1"),
])
.send()
.await?;
let data: serde_json::Value = response.json().await?;
println!("{data:#}");
Ok(())
}Reply to Ticket
Add a reply to a ticket as the token's user. A reply to a Pending (1) ticket moves it to In Progress (2); other statuses are left as they are.
| Property | Value |
|---|---|
| Endpoint | Reply to Ticket |
| Method | POST |
| URL | /api/v1/tickets/{id}/reply |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Content-Type | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Ticket ID |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 18,
"reply": "Checking the ONU from the OLT now."
}| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
user_id | integer | Yes | Your user ID |
reply | string | Yes | The reply text, up to 10000 characters (old name: message). Before v2.30.8 replies over 255 characters could fail on some servers |
Success Response (201 Created):
json
{
"status": "success",
"message": "Reply added successfully.",
"data": {
"id": 981,
"ticket_id": 214,
"reply": "Checking the ONU from the OLT now.",
"created_by_id": 18,
"created_by_username": "noc.karim",
"created_at": "2026-10-22T04:20:45.000000Z",
"updated_at": "2026-10-22T04:20:45.000000Z"
}
}Error Response (404 Not Found):
json
{
"status": "error",
"message": "Ticket not found."
}Error Response (422 Validation Error):
json
{
"status": "error",
"message": ["The reply field is required."]
}Code Examples:
bash
curl -X POST "https://your-domain.com/api/v1/tickets/1/reply" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-auth-token" \
-d '{
"isp_id": 1,
"branch_id": 1,
"user_id": 18,
"reply": "Checking the ONU from the OLT now."
}'php
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://your-domain.com']);
$ticketId = 1;
$response = $client->request('POST', "/api/v1/tickets/{$ticketId}/reply", [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer your-auth-token',
],
'json' => [
'isp_id' => 1,
'branch_id' => 1,
'user_id' => 18,
'reply' => 'Checking the ONU from the OLT now.',
],
]);
$data = json_decode($response->getBody(), true);
print_r($data);javascript
const BASE_URL = 'https://your-domain.com';
const TOKEN = 'your-auth-token';
const ticketId = 1;
const response = await fetch(`${BASE_URL}/api/v1/tickets/${ticketId}/reply`, {
method: 'POST',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: `Bearer ${TOKEN}`,
},
body: JSON.stringify({
isp_id: 1,
branch_id: 1,
user_id: 18,
reply: 'Checking the ONU from the OLT now.',
}),
});
const data = await response.json();
console.log(data);python
import requests
BASE_URL = "https://your-domain.com"
TOKEN = "your-auth-token"
ticket_id = 1
response = requests.post(
f"{BASE_URL}/api/v1/tickets/{ticket_id}/reply",
headers={
"Accept": "application/json",
"Authorization": f"Bearer {TOKEN}",
},
json={
"isp_id": 1,
"branch_id": 1,
"user_id": 18,
"reply": "Checking the ONU from the OLT now.",
},
)
data = response.json()
print(data)go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"strconv"
)
const baseURL = "https://your-domain.com"
const token = "your-auth-token"
func main() {
ticketId := 1
endpoint := baseURL + "/api/v1/tickets/" + strconv.Itoa(ticketId) + "/reply"
payload, _ := json.Marshal(map[string]any{
"isp_id": 1,
"branch_id": 1,
"user_id": 18,
"reply": "Checking the ONU from the OLT now.",
})
req, _ := http.NewRequest("POST", endpoint, bytes.NewBuffer(payload))
req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode, string(body))
}rust
use reqwest::Client;
use serde_json::json;
const BASE_URL: &str = "https://your-domain.com";
const TOKEN: &str = "your-auth-token";
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let ticket_id = 1;
let response = client
.post(format!("{BASE_URL}/api/v1/tickets/{ticket_id}/reply"))
.header("Accept", "application/json")
.bearer_auth(TOKEN)
.json(&json!({
"isp_id": 1,
"branch_id": 1,
"user_id": 18,
"reply": "Checking the ONU from the OLT now."
}))
.send()
.await?;
let data: serde_json::Value = response.json().await?;
println!("{data:#}");
Ok(())
}Change Ticket Status
Set a ticket's status. The answer names the old and the new status.
| Property | Value |
|---|---|
| Endpoint | Change Ticket Status |
| Method | PUT |
| URL | /api/v1/tickets/{id}/status |
| Authentication | Bearer Token |
Request Headers:
| Header | Value | Required |
|---|---|---|
Accept | application/json | Yes |
Content-Type | application/json | Yes |
Authorization | Bearer your-auth-token | Yes |
Path Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | Ticket ID |
Request Body:
json
{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"status": 7
}| Parameter | Type | Required | Description |
|---|---|---|---|
isp_id | integer | Yes | ISP ID |
branch_id | integer | Yes | Branch ID |
user_id | integer | Yes | Your user ID |
status | integer | Yes | New status, 1-9 (see Statuses) |
Success Response (200 OK):
json
{
"status": "success",
"message": "Ticket status updated successfully.",
"data": {
"ticket_id": 214,
"old_status": "In Progress",
"new_status": "Closed"
}
}Error Response (404 Not Found):
json
{
"status": "error",
"message": "Ticket not found."
}Error Response (422 Validation Error):
Returned for a missing status or one outside 1-9.
json
{
"status": "error",
"message": ["The selected status is invalid."]
}Code Examples:
bash
curl -X PUT "https://your-domain.com/api/v1/tickets/1/status" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer your-auth-token" \
-d '{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"status": 7
}'php
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client(['base_uri' => 'https://your-domain.com']);
$ticketId = 1;
$response = $client->request('PUT', "/api/v1/tickets/{$ticketId}/status", [
'headers' => [
'Accept' => 'application/json',
'Authorization' => 'Bearer your-auth-token',
],
'json' => [
'isp_id' => 1,
'branch_id' => 1,
'user_id' => 1,
'status' => 7,
],
]);
$data = json_decode($response->getBody(), true);
print_r($data);javascript
const BASE_URL = 'https://your-domain.com';
const TOKEN = 'your-auth-token';
const ticketId = 1;
const response = await fetch(`${BASE_URL}/api/v1/tickets/${ticketId}/status`, {
method: 'PUT',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: `Bearer ${TOKEN}`,
},
body: JSON.stringify({
isp_id: 1,
branch_id: 1,
user_id: 1,
status: 7,
}),
});
const data = await response.json();
console.log(data);python
import requests
BASE_URL = "https://your-domain.com"
TOKEN = "your-auth-token"
ticket_id = 1
response = requests.put(
f"{BASE_URL}/api/v1/tickets/{ticket_id}/status",
headers={
"Accept": "application/json",
"Authorization": f"Bearer {TOKEN}",
},
json={
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"status": 7,
},
)
data = response.json()
print(data)go
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
"strconv"
)
const baseURL = "https://your-domain.com"
const token = "your-auth-token"
func main() {
ticketId := 1
endpoint := baseURL + "/api/v1/tickets/" + strconv.Itoa(ticketId) + "/status"
payload, _ := json.Marshal(map[string]any{
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"status": 7,
})
req, _ := http.NewRequest("PUT", endpoint, bytes.NewBuffer(payload))
req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode, string(body))
}rust
use reqwest::Client;
use serde_json::json;
const BASE_URL: &str = "https://your-domain.com";
const TOKEN: &str = "your-auth-token";
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let ticket_id = 1;
let response = client
.put(format!("{BASE_URL}/api/v1/tickets/{ticket_id}/status"))
.header("Accept", "application/json")
.bearer_auth(TOKEN)
.json(&json!({
"isp_id": 1,
"branch_id": 1,
"user_id": 1,
"status": 7
}))
.send()
.await?;
let data: serde_json::Value = response.json().await?;
println!("{data:#}");
Ok(())
}