ReferenceMessages

Broadcasts

9 operations. Send Authorization: Bearer $PASSBOOK_KEY. Markdown

GET/api/v1/broadcasts
messages:writeSDK pb.broadcasts.list

Query

cursorstring · max 512
limitinteger · ≥ 1 · ≤ 200
state"draft" | "scheduled" | "sending" | "sent" | "partial" | "failed" | "cancelled"
origin"manual" | "rule"

Returns

200

Errors

CodeStatusFix
BROADCAST_INVALID_INPUTFix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs.
BROADCAST_NOT_CANCELLABLECheck the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message.
BROADCAST_NOT_DRAFTSend only drafts, or create a new message with POST /api/v1/broadcasts.
BROADCAST_NOT_EDITABLECreate a new message with POST /api/v1/broadcasts instead.
BROADCAST_NOT_FOUNDCheck the id with GET /api/v1/broadcasts.
BROADCAST_NOT_RETRYABLECheck the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message.
BROADCAST_ORGRemove the organization change and update the message in its own organization.
BROADCAST_PASTSet at to a future time.
BROADCAST_TOO_FARSet at to a time within the next year.
BROADCAST_UNKNOWN_INPUTUse only input names from GET /api/v1/templates/{id}/input-schema.
FORBIDDENUse a key with the scope the operation lists, or ask an org admin.
INVALID_API_KEYCreate a new key in the console and update PASSBOOK_KEY.
MESSAGING_UNSUPPORTEDUse a template that defines a message field, or add one to it.
MISSING_SCOPECreate a key with the scope the operation lists under security.
ORG_NOT_FOUNDCheck orgId with GET /api/v1/orgs.
PASS_CONFLICTFetch the pass with GET /api/v1/passes/{id} and send the request again.
RATE_LIMITEDWait for Retry-After seconds, then retry. Back off on repeats.
UNAUTHENTICATEDSend Authorization: Bearer $PASSBOOK_KEY.
VALIDATIONFix each field in issues and resend.
POST/api/v1/broadcasts
messages:writeSDK pb.broadcasts.create

Body

orgIdstring · max 64Required
kind"message" | "change"Required
targetobjectRequired
templateIdsstring · max 64[]Required
onDeviceboolean
holderState"unassigned" | "waiting" | "owned"
qstring · max 200
scanobject | object
matchobject | object | object[]
patchobjectRequired
namestring · max 80
notifyboolean
send"draft" | "now" | "schedule"
atinteger · ≥ 0
clearAfterinteger | null · ≥ 60000 · ≤ 31622400000

Returns

201

Errors

CodeStatusFix
BROADCAST_INVALID_INPUTFix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs.
BROADCAST_NOT_CANCELLABLECheck the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message.
BROADCAST_NOT_DRAFTSend only drafts, or create a new message with POST /api/v1/broadcasts.
BROADCAST_NOT_EDITABLECreate a new message with POST /api/v1/broadcasts instead.
BROADCAST_NOT_FOUNDCheck the id with GET /api/v1/broadcasts.
BROADCAST_NOT_RETRYABLECheck the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message.
BROADCAST_ORGRemove the organization change and update the message in its own organization.
BROADCAST_PASTSet at to a future time.
BROADCAST_TOO_FARSet at to a time within the next year.
BROADCAST_UNKNOWN_INPUTUse only input names from GET /api/v1/templates/{id}/input-schema.
FORBIDDENUse a key with the scope the operation lists, or ask an org admin.
INVALID_API_KEYCreate a new key in the console and update PASSBOOK_KEY.
MESSAGING_UNSUPPORTEDUse a template that defines a message field, or add one to it.
MISSING_SCOPECreate a key with the scope the operation lists under security.
ORG_NOT_FOUNDCheck orgId with GET /api/v1/orgs.
PASS_CONFLICTFetch the pass with GET /api/v1/passes/{id} and send the request again.
RATE_LIMITEDWait for Retry-After seconds, then retry. Back off on repeats.
UNAUTHENTICATEDSend Authorization: Bearer $PASSBOOK_KEY.
VALIDATIONFix each field in issues and resend.
POST/api/v1/broadcasts/preview
messages:writeSDK pb.broadcasts.countRecipients

Body

orgIdstring · max 64Required
targetobjectRequired
templateIdsstring · max 64[]Required
onDeviceboolean
holderState"unassigned" | "waiting" | "owned"
qstring · max 200
scanobject | object
matchobject | object | object[]

Returns

200

Errors

CodeStatusFix
BROADCAST_INVALID_INPUTFix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs.
BROADCAST_NOT_CANCELLABLECheck the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message.
BROADCAST_NOT_DRAFTSend only drafts, or create a new message with POST /api/v1/broadcasts.
BROADCAST_NOT_EDITABLECreate a new message with POST /api/v1/broadcasts instead.
BROADCAST_NOT_FOUNDCheck the id with GET /api/v1/broadcasts.
BROADCAST_NOT_RETRYABLECheck the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message.
BROADCAST_ORGRemove the organization change and update the message in its own organization.
BROADCAST_PASTSet at to a future time.
BROADCAST_TOO_FARSet at to a time within the next year.
BROADCAST_UNKNOWN_INPUTUse only input names from GET /api/v1/templates/{id}/input-schema.
FORBIDDENUse a key with the scope the operation lists, or ask an org admin.
INVALID_API_KEYCreate a new key in the console and update PASSBOOK_KEY.
MESSAGING_UNSUPPORTEDUse a template that defines a message field, or add one to it.
MISSING_SCOPECreate a key with the scope the operation lists under security.
ORG_NOT_FOUNDCheck orgId with GET /api/v1/orgs.
PASS_CONFLICTFetch the pass with GET /api/v1/passes/{id} and send the request again.
RATE_LIMITEDWait for Retry-After seconds, then retry. Back off on repeats.
UNAUTHENTICATEDSend Authorization: Bearer $PASSBOOK_KEY.
VALIDATIONFix each field in issues and resend.
GET/api/v1/broadcasts/{id}
messages:writeSDK pb.broadcasts.retrieve

Path

idstring · max 64Required

Returns

200

Errors

CodeStatusFix
BROADCAST_INVALID_INPUTFix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs.
BROADCAST_NOT_CANCELLABLECheck the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message.
BROADCAST_NOT_DRAFTSend only drafts, or create a new message with POST /api/v1/broadcasts.
BROADCAST_NOT_EDITABLECreate a new message with POST /api/v1/broadcasts instead.
BROADCAST_NOT_FOUNDCheck the id with GET /api/v1/broadcasts.
BROADCAST_NOT_RETRYABLECheck the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message.
BROADCAST_ORGRemove the organization change and update the message in its own organization.
BROADCAST_PASTSet at to a future time.
BROADCAST_TOO_FARSet at to a time within the next year.
BROADCAST_UNKNOWN_INPUTUse only input names from GET /api/v1/templates/{id}/input-schema.
FORBIDDENUse a key with the scope the operation lists, or ask an org admin.
INVALID_API_KEYCreate a new key in the console and update PASSBOOK_KEY.
MESSAGING_UNSUPPORTEDUse a template that defines a message field, or add one to it.
MISSING_SCOPECreate a key with the scope the operation lists under security.
NOT_FOUNDCheck the id, and that the key's mode (test or live) matches the object.
ORG_NOT_FOUNDCheck orgId with GET /api/v1/orgs.
PASS_CONFLICTFetch the pass with GET /api/v1/passes/{id} and send the request again.
RATE_LIMITEDWait for Retry-After seconds, then retry. Back off on repeats.
UNAUTHENTICATEDSend Authorization: Bearer $PASSBOOK_KEY.
VALIDATIONFix each field in issues and resend.
PATCH/api/v1/broadcasts/{id}
messages:writeSDK pb.broadcasts.update

Path

idstring · max 64Required

Body

orgIdstring · max 64Required
kind"message" | "change"Required
targetobjectRequired
templateIdsstring · max 64[]Required
onDeviceboolean
holderState"unassigned" | "waiting" | "owned"
qstring · max 200
scanobject | object
matchobject | object | object[]
patchobjectRequired
namestring · max 80
notifyboolean
send"draft" | "now" | "schedule"
atinteger · ≥ 0
clearAfterinteger | null · ≥ 60000 · ≤ 31622400000

Returns

200

Errors

CodeStatusFix
BROADCAST_INVALID_INPUTFix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs.
BROADCAST_NOT_CANCELLABLECheck the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message.
BROADCAST_NOT_DRAFTSend only drafts, or create a new message with POST /api/v1/broadcasts.
BROADCAST_NOT_EDITABLECreate a new message with POST /api/v1/broadcasts instead.
BROADCAST_NOT_FOUNDCheck the id with GET /api/v1/broadcasts.
BROADCAST_NOT_RETRYABLECheck the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message.
BROADCAST_ORGRemove the organization change and update the message in its own organization.
BROADCAST_PASTSet at to a future time.
BROADCAST_TOO_FARSet at to a time within the next year.
BROADCAST_UNKNOWN_INPUTUse only input names from GET /api/v1/templates/{id}/input-schema.
FORBIDDENUse a key with the scope the operation lists, or ask an org admin.
INVALID_API_KEYCreate a new key in the console and update PASSBOOK_KEY.
MESSAGING_UNSUPPORTEDUse a template that defines a message field, or add one to it.
MISSING_SCOPECreate a key with the scope the operation lists under security.
NOT_FOUNDCheck the id, and that the key's mode (test or live) matches the object.
ORG_NOT_FOUNDCheck orgId with GET /api/v1/orgs.
PASS_CONFLICTFetch the pass with GET /api/v1/passes/{id} and send the request again.
RATE_LIMITEDWait for Retry-After seconds, then retry. Back off on repeats.
UNAUTHENTICATEDSend Authorization: Bearer $PASSBOOK_KEY.
VALIDATIONFix each field in issues and resend.
POST/api/v1/broadcasts/{id}/send
messages:writeSDK pb.broadcasts.send

Path

idstring · max 64Required

Body

atinteger · ≥ 0

Returns

200

Errors

CodeStatusFix
BROADCAST_INVALID_INPUTFix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs.
BROADCAST_NOT_CANCELLABLECheck the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message.
BROADCAST_NOT_DRAFTSend only drafts, or create a new message with POST /api/v1/broadcasts.
BROADCAST_NOT_EDITABLECreate a new message with POST /api/v1/broadcasts instead.
BROADCAST_NOT_FOUNDCheck the id with GET /api/v1/broadcasts.
BROADCAST_NOT_RETRYABLECheck the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message.
BROADCAST_ORGRemove the organization change and update the message in its own organization.
BROADCAST_PASTSet at to a future time.
BROADCAST_TOO_FARSet at to a time within the next year.
BROADCAST_UNKNOWN_INPUTUse only input names from GET /api/v1/templates/{id}/input-schema.
FORBIDDENUse a key with the scope the operation lists, or ask an org admin.
INVALID_API_KEYCreate a new key in the console and update PASSBOOK_KEY.
MESSAGING_UNSUPPORTEDUse a template that defines a message field, or add one to it.
MISSING_SCOPECreate a key with the scope the operation lists under security.
NOT_FOUNDCheck the id, and that the key's mode (test or live) matches the object.
ORG_NOT_FOUNDCheck orgId with GET /api/v1/orgs.
PASS_CONFLICTFetch the pass with GET /api/v1/passes/{id} and send the request again.
RATE_LIMITEDWait for Retry-After seconds, then retry. Back off on repeats.
UNAUTHENTICATEDSend Authorization: Bearer $PASSBOOK_KEY.
VALIDATIONFix each field in issues and resend.
POST/api/v1/broadcasts/{id}/cancel
messages:writeSDK pb.broadcasts.cancel

Path

idstring · max 64Required

Returns

200

Errors

CodeStatusFix
BROADCAST_INVALID_INPUTFix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs.
BROADCAST_NOT_CANCELLABLECheck the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message.
BROADCAST_NOT_DRAFTSend only drafts, or create a new message with POST /api/v1/broadcasts.
BROADCAST_NOT_EDITABLECreate a new message with POST /api/v1/broadcasts instead.
BROADCAST_NOT_FOUNDCheck the id with GET /api/v1/broadcasts.
BROADCAST_NOT_RETRYABLECheck the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message.
BROADCAST_ORGRemove the organization change and update the message in its own organization.
BROADCAST_PASTSet at to a future time.
BROADCAST_TOO_FARSet at to a time within the next year.
BROADCAST_UNKNOWN_INPUTUse only input names from GET /api/v1/templates/{id}/input-schema.
FORBIDDENUse a key with the scope the operation lists, or ask an org admin.
INVALID_API_KEYCreate a new key in the console and update PASSBOOK_KEY.
MESSAGING_UNSUPPORTEDUse a template that defines a message field, or add one to it.
MISSING_SCOPECreate a key with the scope the operation lists under security.
NOT_FOUNDCheck the id, and that the key's mode (test or live) matches the object.
ORG_NOT_FOUNDCheck orgId with GET /api/v1/orgs.
PASS_CONFLICTFetch the pass with GET /api/v1/passes/{id} and send the request again.
RATE_LIMITEDWait for Retry-After seconds, then retry. Back off on repeats.
UNAUTHENTICATEDSend Authorization: Bearer $PASSBOOK_KEY.
VALIDATIONFix each field in issues and resend.
POST/api/v1/broadcasts/{id}/retry
messages:writeSDK pb.broadcasts.retry

Path

idstring · max 64Required

Returns

201

Errors

CodeStatusFix
BROADCAST_INVALID_INPUTFix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs.
BROADCAST_NOT_CANCELLABLECheck the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message.
BROADCAST_NOT_DRAFTSend only drafts, or create a new message with POST /api/v1/broadcasts.
BROADCAST_NOT_EDITABLECreate a new message with POST /api/v1/broadcasts instead.
BROADCAST_NOT_FOUNDCheck the id with GET /api/v1/broadcasts.
BROADCAST_NOT_RETRYABLECheck the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message.
BROADCAST_ORGRemove the organization change and update the message in its own organization.
BROADCAST_PASTSet at to a future time.
BROADCAST_TOO_FARSet at to a time within the next year.
BROADCAST_UNKNOWN_INPUTUse only input names from GET /api/v1/templates/{id}/input-schema.
FORBIDDENUse a key with the scope the operation lists, or ask an org admin.
INVALID_API_KEYCreate a new key in the console and update PASSBOOK_KEY.
MESSAGING_UNSUPPORTEDUse a template that defines a message field, or add one to it.
MISSING_SCOPECreate a key with the scope the operation lists under security.
NOT_FOUNDCheck the id, and that the key's mode (test or live) matches the object.
ORG_NOT_FOUNDCheck orgId with GET /api/v1/orgs.
PASS_CONFLICTFetch the pass with GET /api/v1/passes/{id} and send the request again.
RATE_LIMITEDWait for Retry-After seconds, then retry. Back off on repeats.
UNAUTHENTICATEDSend Authorization: Bearer $PASSBOOK_KEY.
VALIDATIONFix each field in issues and resend.

Recipients

GET/api/v1/broadcasts/{id}/items
messages:writeSDK pb.broadcasts.recipients.list

Path

idstring · max 64Required

Query

cursorstring · max 512
limitinteger · ≥ 1 · ≤ 200
outcome"updated" | "unchanged" | "failed"

Returns

200

Errors

CodeStatusFix
BROADCAST_INVALID_INPUTFix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs.
BROADCAST_NOT_CANCELLABLECheck the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message.
BROADCAST_NOT_DRAFTSend only drafts, or create a new message with POST /api/v1/broadcasts.
BROADCAST_NOT_EDITABLECreate a new message with POST /api/v1/broadcasts instead.
BROADCAST_NOT_FOUNDCheck the id with GET /api/v1/broadcasts.
BROADCAST_NOT_RETRYABLECheck the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message.
BROADCAST_ORGRemove the organization change and update the message in its own organization.
BROADCAST_PASTSet at to a future time.
BROADCAST_TOO_FARSet at to a time within the next year.
BROADCAST_UNKNOWN_INPUTUse only input names from GET /api/v1/templates/{id}/input-schema.
FORBIDDENUse a key with the scope the operation lists, or ask an org admin.
INVALID_API_KEYCreate a new key in the console and update PASSBOOK_KEY.
MESSAGING_UNSUPPORTEDUse a template that defines a message field, or add one to it.
MISSING_SCOPECreate a key with the scope the operation lists under security.
NOT_FOUNDCheck the id, and that the key's mode (test or live) matches the object.
ORG_NOT_FOUNDCheck orgId with GET /api/v1/orgs.
PASS_CONFLICTFetch the pass with GET /api/v1/passes/{id} and send the request again.
RATE_LIMITEDWait for Retry-After seconds, then retry. Back off on repeats.
UNAUTHENTICATEDSend Authorization: Bearer $PASSBOOK_KEY.
VALIDATIONFix each field in issues and resend.