Skip to content

Subscriber - Notices ​

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

Notices the ISP published for the signed-in subscriber. A subscriber sees the active notices of their own branch that are addressed to them personally, to all subscribers, or to everyone. Paging and date formats are described under Conventions.


Subscriber Notices ​

List the notices the subscriber can see, newest first.

PropertyValue
EndpointSubscriber Notices
MethodGET
URL/api/v1/subscriber/notices
AuthenticationBearer Token (Subscriber)

Request Headers:

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer subscriber-tokenYes

Query Parameters:

ParameterTypeRequiredDescription
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": 57,
            "title": "Your bill is due",
            "excerpt": "Please pay BDT 500 before 1 November.",
            "body_html": "<p>Dear Rahim,</p><p>Please pay <strong>BDT 500</strong> before 1 November to avoid disconnection.</p>",
            "body_text": "Dear Rahim, Please pay BDT 500 before 1 November to avoid disconnection.",
            "personal": true,
            "opened_at": null,
            "created_at": "2026-10-22T11:00:00+06:00"
        },
        {
            "id": 54,
            "title": "Fiber maintenance on Friday",
            "excerpt": "Mirpur area, 2 AM to 5 AM.",
            "body_html": "<p>Fiber maintenance in the Mirpur area on Friday from 2 AM to 5 AM. Service may drop briefly.</p>",
            "body_text": "Fiber maintenance in the Mirpur area on Friday from 2 AM to 5 AM. Service may drop briefly.",
            "personal": false,
            "opened_at": null,
            "created_at": "2026-10-20T17:30:00+06:00"
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 20,
        "total": 2
    }
}

Field notes:

  • body_html is the notice as the ISP wrote it (HTML). body_text is the same text with the HTML removed and whitespace collapsed, for previews and plain displays.
  • personal is true for a notice addressed to this subscriber only.
  • opened_at is when the subscriber first opened a personal notice, or null. It stays null for notices sent to everyone.

Error Response (401 Unauthorized):

json
{
    "message": "Unauthenticated."
}

Code Examples:

bash
curl -X GET "https://your-domain.com/api/v1/subscriber/notices?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/notices', [
    '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/notices?${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/notices",
    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/notices"

	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/notices"))
        .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 Notice Details ​

Get one notice. Opening a personal notice for the first time records it as opened, as the portal does.

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

Request Headers:

HeaderValueRequired
Acceptapplication/jsonYes
AuthorizationBearer subscriber-tokenYes

Path Parameters:

ParameterTypeRequiredDescription
idintegerYesNotice ID

Request Body: None

Success Response (200 OK):

json
{
    "status": "success",
    "data": {
        "id": 57,
        "title": "Your bill is due",
        "excerpt": "Please pay BDT 500 before 1 November.",
        "body_html": "<p>Dear Rahim,</p><p>Please pay <strong>BDT 500</strong> before 1 November to avoid disconnection.</p>",
        "body_text": "Dear Rahim, Please pay BDT 500 before 1 November to avoid disconnection.",
        "personal": true,
        "opened_at": "2026-10-24T09:20:41+06:00",
        "created_at": "2026-10-22T11:00:00+06:00"
    }
}

Field notes:

  • For a personal notice, opened_at in this response already holds the time it was first opened (this request, if it was not opened before).

Error Response (404 Not Found):

A notice of another branch, an inactive notice, or one addressed to someone else is not found.

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

Code Examples:

bash
curl -X GET "https://your-domain.com/api/v1/subscriber/notices/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']);

$noticeId = 1;

$response = $client->request('GET', "/api/v1/subscriber/notices/{$noticeId}", [
    '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 noticeId = 1;

const response = await fetch(`${BASE_URL}/api/v1/subscriber/notices/${noticeId}`, {
  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"

notice_id = 1

response = requests.get(
    f"{BASE_URL}/api/v1/subscriber/notices/{notice_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() {
	noticeId := 1
	endpoint := baseURL + "/api/v1/subscriber/notices/" + strconv.Itoa(noticeId)

	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 notice_id = 1;

    let response = client
        .get(format!("{BASE_URL}/api/v1/subscriber/notices/{notice_id}"))
        .header("Accept", "application/json")
        .bearer_auth(TOKEN)
        .send()
        .await?;

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

www.onezeroart.com