Skip to content

Subscriber - Tickets ​

Base URL: https://your-domain.com

The signed-in subscriber's support tickets: list, read, open, reply, close and download attachments. Paging, the 404 rule and date formats are described under Conventions.

Ticket status codes (the same codes as the admin panel):

CodeLabelOpen
1PendingYes
2In ProgressYes
3On HoldYes
4Re-OpenedYes
5AssignedYes
6ResolvedNo
7ClosedNo
8CancelledNo
9EscalatedYes

A ticket is open unless its status is 6, 7 or 8. A ticket with no status shows as code 0, label Pending, and counts as open.

Ticket priority codes:

CodeLabel
1Low
2Medium
3High
4Urgent
5Suggestion

A ticket with no priority shows as code 0, label Normal.

Reopen rules: a reply on a Resolved (6) or Closed (7) ticket re-opens it (status 4). A reply on a Cancelled (8) ticket is refused with 422; open a new ticket instead.


Ticket Categories ​

List the ticket categories of the subscriber's branch, sorted by name.

PropertyValue
EndpointTicket Categories
MethodGET
URL/api/v1/subscriber/ticket-categories
AuthenticationBearer Token (Subscriber)

Request Headers:

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer subscriber-tokenYes

Request Body: None

Success Response (200 OK):

json
{
    "status": "success",
    "data": [
        { "id": 3, "name": "Billing" },
        { "id": 1, "name": "No Internet" },
        { "id": 2, "name": "Slow Speed" }
    ]
}

Field notes:

  • This list is not paged and has no meta.

Error Response (401 Unauthorized):

json
{
    "message": "Unauthenticated."
}

Code Examples:

bash
curl -X GET "https://your-domain.com/api/v1/subscriber/ticket-categories" \
  -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/subscriber/ticket-categories', [
    'headers' => [
        'Accept'        => 'application/json',
        'Authorization' => 'Bearer your-auth-token',
    ],
]);

$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/subscriber/ticket-categories`, {
  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/subscriber/ticket-categories",
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {TOKEN}",
    },
)

data = response.json()
print(data)
go
package main

import (
	"fmt"
	"io"
	"net/http"
)

const baseURL = "https://your-domain.com"
const token = "your-auth-token"

func main() {
	endpoint := baseURL + "/api/v1/subscriber/ticket-categories"

	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/subscriber/ticket-categories"))
        .header("Accept", "application/json")
        .bearer_auth(TOKEN)
        .send()
        .await?;

    let data: serde_json::Value = response.json().await?;
    println!("{data:#}");
    Ok(())
}

Subscriber Tickets ​

List the subscriber's tickets, newest first.

PropertyValue
EndpointSubscriber Tickets
MethodGET
URL/api/v1/subscriber/tickets
AuthenticationBearer Token (Subscriber)

Request Headers:

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer subscriber-tokenYes

Query Parameters:

ParameterTypeRequiredDescription
statusstringNoopen, closed or all (default all). closed means Resolved, Closed or Cancelled
pageintegerNoPage number (default 1)
per_pageintegerNoItems per page, 1 to 50 (default 20)

Request Body: None

Success Response (200 OK):

json
{
    "status": "success",
    "data": [
        {
            "id": 318,
            "title": "No internet since morning",
            "category": { "id": 1, "name": "No Internet" },
            "priority": { "code": 3, "label": "High" },
            "status": { "code": 2, "label": "In Progress" },
            "open": true,
            "replies_count": 2,
            "last_activity_at": "2026-10-24T10:05:12+06:00",
            "created_at": "2026-10-24T08:31:40+06:00"
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 20,
        "total": 1
    }
}

Field notes:

  • category is null when the ticket has none.
  • last_activity_at is the time of the latest reply, or when the ticket was last updated if it has no replies.

Error Response (422 Unprocessable Entity):

json
{
    "message": "The selected status is invalid.",
    "errors": {
        "status": [
            "The selected status is invalid."
        ]
    }
}

Code Examples:

bash
curl -X GET "https://your-domain.com/api/v1/subscriber/tickets?page=1&per_page=20" \
  -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/subscriber/tickets', [
    'headers' => [
        'Accept'        => 'application/json',
        'Authorization' => 'Bearer your-auth-token',
    ],
    'query' => [
        'page'     => 1,
        'per_page' => 20,
    ],
]);

$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({
  page: 1,
  per_page: 20,
});

const response = await fetch(`${BASE_URL}/api/v1/subscriber/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/subscriber/tickets",
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {TOKEN}",
    },
    params={
        "page": 1,
        "per_page": 20,
    },
)

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/subscriber/tickets"

	q := url.Values{}
	q.Set("page", "1")
	q.Set("per_page", "20")
	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/subscriber/tickets"))
        .header("Accept", "application/json")
        .bearer_auth(TOKEN)
        .query(&[
            ("page", "1"),
            ("per_page", "20"),
        ])
        .send()
        .await?;

    let data: serde_json::Value = response.json().await?;
    println!("{data:#}");
    Ok(())
}

Subscriber Ticket Details ​

Get one ticket with its description, replies (oldest first) and attachments.

PropertyValue
EndpointSubscriber Ticket Details
MethodGET
URL/api/v1/subscriber/tickets/{id}
AuthenticationBearer Token (Subscriber)

Request Headers:

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer subscriber-tokenYes

Path Parameters:

ParameterTypeRequiredDescription
idintegerYesTicket ID

Request Body: None

Success Response (200 OK):

json
{
    "status": "success",
    "data": {
        "id": 318,
        "title": "No internet since morning",
        "category": { "id": 1, "name": "No Internet" },
        "priority": { "code": 3, "label": "High" },
        "status": { "code": 2, "label": "In Progress" },
        "open": true,
        "replies_count": 2,
        "last_activity_at": "2026-10-24T10:05:12+06:00",
        "created_at": "2026-10-24T08:31:40+06:00",
        "description": "The router shows a red LOS light since 7 AM.",
        "replies": [
            {
                "id": 1204,
                "body": "Our technician is checking the fiber line in your area.",
                "from_me": false,
                "author": "support.mirpur",
                "created_at": "2026-10-24T09:12:03+06:00"
            },
            {
                "id": 1209,
                "body": "Thank you, still no light.",
                "from_me": true,
                "author": "subscriber001",
                "created_at": "2026-10-24T10:05:12+06:00"
            }
        ],
        "attachments": [
            {
                "id": 77,
                "name": "router-los.jpg",
                "type": "image/jpeg",
                "size": 284133
            }
        ]
    }
}

Field notes:

  • description and reply body are plain text: any HTML is removed and whitespace is collapsed. description is an empty string when the ticket has none.
  • from_me is true for the subscriber's own replies. Replies do not store an author type, so this compares the reply's author ID and username with the subscriber's.
  • author is the username of whoever wrote the reply.
  • Attachment name is the original file name, type its MIME type and size its size in bytes. Download it with Download Ticket Attachment.

Error Response (404 Not Found):

json
{
    "status": "error",
    "message": "Not Found"
}

Code Examples:

bash
curl -X GET "https://your-domain.com/api/v1/subscriber/tickets/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/subscriber/tickets/{$ticketId}", [
    'headers' => [
        'Accept'        => 'application/json',
        'Authorization' => 'Bearer your-auth-token',
    ],
]);

$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/subscriber/tickets/${ticketId}`, {
  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/subscriber/tickets/{ticket_id}",
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {TOKEN}",
    },
)

data = response.json()
print(data)
go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strconv"
)

const baseURL = "https://your-domain.com"
const token = "your-auth-token"

func main() {
	ticketId := 1
	endpoint := baseURL + "/api/v1/subscriber/tickets/" + strconv.Itoa(ticketId)

	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/subscriber/tickets/{ticket_id}"))
        .header("Accept", "application/json")
        .bearer_auth(TOKEN)
        .send()
        .await?;

    let data: serde_json::Value = response.json().await?;
    println!("{data:#}");
    Ok(())
}

Open Ticket ​

Open a new support ticket, with up to 5 attachments. The ticket starts as Pending (1) and is assigned to the subscriber's salesperson, and the same SMS and email notifications as the portal are sent.

PropertyValue
EndpointOpen Ticket
MethodPOST
URL/api/v1/subscriber/tickets
AuthenticationBearer Token (Subscriber)

Request Headers:

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer subscriber-tokenYes

Form Data (multipart/form-data):

ParameterTypeRequiredDescription
titlestringYesTicket title, max 255 characters. Need not be unique
category_idintegerNoA category ID from Ticket Categories (must be in the subscriber's branch)
priorityintegerNoPriority code 1 to 5
descriptionstringNoProblem description, max 10000 characters
attachments[]fileNoUp to 5 files: jpg, jpeg, png, gif, bmp, webp, svg, pdf, doc, docx, txt, xls or xlsx, max 5 MB each

A ticket without attachments can also be sent as a JSON body with the same fields.

Success Response (201 Created):

Returns the new ticket in the same shape as Subscriber Ticket Details.

json
{
    "status": "success",
    "data": {
        "id": 319,
        "title": "Slow speed in the evening",
        "category": { "id": 2, "name": "Slow Speed" },
        "priority": { "code": 3, "label": "High" },
        "status": { "code": 1, "label": "Pending" },
        "open": true,
        "replies_count": 0,
        "last_activity_at": "2026-10-24T11:02:18+06:00",
        "created_at": "2026-10-24T11:02:18+06:00",
        "description": "Speed drops to 2 Mbps after 8 PM.",
        "replies": [],
        "attachments": [
            {
                "id": 78,
                "name": "speedtest.png",
                "type": "image/png",
                "size": 120544
            }
        ]
    }
}

Error Response (422 Unprocessable Entity):

json
{
    "message": "The title field is required. (and 1 more error)",
    "errors": {
        "title": [
            "The title field is required."
        ],
        "category_id": [
            "The selected category id is invalid."
        ]
    }
}

Error Response (409 Conflict):

The same ticket was submitted again within 20 seconds.

json
{
    "status": "error",
    "message": "This request was already submitted a moment ago. Refresh the page and check before trying again."
}

Code Examples:

bash
curl -X POST "https://your-domain.com/api/v1/subscriber/tickets" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer your-auth-token" \
  -F "title=Slow speed in the evening" \
  -F "category_id=2" \
  -F "priority=3" \
  -F "description=Speed drops to 2 Mbps after 8 PM." \
  -F "attachments[][email protected]"

Reply to Ticket ​

Add the subscriber's reply to one of their tickets. A reply on a Resolved or Closed ticket re-opens it.

PropertyValue
EndpointReply to Ticket
MethodPOST
URL/api/v1/subscriber/tickets/{id}/replies
AuthenticationBearer Token (Subscriber)

Request Headers:

HeaderValueRequired
Acceptapplication/jsonYes
Content-Typeapplication/jsonYes
AuthorizationBearer subscriber-tokenYes

Path Parameters:

ParameterTypeRequiredDescription
idintegerYesTicket ID

Body Parameters:

ParameterTypeRequiredDescription
replystringYesReply text, max 10000 characters

Request Body:

json
{
    "reply": "Still slow tonight, around 3 Mbps."
}

Success Response (201 Created):

json
{
    "status": "success",
    "data": {
        "id": 1215,
        "body": "Still slow tonight, around 3 Mbps.",
        "from_me": true,
        "author": "subscriber001",
        "created_at": "2026-10-24T21:14:09+06:00"
    }
}

Error Response (422 Unprocessable Entity):

A reply on a Cancelled ticket:

json
{
    "message": "This ticket was cancelled. Open a new ticket instead.",
    "errors": {
        "reply": [
            "This ticket was cancelled. Open a new ticket instead."
        ]
    }
}

Error Response (404 Not Found):

json
{
    "status": "error",
    "message": "Not Found"
}

Code Examples:

bash
curl -X POST "https://your-domain.com/api/v1/subscriber/tickets/1/replies" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your-auth-token" \
  -d '{
    "reply": "Still slow tonight, around 3 Mbps."
  }'
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/subscriber/tickets/{$ticketId}/replies", [
    'headers' => [
        'Accept'        => 'application/json',
        'Authorization' => 'Bearer your-auth-token',
    ],
    'json' => [
        'reply' => 'Still slow tonight, around 3 Mbps.',
    ],
]);

$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/subscriber/tickets/${ticketId}/replies`, {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    'Content-Type': 'application/json',
    Authorization: `Bearer ${TOKEN}`,
  },
  body: JSON.stringify({
    reply: 'Still slow tonight, around 3 Mbps.',
  }),
});

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/subscriber/tickets/{ticket_id}/replies",
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {TOKEN}",
    },
    json={
        "reply": "Still slow tonight, around 3 Mbps.",
    },
)

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/subscriber/tickets/" + strconv.Itoa(ticketId) + "/replies"

	payload, _ := json.Marshal(map[string]any{
		"reply": "Still slow tonight, around 3 Mbps.",
	})
	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/subscriber/tickets/{ticket_id}/replies"))
        .header("Accept", "application/json")
        .bearer_auth(TOKEN)
        .json(&json!({
            "reply": "Still slow tonight, around 3 Mbps."
        }))
        .send()
        .await?;

    let data: serde_json::Value = response.json().await?;
    println!("{data:#}");
    Ok(())
}

Close Ticket ​

Close one of the subscriber's tickets (status 7). Nobody is notified. A ticket that is already Resolved, Closed or Cancelled is left as it is.

PropertyValue
EndpointClose Ticket
MethodPOST
URL/api/v1/subscriber/tickets/{id}/close
AuthenticationBearer Token (Subscriber)

Request Headers:

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer subscriber-tokenYes

Path Parameters:

ParameterTypeRequiredDescription
idintegerYesTicket ID

Request Body: None

Success Response (200 OK):

Returns the ticket in the list shape (without description, replies or attachments).

json
{
    "status": "success",
    "data": {
        "id": 318,
        "title": "No internet since morning",
        "category": { "id": 1, "name": "No Internet" },
        "priority": { "code": 3, "label": "High" },
        "status": { "code": 7, "label": "Closed" },
        "open": false,
        "replies_count": 2,
        "last_activity_at": "2026-10-24T10:05:12+06:00",
        "created_at": "2026-10-24T08:31:40+06:00"
    }
}

Error Response (404 Not Found):

json
{
    "status": "error",
    "message": "Not Found"
}

Code Examples:

bash
curl -X POST "https://your-domain.com/api/v1/subscriber/tickets/1/close" \
  -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('POST', "/api/v1/subscriber/tickets/{$ticketId}/close", [
    'headers' => [
        'Accept'        => 'application/json',
        'Authorization' => 'Bearer your-auth-token',
    ],
]);

$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/subscriber/tickets/${ticketId}/close`, {
  method: 'POST',
  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.post(
    f"{BASE_URL}/api/v1/subscriber/tickets/{ticket_id}/close",
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {TOKEN}",
    },
)

data = response.json()
print(data)
go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strconv"
)

const baseURL = "https://your-domain.com"
const token = "your-auth-token"

func main() {
	ticketId := 1
	endpoint := baseURL + "/api/v1/subscriber/tickets/" + strconv.Itoa(ticketId) + "/close"

	req, _ := http.NewRequest("POST", 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
        .post(format!("{BASE_URL}/api/v1/subscriber/tickets/{ticket_id}/close"))
        .header("Accept", "application/json")
        .bearer_auth(TOKEN)
        .send()
        .await?;

    let data: serde_json::Value = response.json().await?;
    println!("{data:#}");
    Ok(())
}

Download Ticket Attachment ​

Download one attachment of the subscriber's own ticket. The response is the file itself, not JSON.

PropertyValue
EndpointDownload Ticket Attachment
MethodGET
URL/api/v1/subscriber/tickets/{id}/attachments/{attachmentId}
AuthenticationBearer Token (Subscriber)

Request Headers:

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer subscriber-tokenYes

Path Parameters:

ParameterTypeRequiredDescription
idintegerYesTicket ID
attachmentIdintegerYesAttachment ID from the ticket's attachments

Request Body: None

Success Response (200 OK):

The file's bytes, with these headers:

HeaderValue
Content-TypeSet from the stored file's extension (for example image/jpeg, application/pdf); application/octet-stream for anything else
Content-Dispositioninline for jpg, png, gif, webp and bmp images; attachment for everything else, SVG included. The file name is the original one
X-Content-Type-Optionsnosniff
Content-Security-Policysandbox

Error Response (404 Not Found):

The ticket or attachment is not the subscriber's, or the file is missing on the server.

json
{
    "status": "error",
    "message": "Not Found"
}

Code Examples:

bash
curl -X GET "https://your-domain.com/api/v1/subscriber/tickets/318/attachments/77" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer your-auth-token" \
  -o router-los.jpg

www.onezeroart.com