Filtering

Learn all about ClickFunnels filters and common gotchas.

Available filters

If filtering is available for a specific endpoint, 'filter' will be listed as one of the options in the query parameters section of the Request area. Attributes by which you can filter will be listed as well.

How it works

There is a filter mechanism that adheres to some simple conventions. The filters provided on
list endpoints like filter[email_address] and filter[id] on the Contacts list endpoint, need
to be "simple" and "fast". These filters are supposed to be easy to use and allow you to filter by
one or more concrete values.

Here's an example of how you could use the filter to find a contact with a certain email address:

$ curl -g 'https://myteam.myclickfunnels.com/api/v2/workspaces/3/contacts?filter[email_address][email protected]' \
  --header 'Authorization: Bearer ...'
[{"email_address": "[email protected]",...}]

You can also filter by multiple values:

$ curl -g 'https://myteam.myclickfunnels.com/api/v2/workspaces/3/contacts?filter[email_address][email protected],[email protected]' \ 
  --header 'Authorization: Bearer ...'
[{"email_address": "[email protected]",...}, {"email_address": "[email protected]",...}]

You can also filter by multiple attributes. Similar to filters that you might be familiar with when
using GitHub (e.g.: filtering PRs by closed and assignee), those filters are AND filters, which
give you the intersection of multiple records:

# If [email protected] comes with an ID of 1, you will only see this record for this API call:
$ curl -g 'https://myteam.myclickfunnels.com/api/v2/workspaces/3/contacts?filter[email_address][email protected],[email protected]&filter[id]=1' \
  --header 'Authorization: Bearer ...'
[{"email_address": "[email protected]",...}] 
# [email protected] is not included because it has a different ID that is not included in the filter.

Gotchas

  • Keep in mind that depending on your tools, you might run into different situations where additional encoding is needed. For example:
    • You might need to encode filter[id]=1 as filter%5Bid%5D=1 or use special options in your tools of choice to do it for you (like g in CURL).
    • Special URL characters like %, +, or unicode characters in strings (like Chinese characters in email addresses) will need additional encoding.

What’s Next