People
Search for a list of people
GETpeople/people
This endpoint gives you access to the powerful search and filtering abilities of People CRM.
Filters
You can filter the list of returned People using the filters
parameter, giving you the ability to fine-tune your query based on the rich tracking information stored in GoSquared.
Results can be filtered on events
(see Event Types) or properties
(see Property Types).
The filters
parameter can be complex so we advise that you look at an existing Smart Group to begin with to see how your pre-existing Smart Groups filter results. Using the Query Builder on the right you can graphically build up a filters
object using any combination of filters. You can then see the Example Request
below with the generated json query.
For reference, when using filters key will be element you are filtering on, either a property or event. Path will be the specific property or event you are filtering on, for example for a property that could be 'email'. Operator will be the notation or criteria for that path, such as 'contains'. Value will be the specific value of that path you are filtering on.
For example, if wanted to build a filter for any users with an email containing 'GoSquared', it would be as follows:
key: 'property'
path: 'email'
operator: 'contains'
value: 'GoSquared'
Query String Parameters
query | String The query term you would you like to search for |
filters | ObjectDefault Value: An array of filters to be applied to the People CRM query. |
fields | String A comma delimited list of fields to be returned. (e.g. |
sort | StringDefault Value: Which property to sort by followed by |
presenter | StringDefault Value: Accepted values: Modifies the response data structure |
limit | StringDefault Value: The maximum number of results e.g. |
dateFormat | String The format that any date parameters will be returned in. This takes any value permitted by Moment. |
Example Request
The PHP library does not support this function at this time
Live Responseundefined undefined
Your API Key is not authorised for this endpoint
Please fill in the required fields in the Query Builder
Retrieve a person
GETpeople/people/{personID}
Retrieve a single profile from People CRM by its person_id
. This will return a list of all the properties that have been set on the profile.
Path Parameters
personID | StringRequired The unique identifier of the person |
Example Request
The PHP library does not support this function at this time
Live Responseundefined undefined
Your API Key is not authorised for this endpoint
Please fill in the required fields in the Query Builder
Delete a person
DELETEpeople/people/{personID}
Delete a single profile from People CRM by its person_id
. This will delete the profile and all its associated data. If this person is subsequently tracked again in the future, a new blank profile will be created for them, unless you use the blacklist
parameter.
This endpoint requires an API key with Write People permission.
Note: This action is irreversible – deleted data cannot be recovered.
Path Parameters
personID | StringRequired The unique identifier of the person |
Query String Parameters
blacklist | Boolean When deleting a profile with this set to true, GoSquared will add the profile's ids and email address to an id blacklist. The blacklist:
|
Example Request
The PHP library does not support this function at this time
Live Responseundefined undefined
Your API Key is not authorised for this endpoint
Retrieve a list of devices for a person
GETpeople/people/{personID}/devices
Retrieves a paginated list of devices that a specific person has used. The devices are returned in chronological order based on when the device was last used (sorted newest to oldest).
Path Parameters
personID | StringRequired The unique identifier of the person |
Query String Parameters
limit | StringDefault Value: The maximum number of results e.g. |
Example Request
The PHP library does not support this function at this time
Live Responseundefined undefined
Your API Key is not authorised for this endpoint
Please fill in the required fields in the Query Builder
Retrieve a feed of events for a person
GETpeople/people/{personID}/feed
Retrieves a list of tracked events associated with a Person in reverse chronological order. This list can be filtered based on the type
for event
s, which are events that you have tracked, and sessionEvent
s - GoSquared tracking events such as pageviews and session beginning and endings. You can also specify a date range to filter for.
The query
parameter allows you to search through a Person's event history based on the name of the event
Path Parameters
personID | StringRequired The unique identifier of the person |
Query String Parameters
query | String The query term you would you like to search for |
sort | StringDefault Value: Which parameter to sort by |
type | StringDefault Value: |
limit | StringDefault Value: The maximum number of results e.g. |
from | String The start date-time for the query |
to | String The end date-time for the query |
Example Request
The PHP library does not support this function at this time
Live Responseundefined undefined
Your API Key is not authorised for this endpoint
Please fill in the required fields in the Query Builder