Skip to content

Add notify

AddNotify

Description: Creates a new notification for a specific user. Includes a token identifier, structured message content, and metadata such as type, level, and status.

Request Parameters

Name Type Required Description
user_id int Yes ID of the user to whom the notification belongs
token string Yes Unique token identifier for the notification
message object Yes JSON object containing the notification content
description object No Optional JSON object with extra description
type string Yes Notification type (e.g., "system", "trade")
level string Yes Notification level (e.g., "info", "error")
status string Yes Notification status (e.g., "unread", "read")

Request Example

{
  "user_id": 123456,
  "token": "alert-abc-001",
  "message": {
    "title": "New trade alert",
    "body": "Your position on EURUSD has been closed."
  },
  "description": {
    "details": "Trade was closed by Stop Loss."
  },
  "type": "system",
  "level": "info",
  "status": "unread"
}

Response Parameters

Name Type Description
data string Returns "OK" if successful

Response Example

{
  "data": "OK"
}