curl --request POST \
--url https://api.passlet.io/v1/projects/{id}/broadcasts \
--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/projects/{id}/broadcasts"
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/projects/{id}/broadcasts', 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/projects/{id}/broadcasts",
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/projects/{id}/broadcasts"
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/projects/{id}/broadcasts")
.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/projects/{id}/broadcasts")
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",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "<string>",
"platforms": [
"apple"
],
"options": {
"google": {
"header": "<string>"
}
},
"sendAt": "2023-11-07T05:31:56Z",
"status": "SCHEDULED",
"passCount": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "<string>",
"platforms": [
"apple"
],
"options": {
"google": {
"header": "<string>"
}
},
"sendAt": "2023-11-07T05:31:56Z",
"status": "SCHEDULED",
"passCount": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}Broadcast a notification to a project
Creates the order to send one notification to every ISSUED pass in the project. The request body is identical to sending a notification to a single pass. At dispatch time (sendAt, or immediately) the project’s issued passes are snapshotted and one ordinary pass notification is created per pass; those per-pass notifications carry all delivery state and appear under GET /v1/passes/{id}/notifications with their broadcastId set; the broadcast itself only reports its dispatch lifecycle (status, passCount). Set sendAt to a future time to schedule; reuse an idempotencyKey to make retries safe (returns the existing broadcast with 200). The per-pass Google rate limit (3 per pass per 24 hours) is not checked here; passes over the cap resolve their google delivery as FAILED on their own notification.
Requires the pass-notifications:write scope on the access token.
curl --request POST \
--url https://api.passlet.io/v1/projects/{id}/broadcasts \
--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/projects/{id}/broadcasts"
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/projects/{id}/broadcasts', 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/projects/{id}/broadcasts",
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/projects/{id}/broadcasts"
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/projects/{id}/broadcasts")
.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/projects/{id}/broadcasts")
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",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "<string>",
"platforms": [
"apple"
],
"options": {
"google": {
"header": "<string>"
}
},
"sendAt": "2023-11-07T05:31:56Z",
"status": "SCHEDULED",
"passCount": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"body": "<string>",
"platforms": [
"apple"
],
"options": {
"google": {
"header": "<string>"
}
},
"sendAt": "2023-11-07T05:31:56Z",
"status": "SCHEDULED",
"passCount": 0,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}{
"errorCode": "UNAUTHORIZED",
"message": "<string>",
"correlationId": "<string>",
"details": {}
}Authorizations
Passlet access token (plt_*) sent as Authorization: Bearer <token> or X-API-Key. Authorized scopes are listed per operation under x-required-scopes.
Path Parameters
Resource identifier
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Body
Message text shown on the pass and in the push notification
1 - 1000Wallet platforms to deliver to; omit to deliver to all platforms
1Wallet platform a notification is delivered to
apple, google 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))$Unique per workspace. Reusing a key returns the existing notification (200) instead of sending a duplicate
8 - 100Provider-specific delivery options
Show child attributes
Show child attributes
Response
OK
Pass notification broadcast identifier
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Project whose issued passes the broadcast targets
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Message text
Wallet platforms every fanned-out notification targets
Wallet platform a notification is delivered to
apple, google Provider-specific options supplied at creation
Show child attributes
Show child attributes
Scheduled dispatch time; null for immediate broadcasts
^(?:(?:\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))$Dispatch lifecycle: SCHEDULED (sendAt in the future, fan-out not started), PENDING (fan-out in progress), DISPATCHED (every per-pass notification created). Delivery state lives on the per-pass notifications, never on the broadcast
SCHEDULED, PENDING, DISPATCHED "SCHEDULED"
Issued passes the broadcast fanned out to; null until dispatch completes
-9007199254740991 <= x <= 9007199254740991ISO 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))$