> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rallyuxr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search for emails

> Search for email in your workspace using advanced filters. Supports filtering by email properties including ID, recipient, sender, status, type, subject, dates, and related entities (study, panel, participant, campaigns, teams, populations). Filters can be combined using AND/OR logic operators for complex queries.


  **Required permissions:**
- View emails
- Access All People directory



## OpenAPI

````yaml https://api.rallyuxr.com/api/openapi post /messages/emails/search
openapi: 3.1.0
info:
  title: Rally UXR Developer Docs
  version: '1.0'
servers:
  - url: https://api.rallyuxr.com/api/public/v1
security:
  - bearerAuth: []
tags:
  - name: Forms
    description: Operations on Forms in your workspace
  - name: People
    description: Operations on Person's stored in your workspace
  - name: Person Properties
    description: Operations on workspace level Person Properties
  - name: Populations
    description: Operations on Populations in your workspace
  - name: Segments
    description: Operations on Segments in your workspace
  - name: Studies
    description: Operations on Studies in your workspace
  - name: Participants
    description: Operations on Participants in studies
  - name: Screener
    description: Operations on a study's screener
  - name: Consent Submissions
    description: Operations on Consent Submissions for studies
  - name: Incentives
    description: Operations on Incentives in your workspace
  - name: Messages
    description: Operations on Message activities in your workspace
  - name: Imports
    description: Operations on Imports in your workspace
  - name: Users
    description: Operations on Workspace Users
  - name: Teams
    description: Operations on Teams in your workspace
  - name: Backfills
    description: >-
      Routes that can be used to backfill data into Rally. If you'd like access
      to these apis, please reach out to your Customer Success rep
  - name: Person
    description: Deprecated, use People
paths:
  /messages/emails/search:
    post:
      tags:
        - Messages
      summary: Search for emails
      description: >-
        Search for email in your workspace using advanced filters. Supports
        filtering by email properties including ID, recipient, sender, status,
        type, subject, dates, and related entities (study, panel, participant,
        campaigns, teams, populations). Filters can be combined using AND/OR
        logic operators for complex queries.


          **Required permissions:**
        - View emails

        - Access All People directory
      operationId: searchEmails
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                filter:
                  $ref: '#/components/schemas/RootMessageFilter'
                studyId:
                  type: string
                  description: Filter messages by study ID
                teamId:
                  type: string
                  description: Filter messages by team ID
                userId:
                  type: string
                  description: Filter messages by sender user ID
                populationId:
                  type: string
                  description: Filter messages by population ID
                pageInfo:
                  $ref: '#/components/schemas/PageInfoArgs'
              description: Search for messages
      responses:
        '200':
          description: Successfully retrieved emails
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailsSearchResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: Unauthorized
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            text/plain:
              schema:
                type: string
                example: Unauthorized
        '403':
          description: Forbidden
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            text/plain:
              schema:
                type: string
                example: Forbidden
        '429':
          description: Too Many Requests
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            text/plain:
              schema:
                type: string
                example: Too Many Requests
        '500':
          description: Internal Server Error
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/X-RateLimit-Limit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/X-RateLimit-Remaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/X-RateLimit-Reset'
          content:
            text/plain:
              schema:
                type: string
                example: Internal Server Error
      security:
        - bearerAuth: []
components:
  schemas:
    RootMessageFilter:
      type: object
      properties:
        operator:
          type: string
          enum:
            - AND
            - OR
          default: AND
        filters:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/MessageFilter'
              - $ref: '#/components/schemas/MessageFilterGroup'
          maxItems: 50
      required:
        - filters
      description: >-
        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'
    PageInfoArgs:
      type: object
      properties:
        startCursor:
          type: string
          description: The cursor to start from
        size:
          type: number
          exclusiveMinimum: 0
          maximum: 1000
          default: 25
          description: The number of items to return
          example: 10
      description: >-
        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
    EmailsSearchResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/Email'
        total:
          type: number
          exclusiveMinimum: 0
          description: >-
            The total number of items in your workspaces based on your search
            parameters
        pageInfo:
          $ref: '#/components/schemas/PageInfoResponse'
      required:
        - results
        - total
        - pageInfo
      description: Response for a search of emails
    BadRequestError:
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
            required:
              - message
              - path
      required:
        - errors
      description: Error response for a bad request with details on what was invalid
    MessageFilter:
      anyOf:
        - $ref: '#/components/schemas/Filter'
        - type: object
          properties:
            message:
              oneOf:
                - $ref: '#/components/schemas/Filter_MESSAGE_DateTimeProperty'
                - $ref: '#/components/schemas/Filter_MESSAGE_NumberProperty'
                - $ref: '#/components/schemas/Filter_MESSAGE_StringProperty'
                - $ref: '#/components/schemas/Filter_MESSAGE_SingleSelectProperty'
              discriminator:
                propertyName: propertyType
                mapping:
                  DATETIME:
                    $ref: '#/components/schemas/Filter_MESSAGE_DateTimeProperty'
                  NUMBER:
                    $ref: '#/components/schemas/Filter_MESSAGE_NumberProperty'
                  STRING:
                    $ref: '#/components/schemas/Filter_MESSAGE_StringProperty'
                  SINGLE_SELECT:
                    $ref: '#/components/schemas/Filter_MESSAGE_SingleSelectProperty'
          required:
            - message
      description: >-
        A filter for searching messages. Supports filtering by person,
        incentive, participant, and message properties.
    MessageFilterGroup:
      type: object
      properties:
        operator:
          type: string
          enum:
            - AND
            - OR
          default: AND
        filters:
          type: array
          items:
            $ref: '#/components/schemas/MessageFilter'
      required:
        - filters
      description: A group of message filters
    Email:
      allOf:
        - $ref: '#/components/schemas/Message'
        - type: object
          properties:
            recipientEmail:
              type:
                - string
                - 'null'
              description: The email address of the recipient
            senderEmail:
              type:
                - string
                - 'null'
              description: The email address of the sender
            subject:
              type:
                - string
                - 'null'
              description: The subject of the email
          required:
            - recipientEmail
            - senderEmail
            - subject
      description: An email message
    PageInfoResponse:
      type: object
      properties:
        hasNextPage:
          type: boolean
          description: Whether there are additional pages of results
        hasPreviousPage:
          type: boolean
          description: Whether there is a prior page of results
        startCursor:
          type: string
          description: The start of the current page of results
        endCursor:
          type: string
          description: The end of the current page of results. Use to fetch the next page
      required:
        - hasNextPage
        - hasPreviousPage
      description: Information about the current page
    Filter:
      anyOf:
        - type: object
          properties:
            customProperty:
              $ref: '#/components/schemas/CustomPropertyFilter'
          required:
            - customProperty
        - type: object
          properties:
            person:
              oneOf:
                - $ref: '#/components/schemas/Filter_PERSON_DateTimeProperty'
                - $ref: '#/components/schemas/Filter_PERSON_BooleanProperty'
                - $ref: '#/components/schemas/Filter_PERSON_NumberProperty'
                - $ref: '#/components/schemas/Filter_PERSON_StringProperty'
                - $ref: '#/components/schemas/Filter_PERSON_MultiSelectProperty'
              discriminator:
                propertyName: propertyType
                mapping:
                  DATETIME:
                    $ref: '#/components/schemas/Filter_PERSON_DateTimeProperty'
                  BOOLEAN:
                    $ref: '#/components/schemas/Filter_PERSON_BooleanProperty'
                  NUMBER:
                    $ref: '#/components/schemas/Filter_PERSON_NumberProperty'
                  STRING:
                    $ref: '#/components/schemas/Filter_PERSON_StringProperty'
                  MULTI_SELECT:
                    $ref: '#/components/schemas/Filter_PERSON_MultiSelectProperty'
          required:
            - person
        - type: object
          properties:
            incentive:
              oneOf:
                - $ref: '#/components/schemas/Filter_INCENTIVE_DateTimeProperty'
                - $ref: '#/components/schemas/Filter_INCENTIVE_StringProperty'
                - $ref: '#/components/schemas/Filter_INCENTIVE_SingleSelectProperty'
                - $ref: '#/components/schemas/Filter_INCENTIVE_MultiSelectProperty'
              discriminator:
                propertyName: propertyType
                mapping:
                  DATETIME:
                    $ref: '#/components/schemas/Filter_INCENTIVE_DateTimeProperty'
                  STRING:
                    $ref: '#/components/schemas/Filter_INCENTIVE_StringProperty'
                  SINGLE_SELECT:
                    $ref: '#/components/schemas/Filter_INCENTIVE_SingleSelectProperty'
                  MULTI_SELECT:
                    $ref: '#/components/schemas/Filter_INCENTIVE_MultiSelectProperty'
          required:
            - incentive
        - type: object
          properties:
            participant:
              oneOf:
                - $ref: '#/components/schemas/Filter_PARTICIPANT_DateTimeProperty'
                - $ref: '#/components/schemas/Filter_PARTICIPANT_BooleanProperty'
                - $ref: '#/components/schemas/Filter_PARTICIPANT_StringProperty'
                - $ref: '#/components/schemas/Filter_PARTICIPANT_SingleSelectProperty'
                - $ref: '#/components/schemas/Filter_PARTICIPANT_MultiSelectProperty'
              discriminator:
                propertyName: propertyType
                mapping:
                  DATETIME:
                    $ref: '#/components/schemas/Filter_PARTICIPANT_DateTimeProperty'
                  BOOLEAN:
                    $ref: '#/components/schemas/Filter_PARTICIPANT_BooleanProperty'
                  STRING:
                    $ref: '#/components/schemas/Filter_PARTICIPANT_StringProperty'
                  SINGLE_SELECT:
                    $ref: >-
                      #/components/schemas/Filter_PARTICIPANT_SingleSelectProperty
                  MULTI_SELECT:
                    $ref: >-
                      #/components/schemas/Filter_PARTICIPANT_MultiSelectProperty
          required:
            - participant
      description: A filter for searching for people
    Filter_MESSAGE_DateTimeProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - DATETIME
        propertyName:
          type: string
          enum:
            - SENT_AT
            - SCHEDULED_AT
        operator:
          $ref: '#/components/schemas/DateOperator'
        value:
          $ref: '#/components/schemas/DateValues'
        timestamp:
          type: number
          description: >-
            Deprecated since use of this value can be confusing. The timestamp
            of a date in UTC milliseconds. This uses the date value of the
            timestamp by truncating to the day. Filtering for exact times is not
            supported. Requires EXACT_DATE value
          deprecated: true
        exactDate:
          type: string
          format: date
          description: A date string in yyyy-MM-dd. Requires EXACT_DATE value
        amount:
          type: number
          description: >-
            The number of time units (days, weeks, months, or years) depending
            on the value field. Prefer this over days for clarity.
        days:
          type: number
          description: >-
            Deprecated: Use amount instead. The number of time units (days,
            weeks, months, or years) depending on the value field.
          deprecated: true
        propertyGroup:
          type: string
          enum:
            - MESSAGE
      required:
        - propertyType
        - propertyName
        - operator
    Filter_MESSAGE_NumberProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - NUMBER
        propertyName:
          type: string
          enum:
            - EMAIL_OPEN_COUNT
            - LINK_CLICK_COUNT
        operator:
          $ref: '#/components/schemas/NumberOperator'
        value:
          type: number
        propertyGroup:
          type: string
          enum:
            - MESSAGE
      required:
        - propertyType
        - propertyName
        - operator
    Filter_MESSAGE_StringProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - STRING
        propertyName:
          type: string
          enum:
            - SUBJECT
            - SENDER_EMAIL_ADDRESS
            - RECIPIENT_EMAIL_ADDRESS
        operator:
          $ref: '#/components/schemas/StringOperator'
        value:
          type: string
        propertyGroup:
          type: string
          enum:
            - MESSAGE
      required:
        - propertyType
        - propertyName
        - operator
    Filter_MESSAGE_SingleSelectProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - SINGLE_SELECT
        propertyName:
          type: string
          enum:
            - EMAIL_STATUS
            - EMAIL_CAMPAIGN
            - MESSAGE_TYPE
            - MESSAGE_STATUS
        operator:
          $ref: '#/components/schemas/SingleSelectOperator'
        value:
          type: string
          description: Single value for IS/IS_NOT operators
        values:
          type: array
          items:
            type: string
          description: Multiple values for IS_ANY_OF/IS_NONE_OF operators
        propertyGroup:
          type: string
          enum:
            - MESSAGE
      required:
        - propertyType
        - propertyName
        - operator
    Message:
      type: object
      properties:
        id:
          type: string
          description: The ID of the message
        messageType:
          type: string
          enum:
            - EMAIL
            - SMS
            - WHATSAPP
          description: The channel type of the message (EMAIL, SMS)
        recipientId:
          type:
            - string
            - 'null'
          description: The ID of the recipient person
        senderId:
          type:
            - string
            - 'null'
          description: The ID of the sender user
        status:
          type: string
          description: The status of the message
        type:
          type: string
          description: The type of message (e.g., AD_HOC, SCREENER)
        sentAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When the message was sent
        scheduledSendTime:
          type:
            - string
            - 'null'
          format: date-time
          description: When the message is scheduled to be sent
        studyId:
          type:
            - string
            - 'null'
          description: The ID of the associated study
        participantId:
          type:
            - string
            - 'null'
          description: The ID of the associated participant
        messageCampaignId:
          type:
            - string
            - 'null'
          description: The ID of the associated message campaign
        createdAt:
          type: string
          format: date-time
          description: When the message was created
      required:
        - id
        - messageType
        - recipientId
        - senderId
        - status
        - type
        - sentAt
        - scheduledSendTime
        - studyId
        - participantId
        - messageCampaignId
        - createdAt
      description: A message
    CustomPropertyFilter:
      oneOf:
        - $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_BooleanProperty'
        - $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_DateTimeProperty'
        - $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_NumberProperty'
        - $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_StringProperty'
        - $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_SingleSelectProperty'
        - $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_MultiSelectProperty'
        - $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_LocationProperty'
      discriminator:
        propertyName: propertyType
        mapping:
          BOOLEAN:
            $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_BooleanProperty'
          DATETIME:
            $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_DateTimeProperty'
          NUMBER:
            $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_NumberProperty'
          STRING:
            $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_StringProperty'
          SINGLE_SELECT:
            $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_SingleSelectProperty'
          MULTI_SELECT:
            $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_MultiSelectProperty'
          LOCATION:
            $ref: '#/components/schemas/Filter_CUSTOM_PROPERTY_LocationProperty'
      description: A custom property filter
      example:
        propertyType: STRING
        propertyGroup: CUSTOM_PROPERTY
        propertyName: CUSTOM_PROPERTY
        propertyId: custom_property_1
        operator: IS
        value: some value
    Filter_PERSON_DateTimeProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - DATETIME
        propertyName:
          type: string
          enum:
            - IMPORT_DATE
            - LAST_CONTACT_DATE
            - LAST_INTERVIEW_DATE
            - LAST_UNMOD_TEST_DATE
            - LAST_SURVEY_DATE
            - CONTACT_STATUS_UPDATE_DATE
            - LAST_CHANGED_AT
            - SCREENER_SUBMITTED_AT
            - FORM_SIGNEDUP_AT
        operator:
          $ref: '#/components/schemas/DateOperator'
        value:
          $ref: '#/components/schemas/DateValues'
        timestamp:
          type: number
          description: >-
            Deprecated since use of this value can be confusing. The timestamp
            of a date in UTC milliseconds. This uses the date value of the
            timestamp by truncating to the day. Filtering for exact times is not
            supported. Requires EXACT_DATE value
          deprecated: true
        exactDate:
          type: string
          format: date
          description: A date string in yyyy-MM-dd. Requires EXACT_DATE value
        amount:
          type: number
          description: >-
            The number of time units (days, weeks, months, or years) depending
            on the value field. Prefer this over days for clarity.
        days:
          type: number
          description: >-
            Deprecated: Use amount instead. The number of time units (days,
            weeks, months, or years) depending on the value field.
          deprecated: true
        propertyGroup:
          type: string
          enum:
            - PERSON
      required:
        - propertyType
        - propertyName
        - operator
    Filter_PERSON_BooleanProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - BOOLEAN
        propertyName:
          type: string
          enum:
            - OPTED_OUT
            - CONSENT_FORM_WAS_SUBMITTED
        operator:
          $ref: '#/components/schemas/BooleanOperator'
        value:
          type: boolean
        propertyGroup:
          type: string
          enum:
            - PERSON
      required:
        - propertyType
        - propertyName
        - operator
        - value
    Filter_PERSON_NumberProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - NUMBER
        propertyName:
          type: string
          enum:
            - 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
            - TOTAL_NUMBER_OF_INTERVIEWS_COMPLETED
            - TOTAL_NUMBER_OF_INTERVIEWS_COMPLETED_L30
            - TOTAL_NUMBER_OF_INTERVIEWS_COMPLETED_L90
            - TOTAL_NUMBER_OF_INTERVIEWS_COMPLETED_L365
            - TOTAL_NUMBER_OF_NO_SHOW_INTERVIEWS
            - SHOW_RATE
            - 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
            - TOTAL_NUMBER_OF_SURVEYS_COMPLETED
            - TOTAL_NUMBER_OF_SURVEYS_COMPLETED_L30
            - TOTAL_NUMBER_OF_SURVEYS_COMPLETED_L90
            - TOTAL_NUMBER_OF_SURVEYS_COMPLETED_L365
            - PARTICIPANT_RATING
            - TOTAL_RATINGS
        operator:
          $ref: '#/components/schemas/NumberOperator'
        value:
          type: number
        propertyGroup:
          type: string
          enum:
            - PERSON
      required:
        - propertyType
        - propertyName
        - operator
    Filter_PERSON_StringProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - STRING
        propertyName:
          type: string
          enum:
            - PERSON_ID
            - NAME
            - FIRST_NAME
            - LAST_NAME
            - EMAIL
            - PHONE
            - FORM_FIRST_SIGNUP_REFERRAL_CODE
            - FORM_LAST_SIGNUP_REFERRAL_CODE
        operator:
          $ref: '#/components/schemas/StringOperator'
        value:
          type: string
        propertyGroup:
          type: string
          enum:
            - PERSON
      required:
        - propertyType
        - propertyName
        - operator
    Filter_PERSON_MultiSelectProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - MULTI_SELECT
        propertyName:
          type: string
          enum:
            - IMPORT_UPLOAD_LIST
            - IMPORT_SOURCE
            - PANEL_MEMBERSHIP
            - STUDY_MEMBERSHIP
            - CONTACT_STATUS
            - CONSENT_SUBMISSIONS
            - POPULATION_MEMBERSHIP
            - SEGMENT_MEMBERSHIP
            - POPULATION_LIST_MEMBERSHIP
            - SCREENER_STATUS
            - FORM_APPROVAL_STATUS
            - SIGNUP_REFERRAL_CODES
        operator:
          $ref: '#/components/schemas/MultiSelectOperator'
        values:
          type: array
          items:
            type: string
        propertyGroup:
          type: string
          enum:
            - PERSON
      required:
        - propertyType
        - propertyName
        - operator
    Filter_INCENTIVE_DateTimeProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - DATETIME
        propertyName:
          type: string
          enum:
            - SENT_AT
        operator:
          $ref: '#/components/schemas/DateOperator'
        value:
          $ref: '#/components/schemas/DateValues'
        timestamp:
          type: number
          description: >-
            Deprecated since use of this value can be confusing. The timestamp
            of a date in UTC milliseconds. This uses the date value of the
            timestamp by truncating to the day. Filtering for exact times is not
            supported. Requires EXACT_DATE value
          deprecated: true
        exactDate:
          type: string
          format: date
          description: A date string in yyyy-MM-dd. Requires EXACT_DATE value
        amount:
          type: number
          description: >-
            The number of time units (days, weeks, months, or years) depending
            on the value field. Prefer this over days for clarity.
        days:
          type: number
          description: >-
            Deprecated: Use amount instead. The number of time units (days,
            weeks, months, or years) depending on the value field.
          deprecated: true
        propertyGroup:
          type: string
          enum:
            - INCENTIVE
      required:
        - propertyType
        - propertyName
        - operator
    Filter_INCENTIVE_StringProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - STRING
        propertyName:
          type: string
          enum:
            - EMAIL
            - STUDY
            - CUSTOM_INCENTIVE_VALUE
        operator:
          $ref: '#/components/schemas/StringOperator'
        value:
          type: string
        propertyGroup:
          type: string
          enum:
            - INCENTIVE
      required:
        - propertyType
        - propertyName
        - operator
    Filter_INCENTIVE_SingleSelectProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - SINGLE_SELECT
        propertyName:
          type: string
          enum:
            - TYPE
            - STATUS
            - INCENTIVE_BUDGET
        operator:
          $ref: '#/components/schemas/SingleSelectOperator'
        value:
          type: string
          description: Single value for IS/IS_NOT operators
        values:
          type: array
          items:
            type: string
          description: Multiple values for IS_ANY_OF/IS_NONE_OF operators
        propertyGroup:
          type: string
          enum:
            - INCENTIVE
      required:
        - propertyType
        - propertyName
        - operator
    Filter_INCENTIVE_MultiSelectProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - MULTI_SELECT
        propertyName:
          type: string
          enum:
            - CUSTOM_INCENTIVE
        operator:
          $ref: '#/components/schemas/MultiSelectOperator'
        values:
          type: array
          items:
            type: string
        propertyGroup:
          type: string
          enum:
            - INCENTIVE
      required:
        - propertyType
        - propertyName
        - operator
    Filter_PARTICIPANT_DateTimeProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - DATETIME
        propertyName:
          type: string
          enum:
            - INTERVIEW_START_TIME
            - INTERVIEW_START_DATE
            - SCREENER_SENT_AT
            - SCREENER_SUBMITTED_AT
        operator:
          $ref: '#/components/schemas/DateOperator'
        value:
          $ref: '#/components/schemas/DateValues'
        timestamp:
          type: number
          description: >-
            Deprecated since use of this value can be confusing. The timestamp
            of a date in UTC milliseconds. This uses the date value of the
            timestamp by truncating to the day. Filtering for exact times is not
            supported. Requires EXACT_DATE value
          deprecated: true
        exactDate:
          type: string
          format: date
          description: A date string in yyyy-MM-dd. Requires EXACT_DATE value
        amount:
          type: number
          description: >-
            The number of time units (days, weeks, months, or years) depending
            on the value field. Prefer this over days for clarity.
        days:
          type: number
          description: >-
            Deprecated: Use amount instead. The number of time units (days,
            weeks, months, or years) depending on the value field.
          deprecated: true
        propertyGroup:
          type: string
          enum:
            - PARTICIPANT
      required:
        - propertyType
        - propertyName
        - operator
    Filter_PARTICIPANT_BooleanProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - BOOLEAN
        propertyName:
          type: string
          enum:
            - CONSENT_FORM_SUBMITTED
        operator:
          $ref: '#/components/schemas/BooleanOperator'
        value:
          type: boolean
        propertyGroup:
          type: string
          enum:
            - PARTICIPANT
      required:
        - propertyType
        - propertyName
        - operator
        - value
    Filter_PARTICIPANT_StringProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - STRING
        propertyName:
          type: string
          enum:
            - PARTICIPANT_ID
            - STUDY_FIRST_SIGNUP_REFERRAL_CODE
            - STUDY_LAST_SIGNUP_REFERRAL_CODE
            - STUDY_NOTE
        operator:
          $ref: '#/components/schemas/StringOperator'
        value:
          type: string
        propertyGroup:
          type: string
          enum:
            - PARTICIPANT
      required:
        - propertyType
        - propertyName
        - operator
    Filter_PARTICIPANT_SingleSelectProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - SINGLE_SELECT
        propertyName:
          type: string
          enum:
            - SCREENER_STATUS
            - STATUS
            - APPROVAL_STATUS
            - RECRUITMENT_CRITERIA_MATCH
            - STUDY_SHORTLIST_STATUS
        operator:
          $ref: '#/components/schemas/SingleSelectOperator'
        value:
          type: string
          description: Single value for IS/IS_NOT operators
        values:
          type: array
          items:
            type: string
          description: Multiple values for IS_ANY_OF/IS_NONE_OF operators
        propertyGroup:
          type: string
          enum:
            - PARTICIPANT
      required:
        - propertyType
        - propertyName
        - operator
    Filter_PARTICIPANT_MultiSelectProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - MULTI_SELECT
        propertyName:
          type: string
          enum:
            - STUDY_QUOTA_GROUP
        operator:
          $ref: '#/components/schemas/MultiSelectOperator'
        values:
          type: array
          items:
            type: string
        propertyGroup:
          type: string
          enum:
            - PARTICIPANT
      required:
        - propertyType
        - propertyName
        - operator
    DateOperator:
      type: string
      enum:
        - IS
        - IS_NOT
        - IS_BEFORE
        - IS_AFTER
        - IS_ON_OR_BEFORE
        - IS_ON_OR_AFTER
        - IS_WITHIN
        - IS_EMPTY
        - IS_NOT_EMPTY
    DateValues:
      type: string
      enum:
        - TODAY
        - TOMORROW
        - YESTERDAY
        - ONE_WEEK_AGO
        - ONE_WEEK_FROM_NOW
        - ONE_MONTH_AGO
        - ONE_MONTH_FROM_NOW
        - ONE_YEAR_AGO
        - ONE_YEAR_FROM_NOW
        - NUMBER_OF_DAYS_AGO
        - NUMBER_OF_DAYS_FROM_NOW
        - NUMBER_OF_WEEKS_AGO
        - NUMBER_OF_WEEKS_FROM_NOW
        - NUMBER_OF_MONTHS_AGO
        - NUMBER_OF_MONTHS_FROM_NOW
        - NUMBER_OF_YEARS_AGO
        - NUMBER_OF_YEARS_FROM_NOW
        - EXACT_DATE
      description: >-
        The value of the date being searched for. All dates are relative to
        workspace timezone
    NumberOperator:
      type: string
      enum:
        - EQUAL
        - NOT_EQUAL
        - GREATER_THAN
        - LESS_THAN
        - GTE
        - LTE
        - IS_EMPTY
        - IS_NOT_EMPTY
    StringOperator:
      type: string
      enum:
        - IS
        - IS_NOT
        - CONTAINS
        - DOES_NOT_CONTAIN
        - STARS_WITH
        - ENDS_WITH
        - IS_EMPTY
        - IS_NOT_EMPTY
    SingleSelectOperator:
      type: string
      enum:
        - IS
        - IS_NOT
        - IS_ANY_OF
        - IS_NONE_OF
        - IS_EMPTY
        - IS_NOT_EMPTY
    Filter_CUSTOM_PROPERTY_BooleanProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - BOOLEAN
        propertyId:
          type: string
        operator:
          $ref: '#/components/schemas/BooleanOperator'
        value:
          type: boolean
        propertyName:
          type: string
          enum:
            - CUSTOM_PROPERTY
        propertyGroup:
          type: string
          enum:
            - CUSTOM_PROPERTY
      required:
        - propertyType
        - propertyId
        - operator
        - value
    Filter_CUSTOM_PROPERTY_DateTimeProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - DATETIME
        propertyId:
          type: string
        operator:
          $ref: '#/components/schemas/DateOperator'
        value:
          $ref: '#/components/schemas/DateValues'
        timestamp:
          type: number
          description: >-
            Deprecated since use of this value can be confusing. The timestamp
            of a date in UTC milliseconds. This uses the date value of the
            timestamp by truncating to the day. Filtering for exact times is not
            supported. Requires EXACT_DATE value
          deprecated: true
        exactDate:
          type: string
          format: date
          description: A date string in yyyy-MM-dd. Requires EXACT_DATE value
        amount:
          type: number
          description: >-
            The number of time units (days, weeks, months, or years) depending
            on the value field. Prefer this over days for clarity.
        days:
          type: number
          description: >-
            Deprecated: Use amount instead. The number of time units (days,
            weeks, months, or years) depending on the value field.
          deprecated: true
        propertyName:
          type: string
          enum:
            - CUSTOM_PROPERTY
        propertyGroup:
          type: string
          enum:
            - CUSTOM_PROPERTY
      required:
        - propertyType
        - propertyId
        - operator
    Filter_CUSTOM_PROPERTY_NumberProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - NUMBER
        propertyId:
          type: string
        operator:
          $ref: '#/components/schemas/NumberOperator'
        value:
          type: number
        propertyName:
          type: string
          enum:
            - CUSTOM_PROPERTY
        propertyGroup:
          type: string
          enum:
            - CUSTOM_PROPERTY
      required:
        - propertyType
        - propertyId
        - operator
    Filter_CUSTOM_PROPERTY_StringProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - STRING
        propertyId:
          type: string
        operator:
          $ref: '#/components/schemas/StringOperator'
        value:
          type: string
        propertyName:
          type: string
          enum:
            - CUSTOM_PROPERTY
        propertyGroup:
          type: string
          enum:
            - CUSTOM_PROPERTY
      required:
        - propertyType
        - propertyId
        - operator
    Filter_CUSTOM_PROPERTY_SingleSelectProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - SINGLE_SELECT
        propertyId:
          type: string
        operator:
          $ref: '#/components/schemas/SingleSelectOperator'
        value:
          type: string
          description: Single value for IS/IS_NOT operators
        values:
          type: array
          items:
            type: string
          description: Multiple values for IS_ANY_OF/IS_NONE_OF operators
        propertyName:
          type: string
          enum:
            - CUSTOM_PROPERTY
        propertyGroup:
          type: string
          enum:
            - CUSTOM_PROPERTY
      required:
        - propertyType
        - propertyId
        - operator
    Filter_CUSTOM_PROPERTY_MultiSelectProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - MULTI_SELECT
        propertyId:
          type: string
        operator:
          $ref: '#/components/schemas/MultiSelectOperator'
        values:
          type: array
          items:
            type: string
        propertyName:
          type: string
          enum:
            - CUSTOM_PROPERTY
        propertyGroup:
          type: string
          enum:
            - CUSTOM_PROPERTY
      required:
        - propertyType
        - propertyId
        - operator
    Filter_CUSTOM_PROPERTY_LocationProperty:
      type: object
      properties:
        propertyType:
          type: string
          enum:
            - LOCATION
        propertyId:
          type: string
        operator:
          $ref: '#/components/schemas/LocationOperator'
        value:
          type: object
          properties:
            centerPoint:
              type: object
              properties:
                lat:
                  type: number
                lon:
                  type: number
              required:
                - lat
                - lon
            unit:
              type: string
              enum:
                - KM
                - MI
            range:
              type: number
        propertyName:
          type: string
          enum:
            - CUSTOM_PROPERTY
        propertyGroup:
          type: string
          enum:
            - CUSTOM_PROPERTY
      required:
        - propertyType
        - propertyId
        - operator
    BooleanOperator:
      type: string
      enum:
        - EQUAL
        - NOT_EQUAL
    MultiSelectOperator:
      type: string
      enum:
        - CONTAINS
        - DOES_NOT_CONTAIN
        - IS_EMPTY
        - IS_NOT_EMPTY
    LocationOperator:
      type: string
      enum:
        - WITHIN_RADIUS
        - IS_EMPTY
        - IS_NOT_EMPTY
  headers:
    X-RateLimit-Limit:
      description: The maximum number of requests the client is allowed to make.
      schema:
        type: integer
        format: int32
    X-RateLimit-Remaining:
      description: >-
        The number of requests remaining for the client in the current time
        window.
      schema:
        type: integer
        format: int32
    X-RateLimit-Reset:
      description: >-
        The time at which the current time window ends (in Unix timestamp
        format).
      schema:
        type: integer
        format: int32
    Retry-After:
      description: The number of seconds until the client should retry the request.
      schema:
        type: integer
        format: int32
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````