Push
Get Push Import
Status, progress and results of a push import
GET
/
api
/
v1
/
push
/
imports
/
{importId}
Get Push Import
curl --request GET \
--url https://api.sequenzy.com/api/v1/push/imports/{importId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/push/imports/{importId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/push/imports/{importId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/v1/push/imports/{importId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/push/imports/{importId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sequenzy.com/api/v1/push/imports/{importId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/push/imports/{importId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"import": {
"id": "pimp_123",
"status": "completed",
"counts": { "imported": 41200, "matched": 950, "unsubscribed": 5100, "skipped": 860, "invalid": 100, "subscribersCreated": 12000 },
"skippedReasons": { "web_push_not_portable": 610, "no_contact_identity": 250 },
"invalidReasons": { "firebase_installation_id": 100 }
},
"message": "Import completed: 41200 imported, 950 matched, 5100 unsubscribed, 860 skipped, 100 invalid."
}
{
"error": "Invalid API key"
}
{
"error": "API key is missing required scope: subscribers:read"
}
{
"error": "Push import not found."
}
Returns one import. Poll it while the import runs. Requires the
subscribers:read scope.
status moves from draft to queued, exporting (reading devices from the source), importing (writing them), then completed, failed or canceled. stalled is true when a running import has not reported progress for 15 minutes; failed and stalled imports have canResume: true. progress.csvParts is { received, expected } for a csv draft created with csvParts, and null otherwise; such a draft starts only once received equals expected.
Counts: imported new devices, matched opted-in devices Sequenzy already had, unsubscribed opted-out devices (stored, never pushed), skipped and invalid with reasons in skippedReasons and invalidReasons, and subscribersCreated.
Request
string
required
The import ID.
curl https://api.sequenzy.com/api/v1/push/imports/pimp_123 \
--header "Authorization: Bearer $SEQUENZY_API_KEY"
Responses
{
"success": true,
"import": {
"id": "pimp_123",
"status": "completed",
"counts": { "imported": 41200, "matched": 950, "unsubscribed": 5100, "skipped": 860, "invalid": 100, "subscribersCreated": 12000 },
"skippedReasons": { "web_push_not_portable": 610, "no_contact_identity": 250 },
"invalidReasons": { "firebase_installation_id": 100 }
},
"message": "Import completed: 41200 imported, 950 matched, 5100 unsubscribed, 860 skipped, 100 invalid."
}
{
"error": "Invalid API key"
}
{
"error": "API key is missing required scope: subscribers:read"
}
{
"error": "Push import not found."
}
⌘I
Get Push Import
curl --request GET \
--url https://api.sequenzy.com/api/v1/push/imports/{importId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/push/imports/{importId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/push/imports/{importId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/v1/push/imports/{importId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/push/imports/{importId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.sequenzy.com/api/v1/push/imports/{importId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/push/imports/{importId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"import": {
"id": "pimp_123",
"status": "completed",
"counts": { "imported": 41200, "matched": 950, "unsubscribed": 5100, "skipped": 860, "invalid": 100, "subscribersCreated": 12000 },
"skippedReasons": { "web_push_not_portable": 610, "no_contact_identity": 250 },
"invalidReasons": { "firebase_installation_id": 100 }
},
"message": "Import completed: 41200 imported, 950 matched, 5100 unsubscribed, 860 skipped, 100 invalid."
}
{
"error": "Invalid API key"
}
{
"error": "API key is missing required scope: subscribers:read"
}
{
"error": "Push import not found."
}