curl --request POST \
--url https://api.passlet.io/v1/passes/{id}/notifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"platforms": [
"apple",
"google"
],
"sendAt": "2023-11-07T05:31:56Z",
"idempotencyKey": "<string>",
"options": {
"google": {
"header": "<string>"
}
}
}
'import requests
url = "https://api.passlet.io/v1/passes/{id}/notifications"
payload = {
"body": "<string>",
"platforms": ["apple", "google"],
"sendAt": "2023-11-07T05:31:56Z",
"idempotencyKey": "<string>",
"options": { "google": { "header": "<string>" } }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('<string>'),
platforms: ['apple', 'google'],
sendAt: '2023-11-07T05:31:56Z',
idempotencyKey: '<string>',
options: {google: {header: '<string>'}}
})
};
fetch('https://api.passlet.io/v1/passes/{id}/notifications', 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.passlet.io/v1/passes/{id}/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'body' => '<string>',
'platforms' => [
'apple',
'google'
],
'sendAt' => '2023-11-07T05:31:56Z',
'idempotencyKey' => '<string>',
'options' => [
'google' => [
'header' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.passlet.io/v1/passes/{id}/notifications"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"platforms\": [\n \"apple\",\n \"google\"\n ],\n \"sendAt\": \"2023-11-07T05:31:56Z\",\n \"idempotencyKey\": \"<string>\",\n \"options\": {\n \"google\": {\n \"header\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.passlet.io/v1/passes/{id}/notifications")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"platforms\": [\n \"apple\",\n \"google\"\n ],\n \"sendAt\": \"2023-11-07T05:31:56Z\",\n \"idempotencyKey\": \"<string>\",\n \"options\": {\n \"google\": {\n \"header\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.passlet.io/v1/passes/{id}/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"<string>\",\n \"platforms\": [\n \"apple\",\n \"google\"\n ],\n \"sendAt\": \"2023-11-07T05:31:56Z\",\n \"idempotencyKey\": \"<string>\",\n \"options\": {\n \"google\": {\n \"header\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"passId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "<string>",
"options": {
"google": {
"header": "<string>"
}
},
"sendAt": "2023-11-07T05:31:56Z",
"status": "SCHEDULED",
"apple": {
"status": "PENDING",
"error": "<string>",
"deviceCount": 0
},
"google": {
"status": "PENDING",
"error": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"passId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "<string>",
"options": {
"google": {
"header": "<string>"
}
},
"sendAt": "2023-11-07T05:31:56Z",
"status": "SCHEDULED",
"apple": {
"status": "PENDING",
"error": "<string>",
"deviceCount": 0
},
"google": {
"status": "PENDING",
"error": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}Send a notification to a pass
Sends (or schedules) a message to the wallet passes installed for this pass: Apple Wallet shows a lock-screen banner and stores the message in a back field; Google Wallet shows a push notification and stores it in the pass messages. By default the notification targets both platforms; set platforms to deliver to a single one (the other reports SKIPPED). Delivery is asynchronous: the notification is returned in PENDING (or SCHEDULED) status; poll it to observe per-platform progress. The pass must be ISSUED. Set sendAt to a future time to schedule; reuse an idempotencyKey to make retries safe (returns the existing notification with 200). Notifications targeting Google are limited to 3 per pass per 24 hours (429 with a Retry-After header beyond that); Apple-only notifications are not rate limited.
Requires the pass-notifications:write scope on the access token.
curl --request POST \
--url https://api.passlet.io/v1/passes/{id}/notifications \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"platforms": [
"apple",
"google"
],
"sendAt": "2023-11-07T05:31:56Z",
"idempotencyKey": "<string>",
"options": {
"google": {
"header": "<string>"
}
}
}
'import requests
url = "https://api.passlet.io/v1/passes/{id}/notifications"
payload = {
"body": "<string>",
"platforms": ["apple", "google"],
"sendAt": "2023-11-07T05:31:56Z",
"idempotencyKey": "<string>",
"options": { "google": { "header": "<string>" } }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('<string>'),
platforms: ['apple', 'google'],
sendAt: '2023-11-07T05:31:56Z',
idempotencyKey: '<string>',
options: {google: {header: '<string>'}}
})
};
fetch('https://api.passlet.io/v1/passes/{id}/notifications', 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.passlet.io/v1/passes/{id}/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'body' => '<string>',
'platforms' => [
'apple',
'google'
],
'sendAt' => '2023-11-07T05:31:56Z',
'idempotencyKey' => '<string>',
'options' => [
'google' => [
'header' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.passlet.io/v1/passes/{id}/notifications"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"platforms\": [\n \"apple\",\n \"google\"\n ],\n \"sendAt\": \"2023-11-07T05:31:56Z\",\n \"idempotencyKey\": \"<string>\",\n \"options\": {\n \"google\": {\n \"header\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.passlet.io/v1/passes/{id}/notifications")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"platforms\": [\n \"apple\",\n \"google\"\n ],\n \"sendAt\": \"2023-11-07T05:31:56Z\",\n \"idempotencyKey\": \"<string>\",\n \"options\": {\n \"google\": {\n \"header\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.passlet.io/v1/passes/{id}/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"<string>\",\n \"platforms\": [\n \"apple\",\n \"google\"\n ],\n \"sendAt\": \"2023-11-07T05:31:56Z\",\n \"idempotencyKey\": \"<string>\",\n \"options\": {\n \"google\": {\n \"header\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"passId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "<string>",
"options": {
"google": {
"header": "<string>"
}
},
"sendAt": "2023-11-07T05:31:56Z",
"status": "SCHEDULED",
"apple": {
"status": "PENDING",
"error": "<string>",
"deviceCount": 0
},
"google": {
"status": "PENDING",
"error": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"passId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "<string>",
"options": {
"google": {
"header": "<string>"
}
},
"sendAt": "2023-11-07T05:31:56Z",
"status": "SCHEDULED",
"apple": {
"status": "PENDING",
"error": "<string>",
"deviceCount": 0
},
"google": {
"status": "PENDING",
"error": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {},
"fieldErrors": [
{
"field": "<string>",
"message": "<string>",
"code": "UNAUTHORIZED"
}
]
}Authorizations
Path Parameters
Body
Schedule delivery for a future time; omit to send immediately
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Response
OK
Scheduled delivery time; null for immediate sends
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$Overall delivery status: SCHEDULED (sendAt in the future, nothing dispatched), PENDING (delivery in progress), SENT (delivered on every applicable platform), PARTIAL (one platform sent, the other failed), FAILED (failed on every applicable platform), SKIPPED (no targeted platform was applicable)
SCHEDULED, PENDING, SENT, PARTIAL, FAILED, SKIPPED "SCHEDULED"
ISO 8601 timestamp
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$ISO 8601 timestamp
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$