Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: BlueConic REST API v2 Timeline event rollups API
description: Welcome to the BlueConic REST API v2.
termsOfService: https://www.blueconic.com/blueconic-terms-and-conditions
contact:
name: Contact us
url: https://support.blueconic.com/hc/en-us/requests/new
license:
name: BlueConic
url: https://github.com/blueconic/openapi/blob/main/LICENSE.MD
version: '100.0'
servers:
- url: https://{blueconicHostname}/rest/v2
description: The BlueConic server
variables:
blueconicHostname:
description: BlueConic server hostname, e.g. 'tenant.blueconic.net'
default: tenantname
tags:
- name: Timeline event rollups
description: Roll up BlueConic timeline event data and store the results in a profile property. You can use that profile property for segmentation, reporting, and activation. Read more
paths:
/timelineEventRollups:
get:
tags:
- Timeline event rollups
summary: Get all timeline event rollups
description: Retrieves all timeline event rollups.
operationId: getAllRollups
parameters:
- name: count
in: query
description: Specifies the number of results to return.
schema:
type: integer
format: int64
default: 20
example: 10
- name: startIndex
in: query
description: Specifies the index of the first item to include in the result.
schema:
type: integer
format: int64
default: 0
example: 0
responses:
'200':
description: Returns the rollups.
content:
application/json:
schema:
$ref: '#/components/schemas/timelineEventRollups'
examples:
Response body:
description: Response body
value: "{\n \"itemsPerPage\": 20,\n \"startIndex\": 0,\n \"timelineEventRollups\": [\n {\n \"creationDate\": \"2025-09-23T11:40:21.373Z\",\n \"creator\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"description\": \"\",\n \"id\": \"ae4d6f16-502e-4822-be38-90abd63ae425\",\n \"lastModifiedDate\": \"2025-09-23T12:39:02.787Z\",\n \"lastModifiedUser\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"name\": \"Revenue last 360 days\",\n \"query\": {\n \"conditions\": [\n {\n \"conditionOperator\": \"WITHIN_LAST\",\n \"eventPropertyId\": \"date\",\n \"toValue\": 360.0,\n \"values\": []\n }\n ],\n \"eventTypeIds\": [\n \"order\"\n ],\n \"mappings\": [\n {\n \"eventPropertyId\": \"total_revenue\",\n \"profilePropertyId\": \"revenue_last_360_days\",\n \"sqlSelectColumnName\": \"revenue_last_360_days\"\n }\n ],\n \"sqlQuery\": \"SELECT\\\\n SUM(`order_event`.`total_revenue`) AS `revenue_last_360_days`\\\\nFROM\\\\n `order_event`\\\\nWHERE\\\\n (\\\\n `order_event`.`date` >= DATEADD (day, -360, CURRENT_DATE())\\\\n AND `order_event`.`date` <= NOW ()\\\\n )\",\n \"type\": \"SQL\"\n },\n \"isEnabled\": true,\n \"tags\": []\n },\n {\n \"creationDate\": \"2025-09-18T11:25:00.141Z\",\n \"creator\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"description\": \"\",\n \"id\": \"7a098eec-c4b8-4f17-933f-accf6ad0723f\",\n \"lastModifiedDate\": \"2025-09-23T09:12:07.611Z\",\n \"lastModifiedUser\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"lastStatisticsUpdate\": \"2025-09-23T09:08:40.763Z\",\n \"name\": \"Order t-shirt revenue last 30 days\",\n \"profilesMarkedForRollup\": 0,\n \"profilesUpdated\": 0,\n \"query\": {\n \"conditions\": [\n {\n \"conditionOperator\": \"WITHIN_LAST\",\n \"eventPropertyId\": \"date\",\n \"toValue\": 30.0,\n \"values\": []\n },\n {\n \"conditionOperator\": \"CONTAINS_ANY\",\n \"eventPropertyId\": \"order.product.tag\",\n \"values\": [\n \"t-shirt\",\n \"tshirt\"\n ]\n }\n ],\n \"eventTypeIds\": [\n \"order\"\n ],\n \"mappings\": [\n {\n \"eventPropertyId\": \"revenue\",\n \"mappingOperator\": \"SUM\",\n \"profilePropertyId\": \"revenue_last_30_days\"\n }\n ],\n \"type\": \"BASIC\"\n },\n \"isEnabled\": true,\n \"tags\": []\n }\n ],\n \"totalPages\": 1,\n \"totalResults\": 3\n}"
'401':
description: Authentication failed (unauthorized).
'403':
description: Authorization failed (incorrect permissions).
'503':
description: The server is too busy to handle the request.
security:
- oauth2:
- read:timeline_event_rollups
/timelineEventRollups/{rollup}:
get:
tags:
- Timeline event rollups
summary: Get one timeline event rollup
description: Retrieves a single rollup configuration.
operationId: getOneRollup
parameters:
- name: rollup
in: path
description: The ID of the timeline event rollup.
required: true
schema:
type: string
responses:
'200':
description: Returned the rollup configuration.
content:
application/json:
schema:
$ref: '#/components/schemas/RollupBean'
examples:
Response body:
description: Response body
value: "{\n \"creationDate\": \"2025-09-23T11:40:21.373Z\",\n \"creator\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"description\": \"\",\n \"id\": \"ae4d6f16-502e-4822-be38-90abd63ae425\",\n \"lastModifiedDate\": \"2025-09-23T12:39:02.787Z\",\n \"lastModifiedUser\": {\n \"fullName\": \"ondemand@blueconic.com\",\n \"userName\": \"ondemand@blueconic.com\"\n },\n \"name\": \"Revenue last 360 days\",\n \"query\": {\n \"conditions\": [\n {\n \"conditionOperator\": \"WITHIN_LAST\",\n \"eventPropertyId\": \"date\",\n \"toValue\": 360.0,\n \"values\": []\n }\n ],\n \"eventTypeIds\": [\n \"order\"\n ],\n \"mappings\": [\n {\n \"eventPropertyId\": \"total_revenue\",\n \"profilePropertyId\": \"revenue_last_360_days\",\n \"sqlSelectColumnName\": \"revenue_last_360_days\"\n }\n ],\n \"sqlQuery\": \"SELECT\\\\n SUM(`order_event`.`total_revenue`) AS `revenue_last_360_days`\\\\nFROM\\\\n `order_event`\\\\nWHERE\\\\n (\\\\n `order_event`.`date` >= DATEADD (day, -360, CURRENT_DATE())\\\\n AND `order_event`.`date` <= NOW ()\\\\n )\",\n \"type\": \"SQL\"\n },\n \"isEnabled\": true,\n \"tags\": []\n}"
'401':
description: Authentication failed (unauthorized).
'403':
description: Authorization failed (incorrect permissions).
'404':
description: The rollup doesn't exist.
'503':
description: The server is too busy to handle the request.
security:
- oauth2:
- read:timeline_event_rollups
components:
schemas:
QueryBean:
type: object
description: Query configuration for the rollup.
properties:
conditions:
type: array
items:
$ref: '#/components/schemas/ConditionBean'
eventTypeIds:
type: array
description: The timeline event type IDs used in the rollup. For basic rollups, it's always singular. For SQL based, it can be multiple.
items:
type: string
description: The timeline event type IDs used in the rollup. For basic rollups, it's always singular. For SQL based, it can be multiple.
mappings:
type: array
items:
$ref: '#/components/schemas/MappingBean'
sqlQuery:
type: string
description: The SQL query. Only applicable when the query type is `SQL`.
type:
type: string
description: The query type.
enum:
- BASIC
- SQL
example: BASIC
RollupBean:
type: object
description: Rollup configuration for a single instance.
properties:
configurationHash:
type: string
description: The configuration hash for this rollup based on the configuration (conditions and mappings).
readOnly: true
creationDate:
type: string
format: date-time
description: The creation date of the object. Datetime in UTC in the https://www.ietf.org/rfc/rfc3339.txt format, example = "2025-01-22T11:21:33.872Z".
readOnly: true
creator:
$ref: '#/components/schemas/UserBean'
description:
type: string
description: The description.
id:
type: string
description: The object ID.
isEnabled:
type: boolean
description: Indicates whether it is enabled
lastModifiedDate:
type: string
format: date-time
description: The last modified date of the object. Datetime in UTC in the https://www.ietf.org/rfc/rfc3339.txt format, example = "2025-01-22T11:21:33.872Z".
readOnly: true
lastModifiedUser:
$ref: '#/components/schemas/UserBean'
lastStatisticsUpdate:
type: string
format: date-time
description: The date and time when the statistics were last updated.
readOnly: true
lastValueSet:
type: string
format: date-time
description: The date and time when this rollup last set a profile value.
readOnly: true
name:
type: string
description: The object name.
profilesMarkedForRollup:
type: integer
format: int64
description: The number of profiles eligible for this rollup.
readOnly: true
profilesUpdated:
type: integer
format: int64
description: The number of profiles processed by this rollup.
readOnly: true
query:
$ref: '#/components/schemas/QueryBean'
tags:
type: array
description: The tags (i.e. labels).
example: Address
items:
type: string
description: The tags (i.e. labels).
example: Address
UserBean:
type: object
description: BlueConic user.
properties:
fullName:
type: string
description: The full name of the user.
userName:
type: string
description: The username.
readOnly: true
MappingBean:
type: object
description: Mapping configuration for the rollup.
properties:
eventPropertyId:
type: string
description: The timeline event type property that is used in the mapping.
mappingOperator:
type: string
description: The mapping operator.
enum:
- COUNT
- SUM
- MINIMUM
- MAXIMUM
- LAST
- FIRST
- AVERAGE
- ALL_VALUES
profilePropertyId:
type: string
description: The profile property ID to which the rolled up value is written.
sqlSelectColumnName:
type: string
description: Column name in query result to map to profile property. Only relevant for SQL mode.
ConditionBean:
type: object
description: Condition configuration for the rollup.
properties:
conditionOperator:
type: string
description: The condition operator.
enum:
- MINIMUM
- MAXIMUM
- IS_EMPTY
- HAS_A_VALUE
- CONTAINS_ANY
- DOES_NOT_CONTAIN_ANY
- BETWEEN
- BEFORE
- AFTER
- WITHIN_LAST
- SQL_BASED_SLIDING_WINDOW
eventPropertyId:
type: string
description: The timeline event type property ID.
fromDate:
type: string
format: date-time
description: The from date value for the condition.
fromValue:
type: number
format: double
description: The from value for the condition.
toDate:
type: string
format: date-time
description: The to date value for the condition.
toValue:
type: number
format: double
description: The to value for the condition.
values:
type: array
description: The values for the condition.
items:
type: string
description: The values for the condition.
timelineEventRollups:
type: object
properties:
itemsPerPage:
type: integer
format: int32
description: Number of results per page.
readOnly: true
startIndex:
type: integer
format: int32
description: The start index.
readOnly: true
timelineEventRollups:
type: array
items:
$ref: '#/components/schemas/RollupBean'
totalPages:
type: integer
format: int32
description: The total number of pages.
readOnly: true
totalResults:
type: integer
format: int32
description: The total number of results.
readOnly: true
securitySchemes:
oauth2:
type: oauth2
description: 'Authenticates a registered OAuth 2.0 client. The Authorization code flow and Client credentials flow are supported. Make sure to select the correct flow based on which flow the registered client supports. The client id and client secret can be found in BlueConic by opening the registered client under *Settings* > *Access management* > *Applications*.<br/>**NOTE:** When using the Authorization code flow, the redirect URL of the registered client in BlueConic must be set to `https://rest.apidoc.blueconic.com/oauth-receiver.html` and ''Send Proof Key for Code Exchange'' must be enabled.<br/><br/>To use a Bearer token for authentication, follow these steps: <br/>1. Acquire the token through authentication.<br/>2. Include the token in the request''s Authorization header as Bearer \<token\>.<br/>3. Send the request to access protected resources.<br/>4. Handle token expiration by refreshing or obtaining a new token.'
flows:
clientCredentials:
tokenUrl: /rest/v2/oauth/token
authorizationCode:
authorizationUrl: /rest/v2/oauth/authorize
tokenUrl: /rest/v2/oauth/token
refreshUrl: /rest/v2/oauth/token