# Broadcasts

Messages · PassBook API reference. Authenticate with `Authorization: Bearer $PASSBOOK_KEY`.

## List messages and scheduled changes {#list}

`GET /api/v1/broadcasts`

Scopes: `messages:write`. SDK name: `pb.broadcasts.list`.

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `cursor` | query | string · max 512 |  |  |
| `limit` | query | integer · ≥ 1 · ≤ 200 |  |  |
| `state` | query | "draft" \| "scheduled" \| "sending" \| "sent" \| "partial" \| "failed" \| "cancelled" |  |  |
| `origin` | query | "manual" \| "rule" |  |  |

Returns `200`.

| Code | Status | Fix |
| --- | --- | --- |
| `BROADCAST_INVALID_INPUT` |  | Fix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs. |
| `BROADCAST_NOT_CANCELLABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message. |
| `BROADCAST_NOT_DRAFT` |  | Send only drafts, or create a new message with POST /api/v1/broadcasts. |
| `BROADCAST_NOT_EDITABLE` |  | Create a new message with POST /api/v1/broadcasts instead. |
| `BROADCAST_NOT_FOUND` |  | Check the id with GET /api/v1/broadcasts. |
| `BROADCAST_NOT_RETRYABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message. |
| `BROADCAST_ORG` |  | Remove the organization change and update the message in its own organization. |
| `BROADCAST_PAST` |  | Set at to a future time. |
| `BROADCAST_TOO_FAR` |  | Set at to a time within the next year. |
| `BROADCAST_UNKNOWN_INPUT` |  | Use only input names from GET /api/v1/templates/{id}/input-schema. |
| `FORBIDDEN` |  | Use a key with the scope the operation lists, or ask an org admin. |
| `INVALID_API_KEY` |  | Create a new key in the console and update PASSBOOK_KEY. |
| `MESSAGING_UNSUPPORTED` |  | Use a template that defines a message field, or add one to it. |
| `MISSING_SCOPE` |  | Create a key with the scope the operation lists under security. |
| `ORG_NOT_FOUND` |  | Check orgId with GET /api/v1/orgs. |
| `PASS_CONFLICT` |  | Fetch the pass with GET /api/v1/passes/{id} and send the request again. |
| `RATE_LIMITED` |  | Wait for Retry-After seconds, then retry. Back off on repeats. |
| `UNAUTHENTICATED` |  | Send Authorization: Bearer $PASSBOOK_KEY. |
| `VALIDATION` |  | Fix each field in issues and resend. |

```sh
curl -X GET "https://passbook.mobile/api/v1/broadcasts" \
  -H "Authorization: Bearer $PASSBOOK_KEY"
```

## Save, send or schedule a message or change {#create}

`POST /api/v1/broadcasts`

Scopes: `messages:write`. SDK name: `pb.broadcasts.create`.

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgId` | body | string · max 64 | yes |  |
| `kind` | body | "message" \| "change" | yes |  |
| `target` | body | object | yes |  |
| · `templateIds` | body | string · max 64[] | yes |  |
| · `onDevice` | body | boolean |  |  |
| · `holderState` | body | "unassigned" \| "waiting" \| "owned" |  |  |
| · `q` | body | string · max 200 |  |  |
| · `scan` | body | object \| object |  |  |
| · `match` | body | object \| object \| object[] |  |  |
| `patch` | body | object | yes |  |
| `name` | body | string · max 80 |  |  |
| `notify` | body | boolean |  |  |
| `send` | body | "draft" \| "now" \| "schedule" |  |  |
| `at` | body | integer · ≥ 0 |  |  |
| `clearAfter` | body | integer \| null · ≥ 60000 · ≤ 31622400000 |  |  |

Returns `201`.

| Code | Status | Fix |
| --- | --- | --- |
| `BROADCAST_INVALID_INPUT` |  | Fix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs. |
| `BROADCAST_NOT_CANCELLABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message. |
| `BROADCAST_NOT_DRAFT` |  | Send only drafts, or create a new message with POST /api/v1/broadcasts. |
| `BROADCAST_NOT_EDITABLE` |  | Create a new message with POST /api/v1/broadcasts instead. |
| `BROADCAST_NOT_FOUND` |  | Check the id with GET /api/v1/broadcasts. |
| `BROADCAST_NOT_RETRYABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message. |
| `BROADCAST_ORG` |  | Remove the organization change and update the message in its own organization. |
| `BROADCAST_PAST` |  | Set at to a future time. |
| `BROADCAST_TOO_FAR` |  | Set at to a time within the next year. |
| `BROADCAST_UNKNOWN_INPUT` |  | Use only input names from GET /api/v1/templates/{id}/input-schema. |
| `FORBIDDEN` |  | Use a key with the scope the operation lists, or ask an org admin. |
| `INVALID_API_KEY` |  | Create a new key in the console and update PASSBOOK_KEY. |
| `MESSAGING_UNSUPPORTED` |  | Use a template that defines a message field, or add one to it. |
| `MISSING_SCOPE` |  | Create a key with the scope the operation lists under security. |
| `ORG_NOT_FOUND` |  | Check orgId with GET /api/v1/orgs. |
| `PASS_CONFLICT` |  | Fetch the pass with GET /api/v1/passes/{id} and send the request again. |
| `RATE_LIMITED` |  | Wait for Retry-After seconds, then retry. Back off on repeats. |
| `UNAUTHENTICATED` |  | Send Authorization: Bearer $PASSBOOK_KEY. |
| `VALIDATION` |  | Fix each field in issues and resend. |

```sh
curl -X POST "https://passbook.mobile/api/v1/broadcasts" \
  -H "Authorization: Bearer $PASSBOOK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "orgId": "0193a1b2-7c00-7000-8000-0000000000a1",
  "kind": "message",
  "name": "Doors open",
  "target": {
    "templateIds": [
      "0193a1b2-7c00-7000-8000-0000000000b1"
    ]
  },
  "patch": {
    "message": "Doors open at 6 PM."
  },
  "send": "draft"
}'
```

## Count the passes a target matches {#countRecipients}

`POST /api/v1/broadcasts/preview`

Scopes: `messages:write`. SDK name: `pb.broadcasts.countRecipients`.

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `orgId` | body | string · max 64 | yes |  |
| `target` | body | object | yes |  |
| · `templateIds` | body | string · max 64[] | yes |  |
| · `onDevice` | body | boolean |  |  |
| · `holderState` | body | "unassigned" \| "waiting" \| "owned" |  |  |
| · `q` | body | string · max 200 |  |  |
| · `scan` | body | object \| object |  |  |
| · `match` | body | object \| object \| object[] |  |  |

Returns `200`.

| Code | Status | Fix |
| --- | --- | --- |
| `BROADCAST_INVALID_INPUT` |  | Fix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs. |
| `BROADCAST_NOT_CANCELLABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message. |
| `BROADCAST_NOT_DRAFT` |  | Send only drafts, or create a new message with POST /api/v1/broadcasts. |
| `BROADCAST_NOT_EDITABLE` |  | Create a new message with POST /api/v1/broadcasts instead. |
| `BROADCAST_NOT_FOUND` |  | Check the id with GET /api/v1/broadcasts. |
| `BROADCAST_NOT_RETRYABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message. |
| `BROADCAST_ORG` |  | Remove the organization change and update the message in its own organization. |
| `BROADCAST_PAST` |  | Set at to a future time. |
| `BROADCAST_TOO_FAR` |  | Set at to a time within the next year. |
| `BROADCAST_UNKNOWN_INPUT` |  | Use only input names from GET /api/v1/templates/{id}/input-schema. |
| `FORBIDDEN` |  | Use a key with the scope the operation lists, or ask an org admin. |
| `INVALID_API_KEY` |  | Create a new key in the console and update PASSBOOK_KEY. |
| `MESSAGING_UNSUPPORTED` |  | Use a template that defines a message field, or add one to it. |
| `MISSING_SCOPE` |  | Create a key with the scope the operation lists under security. |
| `ORG_NOT_FOUND` |  | Check orgId with GET /api/v1/orgs. |
| `PASS_CONFLICT` |  | Fetch the pass with GET /api/v1/passes/{id} and send the request again. |
| `RATE_LIMITED` |  | Wait for Retry-After seconds, then retry. Back off on repeats. |
| `UNAUTHENTICATED` |  | Send Authorization: Bearer $PASSBOOK_KEY. |
| `VALIDATION` |  | Fix each field in issues and resend. |

```sh
curl -X POST "https://passbook.mobile/api/v1/broadcasts/preview" \
  -H "Authorization: Bearer $PASSBOOK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "orgId": "0193a1b2-7c00-7000-8000-0000000000a1",
  "target": {
    "templateIds": [
      "0193a1b2-7c00-7000-8000-0000000000b1"
    ]
  }
}'
```

## One message or change, with progress {#retrieve}

`GET /api/v1/broadcasts/{id}`

Scopes: `messages:write`. SDK name: `pb.broadcasts.retrieve`.

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string · max 64 | yes |  |

Returns `200`.

| Code | Status | Fix |
| --- | --- | --- |
| `BROADCAST_INVALID_INPUT` |  | Fix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs. |
| `BROADCAST_NOT_CANCELLABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message. |
| `BROADCAST_NOT_DRAFT` |  | Send only drafts, or create a new message with POST /api/v1/broadcasts. |
| `BROADCAST_NOT_EDITABLE` |  | Create a new message with POST /api/v1/broadcasts instead. |
| `BROADCAST_NOT_FOUND` |  | Check the id with GET /api/v1/broadcasts. |
| `BROADCAST_NOT_RETRYABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message. |
| `BROADCAST_ORG` |  | Remove the organization change and update the message in its own organization. |
| `BROADCAST_PAST` |  | Set at to a future time. |
| `BROADCAST_TOO_FAR` |  | Set at to a time within the next year. |
| `BROADCAST_UNKNOWN_INPUT` |  | Use only input names from GET /api/v1/templates/{id}/input-schema. |
| `FORBIDDEN` |  | Use a key with the scope the operation lists, or ask an org admin. |
| `INVALID_API_KEY` |  | Create a new key in the console and update PASSBOOK_KEY. |
| `MESSAGING_UNSUPPORTED` |  | Use a template that defines a message field, or add one to it. |
| `MISSING_SCOPE` |  | Create a key with the scope the operation lists under security. |
| `NOT_FOUND` |  | Check the id, and that the key's mode (test or live) matches the object. |
| `ORG_NOT_FOUND` |  | Check orgId with GET /api/v1/orgs. |
| `PASS_CONFLICT` |  | Fetch the pass with GET /api/v1/passes/{id} and send the request again. |
| `RATE_LIMITED` |  | Wait for Retry-After seconds, then retry. Back off on repeats. |
| `UNAUTHENTICATED` |  | Send Authorization: Bearer $PASSBOOK_KEY. |
| `VALIDATION` |  | Fix each field in issues and resend. |

```sh
curl -X GET "https://passbook.mobile/api/v1/broadcasts/0193a1b2-7c00-7000-8000-0000000000e1" \
  -H "Authorization: Bearer $PASSBOOK_KEY"
```

## Edit a draft or a scheduled message that has not started {#update}

`PATCH /api/v1/broadcasts/{id}`

Scopes: `messages:write`. SDK name: `pb.broadcasts.update`.

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string · max 64 | yes |  |
| `orgId` | body | string · max 64 | yes |  |
| `kind` | body | "message" \| "change" | yes |  |
| `target` | body | object | yes |  |
| · `templateIds` | body | string · max 64[] | yes |  |
| · `onDevice` | body | boolean |  |  |
| · `holderState` | body | "unassigned" \| "waiting" \| "owned" |  |  |
| · `q` | body | string · max 200 |  |  |
| · `scan` | body | object \| object |  |  |
| · `match` | body | object \| object \| object[] |  |  |
| `patch` | body | object | yes |  |
| `name` | body | string · max 80 |  |  |
| `notify` | body | boolean |  |  |
| `send` | body | "draft" \| "now" \| "schedule" |  |  |
| `at` | body | integer · ≥ 0 |  |  |
| `clearAfter` | body | integer \| null · ≥ 60000 · ≤ 31622400000 |  |  |

Returns `200`.

| Code | Status | Fix |
| --- | --- | --- |
| `BROADCAST_INVALID_INPUT` |  | Fix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs. |
| `BROADCAST_NOT_CANCELLABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message. |
| `BROADCAST_NOT_DRAFT` |  | Send only drafts, or create a new message with POST /api/v1/broadcasts. |
| `BROADCAST_NOT_EDITABLE` |  | Create a new message with POST /api/v1/broadcasts instead. |
| `BROADCAST_NOT_FOUND` |  | Check the id with GET /api/v1/broadcasts. |
| `BROADCAST_NOT_RETRYABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message. |
| `BROADCAST_ORG` |  | Remove the organization change and update the message in its own organization. |
| `BROADCAST_PAST` |  | Set at to a future time. |
| `BROADCAST_TOO_FAR` |  | Set at to a time within the next year. |
| `BROADCAST_UNKNOWN_INPUT` |  | Use only input names from GET /api/v1/templates/{id}/input-schema. |
| `FORBIDDEN` |  | Use a key with the scope the operation lists, or ask an org admin. |
| `INVALID_API_KEY` |  | Create a new key in the console and update PASSBOOK_KEY. |
| `MESSAGING_UNSUPPORTED` |  | Use a template that defines a message field, or add one to it. |
| `MISSING_SCOPE` |  | Create a key with the scope the operation lists under security. |
| `NOT_FOUND` |  | Check the id, and that the key's mode (test or live) matches the object. |
| `ORG_NOT_FOUND` |  | Check orgId with GET /api/v1/orgs. |
| `PASS_CONFLICT` |  | Fetch the pass with GET /api/v1/passes/{id} and send the request again. |
| `RATE_LIMITED` |  | Wait for Retry-After seconds, then retry. Back off on repeats. |
| `UNAUTHENTICATED` |  | Send Authorization: Bearer $PASSBOOK_KEY. |
| `VALIDATION` |  | Fix each field in issues and resend. |

```sh
curl -X PATCH "https://passbook.mobile/api/v1/broadcasts/0193a1b2-7c00-7000-8000-0000000000e1" \
  -H "Authorization: Bearer $PASSBOOK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "orgId": "0193a1b2-7c00-7000-8000-0000000000a1",
  "kind": "message",
  "target": {
    "templateIds": [
      "0193a1b2-7c00-7000-8000-0000000000b1"
    ]
  },
  "patch": {
    "message": "Doors open at 6:30 PM."
  }
}'
```

## Send a draft now or at a time {#send}

`POST /api/v1/broadcasts/{id}/send`

Scopes: `messages:write`. SDK name: `pb.broadcasts.send`.

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string · max 64 | yes |  |
| `at` | body | integer · ≥ 0 |  |  |

Returns `200`.

| Code | Status | Fix |
| --- | --- | --- |
| `BROADCAST_INVALID_INPUT` |  | Fix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs. |
| `BROADCAST_NOT_CANCELLABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message. |
| `BROADCAST_NOT_DRAFT` |  | Send only drafts, or create a new message with POST /api/v1/broadcasts. |
| `BROADCAST_NOT_EDITABLE` |  | Create a new message with POST /api/v1/broadcasts instead. |
| `BROADCAST_NOT_FOUND` |  | Check the id with GET /api/v1/broadcasts. |
| `BROADCAST_NOT_RETRYABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message. |
| `BROADCAST_ORG` |  | Remove the organization change and update the message in its own organization. |
| `BROADCAST_PAST` |  | Set at to a future time. |
| `BROADCAST_TOO_FAR` |  | Set at to a time within the next year. |
| `BROADCAST_UNKNOWN_INPUT` |  | Use only input names from GET /api/v1/templates/{id}/input-schema. |
| `FORBIDDEN` |  | Use a key with the scope the operation lists, or ask an org admin. |
| `INVALID_API_KEY` |  | Create a new key in the console and update PASSBOOK_KEY. |
| `MESSAGING_UNSUPPORTED` |  | Use a template that defines a message field, or add one to it. |
| `MISSING_SCOPE` |  | Create a key with the scope the operation lists under security. |
| `NOT_FOUND` |  | Check the id, and that the key's mode (test or live) matches the object. |
| `ORG_NOT_FOUND` |  | Check orgId with GET /api/v1/orgs. |
| `PASS_CONFLICT` |  | Fetch the pass with GET /api/v1/passes/{id} and send the request again. |
| `RATE_LIMITED` |  | Wait for Retry-After seconds, then retry. Back off on repeats. |
| `UNAUTHENTICATED` |  | Send Authorization: Bearer $PASSBOOK_KEY. |
| `VALIDATION` |  | Fix each field in issues and resend. |

```sh
curl -X POST "https://passbook.mobile/api/v1/broadcasts/0193a1b2-7c00-7000-8000-0000000000e1/send" \
  -H "Authorization: Bearer $PASSBOOK_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Cancel a draft or scheduled message {#cancel}

`POST /api/v1/broadcasts/{id}/cancel`

Scopes: `messages:write`. SDK name: `pb.broadcasts.cancel`.

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string · max 64 | yes |  |

Returns `200`.

| Code | Status | Fix |
| --- | --- | --- |
| `BROADCAST_INVALID_INPUT` |  | Fix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs. |
| `BROADCAST_NOT_CANCELLABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message. |
| `BROADCAST_NOT_DRAFT` |  | Send only drafts, or create a new message with POST /api/v1/broadcasts. |
| `BROADCAST_NOT_EDITABLE` |  | Create a new message with POST /api/v1/broadcasts instead. |
| `BROADCAST_NOT_FOUND` |  | Check the id with GET /api/v1/broadcasts. |
| `BROADCAST_NOT_RETRYABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message. |
| `BROADCAST_ORG` |  | Remove the organization change and update the message in its own organization. |
| `BROADCAST_PAST` |  | Set at to a future time. |
| `BROADCAST_TOO_FAR` |  | Set at to a time within the next year. |
| `BROADCAST_UNKNOWN_INPUT` |  | Use only input names from GET /api/v1/templates/{id}/input-schema. |
| `FORBIDDEN` |  | Use a key with the scope the operation lists, or ask an org admin. |
| `INVALID_API_KEY` |  | Create a new key in the console and update PASSBOOK_KEY. |
| `MESSAGING_UNSUPPORTED` |  | Use a template that defines a message field, or add one to it. |
| `MISSING_SCOPE` |  | Create a key with the scope the operation lists under security. |
| `NOT_FOUND` |  | Check the id, and that the key's mode (test or live) matches the object. |
| `ORG_NOT_FOUND` |  | Check orgId with GET /api/v1/orgs. |
| `PASS_CONFLICT` |  | Fetch the pass with GET /api/v1/passes/{id} and send the request again. |
| `RATE_LIMITED` |  | Wait for Retry-After seconds, then retry. Back off on repeats. |
| `UNAUTHENTICATED` |  | Send Authorization: Bearer $PASSBOOK_KEY. |
| `VALIDATION` |  | Fix each field in issues and resend. |

```sh
curl -X POST "https://passbook.mobile/api/v1/broadcasts/0193a1b2-7c00-7000-8000-0000000000e1/cancel" \
  -H "Authorization: Bearer $PASSBOOK_KEY"
```

## Send a failed or cancelled message again, as a new one in the same mode {#retry}

`POST /api/v1/broadcasts/{id}/retry`

Scopes: `messages:write`. SDK name: `pb.broadcasts.retry`.

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string · max 64 | yes |  |

Returns `201`.

| Code | Status | Fix |
| --- | --- | --- |
| `BROADCAST_INVALID_INPUT` |  | Fix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs. |
| `BROADCAST_NOT_CANCELLABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message. |
| `BROADCAST_NOT_DRAFT` |  | Send only drafts, or create a new message with POST /api/v1/broadcasts. |
| `BROADCAST_NOT_EDITABLE` |  | Create a new message with POST /api/v1/broadcasts instead. |
| `BROADCAST_NOT_FOUND` |  | Check the id with GET /api/v1/broadcasts. |
| `BROADCAST_NOT_RETRYABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message. |
| `BROADCAST_ORG` |  | Remove the organization change and update the message in its own organization. |
| `BROADCAST_PAST` |  | Set at to a future time. |
| `BROADCAST_TOO_FAR` |  | Set at to a time within the next year. |
| `BROADCAST_UNKNOWN_INPUT` |  | Use only input names from GET /api/v1/templates/{id}/input-schema. |
| `FORBIDDEN` |  | Use a key with the scope the operation lists, or ask an org admin. |
| `INVALID_API_KEY` |  | Create a new key in the console and update PASSBOOK_KEY. |
| `MESSAGING_UNSUPPORTED` |  | Use a template that defines a message field, or add one to it. |
| `MISSING_SCOPE` |  | Create a key with the scope the operation lists under security. |
| `NOT_FOUND` |  | Check the id, and that the key's mode (test or live) matches the object. |
| `ORG_NOT_FOUND` |  | Check orgId with GET /api/v1/orgs. |
| `PASS_CONFLICT` |  | Fetch the pass with GET /api/v1/passes/{id} and send the request again. |
| `RATE_LIMITED` |  | Wait for Retry-After seconds, then retry. Back off on repeats. |
| `UNAUTHENTICATED` |  | Send Authorization: Bearer $PASSBOOK_KEY. |
| `VALIDATION` |  | Fix each field in issues and resend. |

```sh
curl -X POST "https://passbook.mobile/api/v1/broadcasts/0193a1b2-7c00-7000-8000-0000000000e1/retry" \
  -H "Authorization: Bearer $PASSBOOK_KEY"
```

## The passes a message reached: updated, unchanged or failed {#recipients-list}

`GET /api/v1/broadcasts/{id}/items`

Scopes: `messages:write`. SDK name: `pb.broadcasts.recipients.list`.

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string · max 64 | yes |  |
| `cursor` | query | string · max 512 |  |  |
| `limit` | query | integer · ≥ 1 · ≤ 200 |  |  |
| `outcome` | query | "updated" \| "unchanged" \| "failed" |  |  |

Returns `200`.

| Code | Status | Fix |
| --- | --- | --- |
| `BROADCAST_INVALID_INPUT` |  | Fix the values named in issues; GET /api/v1/templates/{id}/input-schema lists the allowed inputs. |
| `BROADCAST_NOT_CANCELLABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and cancel only a draft or scheduled message. |
| `BROADCAST_NOT_DRAFT` |  | Send only drafts, or create a new message with POST /api/v1/broadcasts. |
| `BROADCAST_NOT_EDITABLE` |  | Create a new message with POST /api/v1/broadcasts instead. |
| `BROADCAST_NOT_FOUND` |  | Check the id with GET /api/v1/broadcasts. |
| `BROADCAST_NOT_RETRYABLE` |  | Check the state with GET /api/v1/broadcasts/{id} and retry only a failed or cancelled message. |
| `BROADCAST_ORG` |  | Remove the organization change and update the message in its own organization. |
| `BROADCAST_PAST` |  | Set at to a future time. |
| `BROADCAST_TOO_FAR` |  | Set at to a time within the next year. |
| `BROADCAST_UNKNOWN_INPUT` |  | Use only input names from GET /api/v1/templates/{id}/input-schema. |
| `FORBIDDEN` |  | Use a key with the scope the operation lists, or ask an org admin. |
| `INVALID_API_KEY` |  | Create a new key in the console and update PASSBOOK_KEY. |
| `MESSAGING_UNSUPPORTED` |  | Use a template that defines a message field, or add one to it. |
| `MISSING_SCOPE` |  | Create a key with the scope the operation lists under security. |
| `NOT_FOUND` |  | Check the id, and that the key's mode (test or live) matches the object. |
| `ORG_NOT_FOUND` |  | Check orgId with GET /api/v1/orgs. |
| `PASS_CONFLICT` |  | Fetch the pass with GET /api/v1/passes/{id} and send the request again. |
| `RATE_LIMITED` |  | Wait for Retry-After seconds, then retry. Back off on repeats. |
| `UNAUTHENTICATED` |  | Send Authorization: Bearer $PASSBOOK_KEY. |
| `VALIDATION` |  | Fix each field in issues and resend. |

```sh
curl -X GET "https://passbook.mobile/api/v1/broadcasts/0193a1b2-7c00-7000-8000-0000000000e1/items" \
  -H "Authorization: Bearer $PASSBOOK_KEY"
```
