Messaging API

📋 Table of Contents

Overview

The Messaging API provides comprehensive messaging services for the OASIS ecosystem. It handles message creation, sending, delivery tracking, and analytics with support for multiple message types, encryption, and real-time updates.

Message Management

Get All Messages

GET /api/messaging/messages
Authorization: Bearer YOUR_TOKEN

Query Parameters:

  • limit (int, optional): Number of results (default: 50)

  • offset (int, optional): Number to skip (default: 0)

  • status (string, optional): Filter by status (Sent, Delivered, Read, Failed)

  • type (string, optional): Filter by type (Email, SMS, Push, In-App)

  • recipient (string, optional): Filter by recipient

  • startDate (string, optional): Start date (ISO 8601)

  • endDate (string, optional): End date (ISO 8601)

  • sortBy (string, optional): Sort field (createdAt, sentAt, status)

  • sortOrder (string, optional): Sort order (asc/desc, default: desc)

Response:

Get Message by ID

Parameters:

  • messageId (string): Message UUID

Response:

Create Message

Request Body:

Response:

Update Message

Parameters:

  • messageId (string): Message UUID

Request Body:

Delete Message

Parameters:

  • messageId (string): Message UUID

Message Sending

Send Email

Request Body:

Response:

Send SMS

Request Body:

Send Push Notification

Request Body:

Send In-App Message

Request Body:

Message Delivery

Get Message Status

Parameters:

  • messageId (string): Message UUID

Response:

Get Message Tracking

Parameters:

  • messageId (string): Message UUID

Response:

Retry Message

Parameters:

  • messageId (string): Message UUID

Response:

Cancel Message

Parameters:

  • messageId (string): Message UUID

Response:

Message Analytics

Get Messaging Statistics

Query Parameters:

  • timeframe (string, optional): Timeframe (hour, day, week, month)

  • type (string, optional): Filter by message type (Email, SMS, Push, In-App)

Response:

Get Message Performance

Response:

Get Messaging Health

Response:

Error Responses

Message Not Found

Invalid Recipient

Message Send Failed

Template Not Found

Encryption Error


← Previous: Chat API | Next: Files API

Last updated