Notifications
Notify crew members via various channels — push, email and SMS.
Notification Types
| Type | Usage |
|---|---|
| briefing | Daily briefing with flight information |
| check_in_reminder | Reminder to check in 2h before briefing time |
| schedule_change | Roster change — new flight, cancellation, swap |
| standby_call | Standby activation — please report immediately |
| emergency | Critical operational message — immediate action required |
POST /notifications/send
POSThttps://api.aeroselect.io/api/v1/crewops/notifications/send
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
| crew_member_ids | array | Pflicht | Array of crew member IDs (recipients) |
| type | enum | Pflicht | briefing | check_in_reminder | schedule_change | standby_call | emergency |
| title | string | Pflicht | Notification title (max. 100 characters) |
| message | string | Pflicht | Notification text (max. 1,000 characters) |
| channels | array | Optional | push | email | sms (default: [push, email]) |
| data | object | Optional | Optional structured data (e.g. flight_id, duty_id) |
cURLBash
curl -X POST "https://api.aeroselect.io/api/v1/crewops/notifications/send" \
-H "X-API-Key: ak_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"crew_member_ids": [201, 215, 220],
"type": "schedule_change",
"title": "Schedule change LH1234",
"message": "Your flight LH1234 (FRA→JFK) has been moved to 08:30 UTC. New briefing: 06:00 UTC Gate B42.",
"channels": ["push", "email", "sms"],
"data": {
"flight_id": 5001,
"duty_id": 1001
}
}'Response 200JSON
{
"status": "sent",
"recipients": 3,
"sent_via": {
"push": 3,
"email": 3,
"sms": 3
},
"notification_id": "ntf_abc123xyz",
"sent_at": "2026-05-22T03:30:00Z"
}Node.js — Emergency broadcastJavaScript
// Send emergency notification to all active crew members
async function broadcastEmergency(message: string, crewIds: number[]) {
const response = await fetch(
"https://api.aeroselect.io/api/v1/crewops/notifications/send",
{
method: "POST",
headers: {
"X-API-Key": process.env.AEROSELECT_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
crew_member_ids: crewIds,
type: "emergency",
title: "EMERGENCY ALERT",
message,
channels: ["push", "email", "sms"],
}),
}
);
return response.json();
}