Skip to main content
POST
/
messages
/
emails
/
search
Search for emails
curl --request POST \
  --url https://api.rallyuxr.com/api/public/v1/messages/emails/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filter": {
    "operator": "AND",
    "filters": [
      {
        "message": {
          "propertyType": "SINGLE_SELECT",
          "propertyName": "EMAIL_STATUS",
          "operator": "IS",
          "value": "DELIVERED"
        }
      },
      {
        "message": {
          "propertyType": "DATETIME",
          "propertyName": "SENT_AT",
          "operator": "IS_WITHIN",
          "value": "NUMBER_OF_DAYS_AGO",
          "amount": 7
        }
      },
      {
        "person": {
          "propertyType": "STRING",
          "propertyName": "EMAIL",
          "operator": "CONTAINS",
          "value": "@example.com"
        }
      }
    ]
  },
  "studyId": "<string>",
  "teamId": "<string>",
  "userId": "<string>",
  "populationId": "<string>",
  "pageInfo": {
    "size": 10
  }
}
'
{
  "results": [
    {
      "id": "<string>",
      "messageType": "EMAIL",
      "recipientId": "<string>",
      "senderId": "<string>",
      "status": "<string>",
      "type": "<string>",
      "sentAt": "2023-11-07T05:31:56Z",
      "scheduledSendTime": "2023-11-07T05:31:56Z",
      "studyId": "<string>",
      "participantId": "<string>",
      "messageCampaignId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "recipientEmail": "<string>",
      "senderEmail": "<string>",
      "subject": "<string>"
    }
  ],
  "total": 123,
  "pageInfo": {
    "hasNextPage": true,
    "hasPreviousPage": true,
    "startCursor": "<string>",
    "endCursor": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Search for messages

filter
object

Filter options to search for messages. Supports person, incentive, participant, and message property filters.

Example:
{
"operator": "AND",
"filters": [
{
"message": {
"propertyType": "SINGLE_SELECT",
"propertyName": "EMAIL_STATUS",
"operator": "IS",
"value": "DELIVERED"
}
},
{
"message": {
"propertyType": "DATETIME",
"propertyName": "SENT_AT",
"operator": "IS_WITHIN",
"value": "NUMBER_OF_DAYS_AGO",
"amount": 7
}
},
{
"person": {
"propertyType": "STRING",
"propertyName": "EMAIL",
"operator": "CONTAINS",
"value": "@example.com"
}
}
]
}
studyId
string

Filter messages by study ID

teamId
string

Filter messages by team ID

userId
string

Filter messages by sender user ID

populationId
string

Filter messages by population ID

pageInfo
object

Pagination arguments. Use startCursor from the result of the endCursor of the response to get the next page. Pagination in reverse is not currently supported

Example:
{ "size": 10 }

Response

Successfully retrieved emails

Response for a search of emails

results
object[]
required
total
number
required

The total number of items in your workspaces based on your search parameters

pageInfo
object
required

Information about the current page