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. id,email). See Property Types for available options.

sort

StringDefault Value: last.seen:desc

Which property to sort by followed by :desc or :asc for direction. See Property Types for available options.

presenter

StringDefault Value: plain

Accepted values: plain, csv

Modifies the response data structure

limit

StringDefault Value: 0,10

The maximum number of results e.g. 10 to return with an optional offset e.g. 5,10. You can request a maximum of 250 results

dateFormat

String

The format that any date parameters will be returned in. This takes any value permitted by Moment.

Definition

GET https://api.gosquared.com/people/v1/people

Example Request

The Node 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

Definition

GET https://api.gosquared.com/people/v1/people/{personID}

Example Request

The Node 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:

  • prevents the profile from being sent to any services connected to GoSquared
  • stops webhooks from being sent for this profile
  • avoids the profile re-appearing in GoSquared by ignoring any data received for the profile.

Definition

DELETE https://api.gosquared.com/people/v1/people/{personID}

Example Request

The Node 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: 0,10

The maximum number of results e.g. 10 to return with an optional offset e.g. 5,10. You can request a maximum of 250 results

Definition

GET https://api.gosquared.com/people/v1/people/{personID}/devices

Example Request

The Node 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 events, which are events that you have tracked, and sessionEvents - 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: ts:desc

Which parameter to sort by

type

StringDefault Value: event,sessionEvent

limit

StringDefault Value: 0,10

The maximum number of results e.g. 10 to return with an optional offset e.g. 5,10. You can request a maximum of 250 results

from

String

The start date-time for the query

to

String

The end date-time for the query

Definition

GET https://api.gosquared.com/people/v1/people/{personID}/feed

Example Request

The Node 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