Push
Start Push Import
Start a draft, or resume a failed or stalled import
POST
/
api
/
v1
/
push
/
imports
/
{importId}
/
start
Start Push Import
curl --request POST \
--url https://api.sequenzy.com/api/v1/push/imports/{importId}/start \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/push/imports/{importId}/start"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/push/imports/{importId}/start', 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}/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/start"
req, _ := http.NewRequest("POST", 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.post("https://api.sequenzy.com/api/v1/push/imports/{importId}/start")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/push/imports/{importId}/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"import": { "id": "pimp_123", "status": "queued" },
"message": "Import queued."
}
{
"error": "Add CSV rows before starting the import."
}
{
"error": "Invalid API key"
}
{
"error": "API key is missing required scope: subscribers:write"
}
{
"error": "Push import not found."
}
{
"error": "Another push import is running. Wait for it to finish or cancel it first."
}
Starts a draft import in the background, or resumes a failed or stalled one from its last checkpoint; already imported devices are never written twice. Starting an import that is already running returns it unchanged. One import runs per workspace at a time. A
csv draft created with csvParts returns 409 until every declared part has been added. Poll Get Push Import for progress. Requires the subscribers:write scope.
The import never sends a notification. The first sends after it retire tokens the push services reject (expired, uninstalled, or from another app or Firebase project) automatically.
Request
string
required
The import ID.
curl https://api.sequenzy.com/api/v1/push/imports/pimp_123/start \
--request POST \
--header "Authorization: Bearer $SEQUENZY_API_KEY"
Responses
{
"success": true,
"import": { "id": "pimp_123", "status": "queued" },
"message": "Import queued."
}
{
"error": "Add CSV rows before starting the import."
}
{
"error": "Invalid API key"
}
{
"error": "API key is missing required scope: subscribers:write"
}
{
"error": "Push import not found."
}
{
"error": "Another push import is running. Wait for it to finish or cancel it first."
}
⌘I
Start Push Import
curl --request POST \
--url https://api.sequenzy.com/api/v1/push/imports/{importId}/start \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/push/imports/{importId}/start"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/push/imports/{importId}/start', 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}/start",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/start"
req, _ := http.NewRequest("POST", 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.post("https://api.sequenzy.com/api/v1/push/imports/{importId}/start")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/push/imports/{importId}/start")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"import": { "id": "pimp_123", "status": "queued" },
"message": "Import queued."
}
{
"error": "Add CSV rows before starting the import."
}
{
"error": "Invalid API key"
}
{
"error": "API key is missing required scope: subscribers:write"
}
{
"error": "Push import not found."
}
{
"error": "Another push import is running. Wait for it to finish or cancel it first."
}