Skip to content

Messages

This endpoint manages text messages sent between the current user and AmpliFi support.

Message Object

AmpliFi represents messages by a JSON object. This table lists properties that are usually included in a message object.

Property Type Required? (default) Description
AFiMessageId string yes AmpliFi Id of the message
toAFiUserId string yes Id of the receiver or "AmpliFi Support"
fromAFiUserId string yes Id of the sender or "AmpliFi Support"
text string yes the message text
dtsCreated dts yes date/time message was created
isDelivered boolean yes true if the message has been delivered
isRead boolean yes true if the message has been read
dedupCode string no (random string) unique code to avoid duplicates

Get all Messages

GET /messages/

List all messages to or from the current user. The maximum number is limited by a configuration parameter.

Response:

  {
    "success": true,
    "messages": [ // array of message objects
     ]
  }

Get Newer Messages

GET /messages/:dtsStart

List all messages to or from the current user that are newer than the given date. The maximum number is limited by a configuration parameter.

Response:

  {
    "success": true,
    "messages": [ // array of message objects
     ]
  }

Add New Message

PUT /messages/

Create a new message from the current user to AmpliFi Support with the specified text

Request body:

  {
    "text": "test"
  }

Response:

  {
    "success": false,
    "message": { // message object
    }
  }

Mark a Message

POST /message/read/:AFiMessageId

Mark a specified message as read. The message is identified by the path parameter.

Response:

  {
    "success": true
  }