REST API v4: GET web push subscription
This method retrieves a specific browser push subscription.
A browser push subscription represents a browser that has granted permission to receive push notifications.
To retrieve a browser push subscription, send an HTTP GET request to the following URL:
https://api.copernica.com/v4/push/websubscription/$id
Replace $id with the ID of the browser push subscription.
Returned fields
This method returns the following data.
| Name | Description |
|---|---|
| ID | Unique identifier of the browser push subscription. |
| created | Date and time when the subscription was created. |
| expired | Date and time when the subscription expired. Empty if the subscription is still active. |
| profile | ID of the associated profile. |
| subprofile | ID of the associated subprofile. |
| webtracker | ID of the associated website tracker. |
| endpoint | Push endpoint used by the browser to deliver push notifications. |
JSON example
The JSON response looks like the following:
{
"ID": 1,
"created": "2025-09-23 12:18:59",
"expired": "2026-06-16 11:55:52",
"profile": "19382566",
"subprofile": "",
"webtracker": "2",
"endpoint": "https://jmt17.google.com/fcm/send/cV0dTc4s5Vc:APA91bG-_pY46AOEFV-CnKGyoWyVfvYeeRQnhBtY3kqNQzh0RVhf1_2Wmf8R3oUnQPDtSpdrmCjR8HDGKPG5VmXWSzPMS-33C_g5ACXyQuRUs8ELQ4pWy5ukMo49QUxw7AJHM8YdkmQp"
}
PHP example
The following script demonstrates how to use this API method.
// required scripts
require_once("CopernicaRestAPI.php");
// change this to your access token
$api = new CopernicaRestAPI("your-access-token", 4);
// replace {$id} with the ID of the browser push subscription
$api->get("push/websubscription/{$id}");
This example requires the REST API class.