curl --request POST \
--url https://api.passlet.io/v1/passes/{id}/email \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.passlet.io/v1/passes/{id}/email"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.passlet.io/v1/passes/{id}/email', 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}/email",
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.passlet.io/v1/passes/{id}/email"
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.passlet.io/v1/passes/{id}/email")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.passlet.io/v1/passes/{id}/email")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"passId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "ISSUE",
"status": "QUEUED",
"error": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"deliveredAt": "2023-11-07T05:31:56Z",
"bouncedAt": "2023-11-07T05:31:56Z",
"complainedAt": "2023-11-07T05:31:56Z",
"failedAt": "2023-11-07T05:31:56Z"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"passId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "ISSUE",
"status": "QUEUED",
"error": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"deliveredAt": "2023-11-07T05:31:56Z",
"bouncedAt": "2023-11-07T05:31:56Z",
"complainedAt": "2023-11-07T05:31:56Z",
"failedAt": "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"
}
]
}Email a pass to its holder
Emails the pass to its holder: the pass’s email address gets the email of the pass’s template (its published version), with Add to Apple Wallet and Add to Google Wallet buttons. The email is queued and sent shortly after; each call sends a new email, so call it again to resend. The pass must be ISSUED, have an email, and its template must have email turned on. Send an Idempotency-Key header to make retries safe. Each workspace sends a limited number of pass emails per UTC day; at the limit this returns 429 (PASS_EMAIL_DAILY_LIMIT_REACHED) with a Retry-After until 00:00 UTC.
Requires the passes:write scope on the access token.
curl --request POST \
--url https://api.passlet.io/v1/passes/{id}/email \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.passlet.io/v1/passes/{id}/email"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.passlet.io/v1/passes/{id}/email', 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}/email",
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.passlet.io/v1/passes/{id}/email"
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.passlet.io/v1/passes/{id}/email")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.passlet.io/v1/passes/{id}/email")
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{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"passId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "ISSUE",
"status": "QUEUED",
"error": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"deliveredAt": "2023-11-07T05:31:56Z",
"bouncedAt": "2023-11-07T05:31:56Z",
"complainedAt": "2023-11-07T05:31:56Z",
"failedAt": "2023-11-07T05:31:56Z"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"passId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"trigger": "ISSUE",
"status": "QUEUED",
"error": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"sentAt": "2023-11-07T05:31:56Z",
"deliveredAt": "2023-11-07T05:31:56Z",
"bouncedAt": "2023-11-07T05:31:56Z",
"complainedAt": "2023-11-07T05:31:56Z",
"failedAt": "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
Headers
Path Parameters
Response
OK
QUEUED: waiting to be sent. SENT: handed to the mail provider. DELIVERED: accepted by the holder’s mail server. BOUNCED: the address does not accept mail. COMPLAINED: the holder marked it as spam. FAILED: could not be sent (see error). SUPPRESSED: not sent, the address bounced or complained before, or the holder unsubscribed (see error). LIMITED: not sent, the workspace had reached its daily pass email limit (see error).
QUEUED, SENT, DELIVERED, BOUNCED, COMPLAINED, FAILED, SUPPRESSED, LIMITED "QUEUED"
When the email was queued
^(?:(?:\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))$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))$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))$