---
title: "Write to many guests, once each: everyone confirmed in a class session (target.session_id), starting on a local date across offerings (target.date), or booked ahead on an offering, or picking another time of it (target.offering_id). Returns how many were sent, skipped (erased guests) and failed; one that would pass the daily email limit is refused whole. Reference: https://daybooked.io/docs/api#messages_broadcast"
method: POST
path: "/messages/broadcast"
tags: ["messages"]
---

# Write to many guests, once each: everyone confirmed in a class session (target.session_id), starting on a local date across offerings (target.date), or booked ahead on an offering, or picking another time of it (target.offering_id). Returns how many were sent, skipped (erased guests) and failed; one that would pass the daily email limit is refused whole. Reference: https://daybooked.io/docs/api#messages_broadcast

`POST /messages/broadcast`

## Request

- Base URL: `https://daybag.io/api/v1`
- URL: `https://daybag.io/api/v1/messages/broadcast`
- Auth: HTTP bearer

## Request body

- object
  - `target` union, required: { session_id }, { date } (optionally with a filter) or { offering_id }
    - object
      - `session_id` string, uuid, required: Everyone confirmed in this class session
    - object
      - `date` string, date, required: Everyone whose booking starts on this local date (YYYY-MM-DD), every offering
      - `filter` object: Only some of the day's guests: by kind, by offering, or both
        - `kinds` string[]: Only bookings of these kinds
        - `offering_id` string, uuid: Only this offering's bookings
    - object
      - `offering_id` string, uuid, required: Everyone with an upcoming confirmed booking on this offering
  - `subject` string
  - `body` string, required

## Response `200`

Success

- object
  - `sent` integer, required
  - `skipped` integer, required
  - `failed` integer, required

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/daybag/apis/daybooked-io-api.md) · [All operations](https://skmtc.dev/daybag/apis/daybooked-io-api/llms.txt) · [OpenAPI document](https://skmtc.dev/daybag/apis/daybooked-io-api/revisions/1f576dead370?raw)
