Cerkl API
Cerkl is a platform built to put personalized Content in front of an Audience of targeted Subscribers, such as your company's employees or a group of external customers or vendors. While all of this can be accomplished in our application's user interface (UI), it can be useful to leverage our RESTful API to manage both your Cerkl Audience and the Content they're presented with programmatically.
Once you've authenticated with our OAuth 2.0 servers and have a secure access key for your Cerkl
instance, you can perform a variety of operations to automate your Cerkl workflows and make your data work for you.
Our RESTful API provides
Here you can access resources on topics important to understanding what Cerkl does and how you can use it in your software integrations, including helpful examples and illustrations to link our API endpoint functionality to what users see in our UI. Most of our examples are provided using cURL.
Cerkl API Request Basics
Cerkl's RESTful API has many different methods availalbe for you to interact with your organization's data. In addition, our data models have a plethora of fields available to store complex information about your Subscribers, Segments, Blasts, and Content. It's important to understand the basis of our request body templates in order to use our API successfully.
Each request body used in our API is constructed from a JSON
{
"template": {
"version": "3.0",
"data": [
{
...
}
]
}
}
You can see how to construct your payload
"Get All" Requests
Performing
For example, to return the first page of your organization's Segments but only the first 3 entries, you could do this:
$ curl -G 'api.cerkl.com/v3/segment' \
--header 'Authorization: Bearer e37b98a75db58f83edaaccdb75d15c3a38ae5e38' \
--data-urlencode 'page=1' \
--data-urlencode 'page_size=3' \
Filtering/Searching Cerkl Data
Certain fields are searchable in some of our data models by including a
{
"property name": {
"operator": value to search
},
"another property name": {
"operator": value to search
}
}
Fields listed as
Operator | Comparison |
---|---|
(equal) | |
(not equal) | |
(less than) | |
(less than or equal to) | |
(greater than) | |
(greater than or equal to) | |
(within a list of comma separated items) | |
(is null type) |
For example, searching your Subscribers for all everyone with the
$ curl -G 'api.cerkl.com/v3/subscriber' \
--header 'Authorization: Bearer {ACCESS_TOKEN}' \
--data-urlencode 'filters_json={"first_name": {"eq": "Alex"}}'
Be sure to review which fields are searchable in our API Reference to see how you can use the