RocketCOMS

Retrieve Recipient Messages

Retrieve messages for a recipient. This includes messages sent to the recipient and responses received from the recipient.

Endpoint

GET /v1/recipients/{recipientId}/messages

Authorization Header

Authorization: Bearer <access_token>
or
Authorization: Basic <encodedString>
where <encodedString> is your <api-key>:<api-secret> string encoded using Base64 encoding

Path Parameters

recipientId  REQUIRED

string (UUID)

ID of the recipient.

Query Parameters

from

string (date)

Date the message was sent. This filter will return messages sent on or after this date.

to

string (date)

Date the message was sent. This filter will return messages sent on or before this date.

status

string, values: PENDING, IN_PROCESS, CANCELED, SENT, DELIVERED, FAILED

Message status.

campaigns

array

List of campaigns IDs the message belongs to.

messageText

string

Content of the message.

sortBy

string

Sort the response by any field.

sortDir

string, values: desc, asc

Sort direction.

page

integer (int32), default: 0

Page number to return.

pageSize

integer (int32)

Maximum number of results to return per page.

Request Body

None

Returns

Returns an list of messages matching the filter criteria. The following fields are returned.

id

string (UUID)

Unique ID assigned to the message in RocketCOMS.

direction

string, values: OUTGOING, INCOMING

Message direction. Possible values are:

  • OUTGOING  The message was sent from RocketCOMS to the recipient.
  • INCOMING  The message was sent from the recipient to RocketCOMS.

messageText

string

Content of the message.

campaignId

string

ID of the campaign associated with the message.

campaignName

string

Name of the campaign associated with the message.

status

string, values: PENDING, IN_PROCESS, CANCELED, SENT, DELIVERED, FAILED

Current status of the message.

SAMPLE RESPONSE

				
					{
  "status": "string",
  "result": {
    "id": "ba68bc22-d512-4467-8a54-e92d8e8a9c53",
    "direction": "OUTGOING",
    "messageText": "Spring Sale Starts Today",
    "campaignId": "d7b0e25f-30c9-456b-b287-6b3dcaa4b8f7",
    "campaignName": "Spring Campaign",
    "status": "DELIVERED"
  },
  "message": "string"
}