GET Check Push Status

This endpoint is used to check status of a push campaign. The request method of this call needs to be "GET".

The campaign ID needs to be passed as part of the endpoint URL below. You will receive this ID anytime you create a new campaign using our REST API.

Endpoint URL

https://api.webpushr.com/v1/notification/status/id/

Examples

curl -X GET \
-H "webpushrKey: <YOUR REST API KEY>" \
-H "webpushrAuthToken: <YOUR AUTHENTICATION TOKEN>" \
-H "Content-Type: application/json" \
https://api.webpushr.com/v1/notification/status/id/117
	$end_point = 'https://api.webpushr.com/v1/notification/status/id/117';
	$http_header = array( 
		"Content-Type: Application/Json", 
		"webpushrKey: <YOUR REST API KEY>", 
		"webpushrAuthToken: <YOUR AUTHENTICATION TOKEN>"
	);
	$ch = curl_init();
	curl_setopt($ch, CURLOPT_HTTPHEADER, $http_header);
	curl_setopt($ch, CURLOPT_URL, $end_point );
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
	$response = curl_exec($ch);
	echo $response;
import requests

headers = {
    'webpushrKey': '<YOUR REST API KEY>',
    'webpushrAuthToken': '<YOUR AUTHENTICATION TOKEN>',
    'Content-Type': 'application/json',
}

response = requests.get('https://api.webpushr.com/v1/notification/status/id/%3CCAMPAIGN', headers=headers)
var request = require('request');

var headers = {
    'webpushrKey': '<YOUR REST API KEY>',
    'webpushrAuthToken': '<YOUR AUTHENTICATION TOKEN>',
    'Content-Type': 'application/json'
};

var options = {
    url: 'https://api.webpushr.com/v1/notification/status/id/<CAMPAIGN',
    headers: headers
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        console.log(body);
    }
}

request(options, callback);
extern crate reqwest;
use reqwest::header;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut headers = header::HeaderMap::new();
    headers.insert("webpushrKey", "<YOUR REST API KEY>".parse().unwrap());
    headers.insert("webpushrAuthToken", "<YOUR AUTHENTICATION TOKEN>".parse().unwrap());
    headers.insert("Content-Type", "application/json".parse().unwrap());

    let res = reqwest::Client::new()
        .get("https://api.webpushr.com/v1/notification/status/id/<CAMPAIGN")
        .headers(headers)
        .send()?
        .text()?;
    println!("{}", res);

    Ok(())
}
package main

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

func main() {
	client := &http.Client{}
	req, err := http.NewRequest("GET", "https://api.webpushr.com/v1/notification/status/id/<CAMPAIGN", nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("webpushrKey", "<YOUR REST API KEY>")
	req.Header.Set("webpushrAuthToken", "<YOUR AUTHENTICATION TOKEN>")
	req.Header.Set("Content-Type", "application/json")
	resp, err := client.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	bodyText, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s\n", bodyText)
}

Result Format

{
	"campaign_status":"Sent",
	"campaign_id":"117",
	"count":{
				"total_attempts":"11643",
				"successfully_sent":"11528",
				"failed_to_send":"115",
				"delivered":"7672",
				"clicked":"95",
				"closed":"2051"
				}
}
{
    "status": "failure",
    "type" : "header_invalid",
    "description": "Missing webpushrKey in header"
}
{
    "status": "failure",
    "type" : "bad_request",
    "description": "Invalid JSON request"
}
{
    "status": "failure",
    "type" : "authentication_failure",
    "description": "You are not authorized"
}
{
    "status": "failure",
    "type" : "rate_limit",
    "description": "Too many requests"
}
{
    "status": "failure",
    "description": "Something went wrong. Please try again after some time"
}
{
    "status": "failure",
    "type": "invalid_value",
    "description": "Invalid campaign ID"
}
{
    "camapign_id": "231322",
    "camapign_status": "Error",
    "description": "No subscriber found"
}