Skip to main content
POST
/
ai
/
people
/
search
AI search for people
curl --request POST \
  --url https://api.rallyuxr.com/api/public/v1/ai/people/search \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "People in California who have done at least 3 studies",
  "attachProperties": [
    "EMAIL",
    "FIRST_NAME",
    "LAST_NAME"
  ],
  "allowlistInternalProperties": [
    "NAME",
    "CONTACT_STATUS",
    "OPTED_OUT"
  ],
  "blocklistInternalProperties": [
    "NAME"
  ],
  "studyId": "<string>",
  "pageInfo": {
    "size": 10
  }
}
'
{
  "results": [
    {
      "personId": "<string>",
      "email": "<string>",
      "properties": [
        {
          "propertyType": "STRING",
          "propertyId": "cm0b4eokq000vbbsimwelll3u",
          "value": "Blue"
        }
      ],
      "populationIds": [
        "<string>"
      ]
    }
  ],
  "total": 123,
  "pageInfo": {
    "hasNextPage": true,
    "hasPreviousPage": true,
    "startCursor": "<string>",
    "endCursor": "<string>"
  },
  "errors": [
    {
      "errorCode": "UNAUTHORIZED",
      "propertyId": "<string>"
    }
  ],
  "success": true,
  "suggestions": [
    "<string>"
  ],
  "filterGroup": {
    "filters": [
      {
        "customProperty": {
          "propertyType": "STRING",
          "propertyGroup": "CUSTOM_PROPERTY",
          "propertyName": "CUSTOM_PROPERTY",
          "propertyId": "custom_property_1",
          "operator": "IS",
          "value": "some value"
        }
      }
    ],
    "operator": "AND",
    "sort": {
      "operator": "ASC",
      "propertyGroup": "PERSON",
      "propertyName": "PERSON_ID"
    }
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

AI search for people

prompt
string
required

Natural language prompt to search for people

Minimum string length: 1
Example:

"People in California who have done at least 3 studies"

attachProperties
string[]

List of the propertyIds of custom properties to attach to the response for each person

Maximum array length: 25
Example:
["EMAIL", "FIRST_NAME", "LAST_NAME"]
allowlistInternalProperties
enum<string>[]

List of rally properties to include in the response. If this or blocklistInternalProperties is not included we will return all internal properties

Available options:
NAME,
FIRST_NAME,
LAST_NAME,
EMAIL,
PHONE,
IMPORT_SOURCE,
IMPORT_DATE,
OPTED_OUT,
LAST_CONTACT_DATE,
TOTAL_SENT_LAST_YEAR,
TOTAL_SENT_LAST_CALENDAR_YEAR,
TOTAL_SENT_ALL_TIME,
INVITED_TO_STUDY,
INVITED_TO_STUDY_L30,
INVITED_TO_STUDY_L90,
INVITED_TO_STUDY_L365,
TOTAL_NUMBER_OF_CONTACT,
TOTAL_NUMBER_OF_CONTACT_L30,
TOTAL_NUMBER_OF_CONTACT_L90,
TOTAL_NUMBER_OF_CONTACT_L365,
LAST_INTERVIEW_DATE,
TOTAL_NUMBER_OF_INTERVIEWS_COMPLETED,
TOTAL_NUMBER_OF_INTERVIEWS_COMPLETED_L30,
TOTAL_NUMBER_OF_INTERVIEWS_COMPLETED_L90,
TOTAL_NUMBER_OF_INTERVIEWS_COMPLETED_L365,
LAST_UNMOD_TEST_DATE,
TOTAL_NUMBER_OF_UNMOD_TESTS_COMPLETED,
TOTAL_NUMBER_OF_UNMOD_TESTS_COMPLETED_L30,
TOTAL_NUMBER_OF_UNMOD_TESTS_COMPLETED_L90,
TOTAL_NUMBER_OF_UNMOD_TESTS_COMPLETED_L365,
LAST_SURVEY_DATE,
TOTAL_NUMBER_OF_SURVEYS_COMPLETED,
TOTAL_NUMBER_OF_SURVEYS_COMPLETED_L30,
TOTAL_NUMBER_OF_SURVEYS_COMPLETED_L90,
TOTAL_NUMBER_OF_SURVEYS_COMPLETED_L365,
CONTACT_STATUS,
POPULATION_MEMBERSHIP,
POPULATION_LIST_MEMBERSHIP,
SIGNUP_REFERRAL_CODES,
LAST_CHANGED_AT
Example:
["NAME", "CONTACT_STATUS", "OPTED_OUT"]
blocklistInternalProperties
enum<string>[]

List of rally properties to exclude from the response

Available options:
NAME,
FIRST_NAME,
LAST_NAME,
EMAIL,
PHONE,
IMPORT_SOURCE,
IMPORT_DATE,
OPTED_OUT,
LAST_CONTACT_DATE,
TOTAL_SENT_LAST_YEAR,
TOTAL_SENT_LAST_CALENDAR_YEAR,
TOTAL_SENT_ALL_TIME,
INVITED_TO_STUDY,
INVITED_TO_STUDY_L30,
INVITED_TO_STUDY_L90,
INVITED_TO_STUDY_L365,
TOTAL_NUMBER_OF_CONTACT,
TOTAL_NUMBER_OF_CONTACT_L30,
TOTAL_NUMBER_OF_CONTACT_L90,
TOTAL_NUMBER_OF_CONTACT_L365,
LAST_INTERVIEW_DATE,
TOTAL_NUMBER_OF_INTERVIEWS_COMPLETED,
TOTAL_NUMBER_OF_INTERVIEWS_COMPLETED_L30,
TOTAL_NUMBER_OF_INTERVIEWS_COMPLETED_L90,
TOTAL_NUMBER_OF_INTERVIEWS_COMPLETED_L365,
LAST_UNMOD_TEST_DATE,
TOTAL_NUMBER_OF_UNMOD_TESTS_COMPLETED,
TOTAL_NUMBER_OF_UNMOD_TESTS_COMPLETED_L30,
TOTAL_NUMBER_OF_UNMOD_TESTS_COMPLETED_L90,
TOTAL_NUMBER_OF_UNMOD_TESTS_COMPLETED_L365,
LAST_SURVEY_DATE,
TOTAL_NUMBER_OF_SURVEYS_COMPLETED,
TOTAL_NUMBER_OF_SURVEYS_COMPLETED_L30,
TOTAL_NUMBER_OF_SURVEYS_COMPLETED_L90,
TOTAL_NUMBER_OF_SURVEYS_COMPLETED_L365,
CONTACT_STATUS,
POPULATION_MEMBERSHIP,
POPULATION_LIST_MEMBERSHIP,
SIGNUP_REFERRAL_CODES,
LAST_CHANGED_AT
studyId
string

The ID of the study to filter people by

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 people

Response for AI search of people

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

errors
object[]
required
success
enum<boolean>
required
Available options:
true
suggestions
string[]
filterGroup
object

Filter option to search for people