object
ContactCondition
Variants
Use type to choose one of `searchText`, `archiveStatus`, `createdAt`, `firstSeen`, `lastInteraction`, `chatCount`, `customFieldText`, `customFieldDate`, `hasAnyTag`, `hasAnyChannel`.
SearchTextCondition
searchTextRequired: `type`, `text`.
- Name
type- Type
- enum
- Description
- Required property. Allowed values: searchText.
- Name
text- Type
- string
- Description
- Required property.
Example
searchText
{
"type": "searchText",
"text": "string"
}ArchiveStatusCondition
archiveStatusRequired: `type`, `status`.
- Name
type- Type
- enum
- Description
- Required property. Allowed values: archiveStatus.
- Name
status- Type
- ArchiveStatus
- Description
- Required property.
Example
archiveStatus
{
"type": "archiveStatus",
"status": "active"
}CreatedAtCondition
createdAtRequired: `type`, `operator`.
- Name
type- Type
- enum
- Description
- Required property. Allowed values: createdAt.
- Name
operator- Type
- enum
- Description
- Required property. Allowed values: before, after, between, olderThanDays, newerThanDays.
- Name
start- Type
- string
- Description
- Optional property.
- Name
end- Type
- string
- Description
- Optional property.
- Name
days- Type
- integer
- Description
- Optional property.
Example
createdAt
{
"type": "createdAt",
"operator": "before",
"start": "string",
"end": "string",
"days": 0
}FirstSeenCondition
firstSeenRequired: `type`, `operator`.
- Name
type- Type
- enum
- Description
- Required property. Allowed values: firstSeen.
- Name
operator- Type
- enum
- Description
- Required property. Allowed values: before, after, between, olderThanDays, newerThanDays, exists, notExists.
- Name
start- Type
- string
- Description
- Optional property.
- Name
end- Type
- string
- Description
- Optional property.
- Name
days- Type
- integer
- Description
- Optional property.
Example
firstSeen
{
"type": "firstSeen",
"operator": "before",
"start": "string",
"end": "string",
"days": 0
}LastInteractionCondition
lastInteractionRequired: `type`, `operator`.
- Name
type- Type
- enum
- Description
- Required property. Allowed values: lastInteraction.
- Name
operator- Type
- enum
- Description
- Required property. Allowed values: before, after, between, olderThanDays, newerThanDays, exists, notExists.
- Name
start- Type
- string
- Description
- Optional property.
- Name
end- Type
- string
- Description
- Optional property.
- Name
days- Type
- integer
- Description
- Optional property.
Example
lastInteraction
{
"type": "lastInteraction",
"operator": "before",
"start": "string",
"end": "string",
"days": 0
}ChatCountCondition
chatCountRequired: `type`, `operator`, `window`.
- Name
type- Type
- enum
- Description
- Required property. Allowed values: chatCount.
- Name
operator- Type
- enum
- Description
- Required property. Allowed values: atLeast, atMost, between.
- Name
min- Type
- integer
- Description
- Optional property.
- Name
max- Type
- integer
- Description
- Optional property.
- Name
window- Type
- EngagementWindow
- Description
- Required property.
Example
chatCount
{
"type": "chatCount",
"operator": "atLeast",
"min": 0,
"max": 0,
"window": {
"type": "lifetime",
"days": 0
}
}CustomFieldTextCondition
customFieldTextRequired: `type`, `fieldId`, `operator`.
- Name
type- Type
- enum
- Description
- Required property. Allowed values: customFieldText.
- Name
fieldId- Type
- string
- Description
- Required property.
- Name
operator- Type
- enum
- Description
- Required property. Allowed values: equals, notEquals, in, exists, notExists.
- Name
value- Type
- string
- Description
- Optional property.
- Name
values- Type
- array<string>
- Description
- Optional property.
Example
customFieldText
{
"type": "customFieldText",
"fieldId": "string",
"operator": "equals",
"value": "string",
"values": [
"string"
]
}CustomFieldDateCondition
customFieldDateRequired: `type`, `fieldId`, `operator`.
- Name
type- Type
- enum
- Description
- Required property. Allowed values: customFieldDate.
- Name
fieldId- Type
- string
- Description
- Required property.
- Name
operator- Type
- enum
- Description
- Required property. Allowed values: before, after, between, olderThanDays, newerThanDays, exists, notExists.
- Name
start- Type
- string
- Description
- Optional property.
- Name
end- Type
- string
- Description
- Optional property.
- Name
days- Type
- integer
- Description
- Optional property.
Example
customFieldDate
{
"type": "customFieldDate",
"fieldId": "string",
"operator": "before",
"start": "string",
"end": "string",
"days": 0
}HasAnyTagCondition
hasAnyTagRequired: `type`, `tagIds`.
- Name
type- Type
- enum
- Description
- Required property. Allowed values: hasAnyTag.
- Name
tagIds- Type
- array<string>
- Description
- Required property.
Example
hasAnyTag
{
"type": "hasAnyTag",
"tagIds": [
"string"
]
}HasAnyChannelCondition
hasAnyChannelRequired: `type`, `channels`.
- Name
type- Type
- enum
- Description
- Required property. Allowed values: hasAnyChannel.
- Name
channels- Type
- array<ContactChannel>
- Description
- Required property.
Example
hasAnyChannel
{
"type": "hasAnyChannel",
"channels": [
"whatsapp"
]
}Related operations
- Search contactsPOST /contacts/search
- List saved contact segmentsGET /segments
- Create a saved contact segmentPOST /segments
- Get a saved contact segmentGET /segments/{segmentId}
- Update a saved contact segmentPATCH /segments/{segmentId}
- Search contacts matching a saved segmentPOST /segments/{segmentId}/contacts/search