> ## Documentation Index
> Fetch the complete documentation index at: https://docs.1club.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Compose

> Send email or SMS to one contact, a list, or everyone matching a contact-type and tag filter. Templates, AI replies, drafts, variables.

The compose pane lives inside the messaging inbox. Open it by clicking **Compose** in the messages page header, by selecting a draft from the inbox list, or by hitting **Reply** on an existing thread. The route is `/messages/new` for a new send and `/messages/<id>/reply` for a reply.

Some features open compose with the message pre-filled: the **Promote** button on an [event](/operations/events) arrives with the cover image, title, when-and-where line, and a **View event** button already in the body - pick the audience and send.

## Pick recipients

Recipients are individual contacts. You can also broaden the send to "everyone matching this filter", and the backend resolves the actual list at send time.

Two filter dimensions stack:

* **Contact type** - one or more of `member`, `lead`, `staff`, `contact`, `lapsed`, `drop_in`. Leave empty for no type filter.
* **Tags** - any contact tags you have defined. Picked from the tag input above the audience block.

Below the filters, the recipient picker lists matching contacts. Pick individuals to override the broad audience, or leave the picker empty to send to every contact the filter resolves. A running counter shows how many contacts match.

When you arrive from a contact's profile, the URL carries `contactId` (one recipient), `contactIds` (a comma-separated list), or `contactType` (pre-select a filter). The compose pane uses those to pre-fill the audience.

Instructor-only accounts compose to members at their club. The audience filters and template picker are hidden in that view.

## Email or SMS

The **Type** toggle switches between email and SMS. The choice changes the editor and the payload.

* **Email** uses Editor.js with blocks: paragraphs, headings, lists, images, embeds, code, and quotes. The body is stored as block JSON, not HTML. A **subject** field appears above the body and is required.
* **SMS** uses a plain text area. No subject, no formatting. Content goes out via Twilio and counts toward your SMS plan capacity.

Push notifications exist in the system but are emitted by transactional triggers, not from the manual compose UI. The compose pane offers email and SMS only.

## Templates

If you have access to custom templates (admin and manager roles), the **Template** picker above the body lists templates of type `message`. Selecting one populates the subject and body in place. Edit either field after applying the template; the original template is not modified.

Templates with HTML bodies older than the block editor are accepted as legacy input; the editor renders them and converts them to blocks on the next save.

See [Templates](/messaging/templates) for variable references and the variable picker.

## AI-generated reply

When you opened the compose pane through **Reply**, an **AI generate** button appears. It calls `POST /v1/ai-messages/{messageId}/suggest`, which uses LangChain with pgvector retrieval over your organization's data to draft a response. The suggestion replaces the body with paragraph blocks and (for email) sets the subject. You can edit anything before sending.

The action is only enabled on replies because it grounds the response in the original message; new sends do not expose it.

## Send, draft, or reply

The action row at the bottom of the form has three primary actions depending on the mode:

* **Send** posts the message immediately. The mutation hits `POST /v1/messages` (or the reply variant when `replyToMessageId` is set). Toast on success, errors are surfaced inline. A successful send invalidates the inbox list and the billing quota.
* **Save draft** posts the same payload with `isDraft: true`. Drafts appear in the inbox list with a **Draft** chip and can be reopened from there.
* **Reply** is the same as Send, but with `replyToMessageId` set so the new message threads under the original. The subject is pre-filled with `Re: <original subject>`.

There is no built-in scheduler in compose. To schedule a future send, use an [automation](/marketing/automations) with a delay, or save the message as a draft and send it manually when ready.

## Validation

The form blocks send until:

* The subject is non-empty (email only).
* The body has at least one block (email) or non-whitespace text (SMS).
* A reply has at least one recipient.

Field errors display under the relevant input. Send and Save draft are both disabled while a request is in flight.

## Related

* [Message list](/messaging/message-list) - Where drafts, sent messages, and replies live afterwards.
* [Templates](/messaging/templates) - Templates the picker reads from, plus the variable reference.
* [Contacts](/members/overview) - Tag and segment the contacts you message.
* [Automations](/marketing/automations) - Trigger-based and scheduled sends, instead of one-off compose.
