Search contacts

You can search for contacts through various properties and conditions.

You can pass in a list of conditions to hyper-filter the results. Let's take a look at an example to understand how it works:

condition1 = [{'property': 'email', 'condition': 'Is', 'value': '[email protected]'}]
condition2 = [{'property': 'email', 'condition': 'Is', 'value': '[email protected]'}]
time = [{'property': "created_timestamp", 'condition': "Exactly", 'value': "0"}]
enriched = [{'property': "is_enriched", 'condition': 'Is', 'value': True}]
conditions = condition1 + condition2 + time + enriched

When you pass in conditions that have the same property name and condition value we convert them into 'OR' statements. Under our example above this would return contacts that have the email '[email protected]' OR '[email protected]'.

Finally, we apply our third condition to only look for contacts added today. You can read the condition as being "Get me all contacts that were created 0 days ago".

Below are the property names you can filter on and the conditions you can apply.

Property name
Description
Available conditions

sequence__id (int)

The ID of a sequence in Copyfactory.

"Is", "Is not"

email (str)

The email of the contact

"Is", "Is not", "Contains", "Does not contain"

premise_ids_used (str)

The ID of a sentence premise that was generated for the contact. This is NOT the Id of the premise but the internal ID. The internal ID can be retrieved using the premises endpoint and looks like "7da3d316-aadf-4379-b588-7459395c67c7"

"Is", "Is not"

created_timestamp (int)

The timestamp of when the contact was created. We let you filter based on number of days since created.

"More than", "Exactly", "Less than"

updated_timestamp (int)

The timestamp of when the contact was updated. We let you filter based on number of days since created. So a value of '0' would be today.

"More than", "Exactly", "Less than"

last_synced_timestamp (int)

The timestamp of when the contact was synced to one of your integrations. We let you filter based on number of days since created. So a value of '0' would be today.

"More than", "Exactly", "Less than"

is_enriched (bool)

A True/False of if the contact has been enriched.

"Is", "Is not"

Search contacts

POST https://app.copyfactory.io/api/v2/contact/search/

Searches for contacts

Headers

Name
Type
Description

Authorization*

String

Copyfactory API key

Request Body

Name
Type
Description

conditions

array

List of objects containing the conditions you want to apply to the search.

page_size

int

The size of the page you want returned. Default is 100.

page

int

The page number you want returned to you. Default is 1.

Last updated