REST API v4: GET mobile push subscription
This method retrieves a specific mobile push subscription.
A mobile push subscription represents a registered device that can receive mobile push notifications.
To retrieve a mobile push subscription, send an HTTP GET request to the following URL:
https://api.copernica.com/v4/push/mobilesubscription/$id
Replace $id with the ID of the mobile push subscription.
Returned fields
This method returns the following data.
| Name | Description |
|---|---|
| ID | Unique identifier of the mobile push subscription. |
| created | Date and time when the subscription was created. |
| updated | Date and time when the subscription was last updated. |
| 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. |
| project | ID of the associated Google Firebase project. |
| model | Device model, if known. |
| os | Device operating system, for example ios or android. |
JSON example
The JSON response looks like the following:
{
"ID": 1,
"created": "2026-06-15 12:18:26",
"updated": "2026-06-15 12:18:26",
"expired": "",
"profile": "19382566",
"subprofile": "",
"project": "",
"model": "iPhone1",
"os": "ios"
}
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 mobile push subscription
$api->get("push/mobilesubscription/{$id}");
This example requires the REST API class.