scheduled-notifications

Schedule a push notification

Schedule a push notification to be sent at a specific date and time. The notification will be automatically sent by the system when the scheduled time arrives. Requires admin approval before being sent. Supports multiple target types: single user, multiple users, all users, device tokens, topics, or conditions.

post/notifications/scheduled

Request body

titlestring required

Notification title

bodystring required

Notification body

scheduledTimestring required

ISO 8601 formatted date-time when notification should be sent

targetType'user' | 'users' | 'all_users' | 'tokens' | 'topic' | 'condition' required

Target type for the notification

targetValueobject

Target value (userId, userIds array, device tokens, topic name, or condition). Required based on targetType.

dataobject

Additional custom data payload

imageUrlstring

Image URL for notification

clickActionstring

Click action or deep link

timezonestring

Timezone for scheduling

createdBystring

User or admin who created this scheduled notification

isRecurringboolean

Whether this is a recurring notification

recurrenceRulestring

Cron expression for recurring notifications (e.g., "0 9 * * 1" for every Monday at 9 AM)

Example request

{
  "title": "Flash Sale Alert",
  "body": "Get 50% off on all products! Limited time offer.",
  "scheduledTime": "2025-12-25T10:00:00Z",
  "targetType": "all_users",
  "data": {
    "campaignId": "123",
    "category": "sales"
  },
  "imageUrl": "https://example.com/sale-banner.jpg",
  "clickAction": "OPEN_SALE_PAGE",
  "timezone": "Asia/Kuala_Lumpur",
  "createdBy": "admin@example.com",
  "recurrenceRule": "0 9 * * 1"
}

Response

Notification scheduled successfully (pending admin approval)

notification_idnumber required

Notification ID

titlestring required

Notification title

bodystring required

Notification body

scheduled_timestring date-time required

Scheduled time

timezonestring required

Timezone

target_type'user' | 'users' | 'all_users' | 'tokens' | 'topic' | 'condition' required

Target type

target_valueobject

Target value

status'pending_approval' | 'pending' | 'processing' | 'sent' | 'failed' | 'cancelled' | 'expired' | 'rejected' required

Current status

sent_atstring date-time

Sent timestamp

success_countnumber required

Number of successful sends

failure_countnumber required

Number of failed sends

error_messagestring

Error message if failed

created_atstring date-time required

Created timestamp

updated_atstring date-time required

Updated timestamp

Example response

{
  "notification_id": 1,
  "title": "Flash Sale Alert",
  "body": "Get 50% off!",
  "scheduled_time": "2025-12-25T10:00:00Z",
  "timezone": "Asia/Kuala_Lumpur",
  "target_type": "all_users",
  "status": "pending",
  "created_at": "2025-12-01T10:00:00Z",
  "updated_at": "2025-12-01T10:00:00Z"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.