Skip to main content

Documentation Index

Fetch the complete documentation index at: https://alphabet-06152314.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The Alphabet communications module gives you a single endpoint to dispatch alerts, notifications, and user messages across multiple delivery channels simultaneously. Instead of integrating separately with an email provider, an SMS gateway, and a push service, you send one request to POST /api/v1/communications/send with a channel list and the relevant addressing fields, and Alphabet routes the message to each enabled channel in parallel. Supported channels are Email, Sms, Push, InApp, and Webhook.

Key concepts

Channel — the delivery mechanism that carries a message to its destination. Each channel (Email, Sms, Push, InApp, Webhook) has its own transport implementation and requires its own addressing field in the request body. Multi-channel dispatch — a single request can target multiple channels at once by listing them in the channels array. Alphabet dispatches to all specified channels and returns a per-channel result in the response, so you can see which deliveries succeeded and which failed. Configuration — which channels are active is controlled by the Communication.EnabledChannels array in appsettings.json. Channels listed in your request but not present in EnabledChannels are skipped. Use GET /api/v1/communications/configuration to inspect the live configuration without restarting the server.
Both endpoints require the AdminOnly authorization policy. Include a valid admin bearer token in the Authorization header for every request.

Send a message

POST /api/v1/communications/sendRequires: AdminOnly authorization policy
Send a message to one or more channels by posting a JSON body with the fields below. Only include the addressing fields that match the channels you are targeting.

Request body

subject
string
required
The message subject line. Used as the email subject for the Email channel and as a title for other channels.
body
string
required
The message body text. Set isHtml to true to render this as HTML in email clients.
channels
string[]
required
Array of channel names to dispatch to. Valid values: "Email", "Sms", "Push", "InApp", "Webhook". Only channels that appear in Communication.EnabledChannels in your configuration will be dispatched.
emailAddress
string
Recipient email address. Required when "Email" is in channels.
phoneNumber
string
Recipient phone number in E.164 format. Required when "Sms" is in channels. Example: "+97455555555".
userId
string
Recipient user GUID. Required when "InApp" is in channels. Messages are stored and delivered to this user inside the application.
pushToken
string
Device push token for the target device. Required when "Push" is in channels. Pass null to omit.
webhookUrl
string
The URL Alphabet will POST the message payload to. Required when "Webhook" is in channels. Pass null to omit.
isHtml
boolean
default:"false"
When true, the body field is rendered as HTML in email clients. Has no effect on non-email channels.

Example request

The following request sends a system maintenance notice over Email, SMS, and InApp simultaneously:
{
  "subject": "System maintenance",
  "body": "A scheduled maintenance window starts at 22:00 UTC.",
  "channels": ["Email", "Sms", "InApp"],
  "emailAddress": "user@example.com",
  "phoneNumber": "+97455555555",
  "userId": "3f45ef0f-39d1-4d65-8eaa-5db7c0b8f763",
  "pushToken": null,
  "webhookUrl": null,
  "isHtml": false
}
curl --request POST \
  --url https://your-api-host/api/v1/communications/send \
  --header 'Authorization: Bearer <admin-token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "subject": "System maintenance",
    "body": "A scheduled maintenance window starts at 22:00 UTC.",
    "channels": ["Email", "Sms", "InApp"],
    "emailAddress": "user@example.com",
    "phoneNumber": "+97455555555",
    "userId": "3f45ef0f-39d1-4d65-8eaa-5db7c0b8f763",
    "pushToken": null,
    "webhookUrl": null,
    "isHtml": false
  }'

Response

A successful request returns 200 OK with a CommunicationBatchResponseDto body containing a per-channel dispatch result. If the dispatch fails entirely, the endpoint returns 400 Bad Request with a Problem Details payload describing the error.
Check each channel’s status in the batch response individually. A request succeeds at the HTTP level even if one channel fails — for example, if an SMS provider rejects the number while email delivers successfully.

Inspect configuration

GET /api/v1/communications/configurationRequires: AdminOnly authorization policy
Retrieve the active communication settings without restarting the API. The response returns a CommunicationConfigurationDto containing:
  • Enabled channels — the list of channels currently active on the server
  • Default channel — the channel used when none is specified in the request
  • Diagnostic logging — whether detailed channel dispatch logs are being written
curl --request GET \
  --url https://your-api-host/api/v1/communications/configuration \
  --header 'Authorization: Bearer <admin-token>'
A failed configuration load returns 400 Bad Request with a Problem Details body.
If a channel you expect to be active does not appear in the configuration response, verify that its name is spelled correctly in Communication.EnabledChannels in appsettings.json and that the server has been restarted after any configuration change.

Next steps

Channel setup and configuration

Configure Email, SMS, Push, InApp, and Webhook channels with credentials and appsettings.json options.