Campaign search

GET {{baseUrl}}/marketing/v3/campaigns/?sort=<string>&after=<string>&limit=<integer>&name=<string>&properties=<string>&properties=<string>

This endpoint allows users to search for and return a page of campaigns based on various query parameters. Users can filter by name, sort, and paginate through the campaigns, as well as control which properties are returned in the response.

Request Params

KeyDatatypeRequiredDescription
sortstringThe field by which to sort the results. Allowed values are hs_name, createdAt, updatedAt. An optional '-' before the property name can denote descending order
Default: hs_name
afterstringA cursor for pagination. If provided, the results will start after the given cursor.
Example: NTI1Cg%3D%3D
limitstringThe maximum number of results to return. Allowed values range from 1 to 100
Default: 50
namestringA filter to return campaigns whose names contain the specified substring. This allows partial matching of campaign names, returning all campaigns that include the given substring in their name. If this parameter is not provided, the search will return all campaigns
propertiesstringA comma-separated list of the properties to be returned in the response. If any of the specified properties has empty value on the requested object(s), they will be ignored and not returned in response. If this parameter is empty, the response will include an empty properties map
propertiesstringA comma-separated list of the properties to be returned in the response. If any of the specified properties has empty value on the requested object(s), they will be ignored and not returned in response. If this parameter is empty, the response will include an empty properties map

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;results&quot;:[{&quot;createdAt&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;properties&quot;:{&quot;mollit_a54&quot;:&quot;\u003cstring\u003e&quot;},&quot;updatedAt&quot;:&quot;\u003cdateTime\u003e&quot;},{&quot;createdAt&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;properties&quot;:{&quot;Lorem_9&quot;:&quot;\u003cstring\u003e&quot;,&quot;exercitation_e4&quot;:&quot;\u003cstring\u003e&quot;,&quot;ipsume&quot;:&quot;\u003cstring\u003e&quot;},&quot;updatedAt&quot;:&quot;\u003cdateTime\u003e&quot;}],&quot;total&quot;:&quot;\u003cinteger\u003e&quot;,&quot;paging&quot;:{&quot;next&quot;:{&quot;after&quot;:&quot;\u003cstring\u003e&quot;,&quot;link&quot;:&quot;\u003cstring\u003e&quot;}}}