> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/api-reference/userpoint/userpoint-activity.md).

# Userpoint Activity

Operations related to **UserPoint Activities**, the tracking of user interactions online or offline. Each UserActivity represents a session or interaction containing a collection of UserEvents:

* **Activity types** - Website visits, in-store purchases, call center interactions, campaign engagements
* **Predefined events** - $page\_view, $transaction\_confirmed, $ad\_click, $set\_user\_choice, $app\_open
* **Custom properties** - $items (products), $campaign\_technical\_name, event-specific attributes
* **Processing pipeline** - Event rules, activity analyzers, conversion detection, automation triggers

Activities are ordered chronologically in a user timeline.

Relevant documentation:

* [UserActivity & UserEvent](https://developer.mediarithmics.io/user-points/user-activities)
* [Real-time tracking](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking)

## GET /datamarts/{datamart\_id}/user\_timelines/{public\_user\_identifier}/user\_activities

> Find user activities by PublicUserIdentifiers, old route

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Activity","description":"Operations related to **UserPoint Activities**, the tracking of user interactions online or offline. Each UserActivity represents a session or interaction containing a collection of UserEvents:\n- **Activity types** - Website visits, in-store purchases, call center interactions, campaign engagements\n- **Predefined events** - $page_view, $transaction_confirmed, $ad_click, $set_user_choice, $app_open\n- **Custom properties** - $items (products), $campaign_technical_name, event-specific attributes\n- **Processing pipeline** - Event rules, activity analyzers, conversion detection, automation triggers\n\nActivities are ordered chronologically in a user timeline.\n\nRelevant documentation:\n- [UserActivity & UserEvent](https://developer.mediarithmics.io/user-points/user-activities)\n- [Real-time tracking](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/user_timelines/{public_user_identifier}/user_activities":{"get":{"parameters":[{"explode":false,"in":"path","schema":{"type":"string"},"style":"simple","name":"datamart_id","required":true},{"name":"public_user_identifier","in":"path","style":"simple","required":true,"schema":{"$ref":"#/components/schemas/PublicUserIdentifiers"},"explode":false},{"name":"from","schema":{"type":"string"},"in":"query","required":false,"style":"form","explode":true},{"required":false,"schema":{"type":"string"},"explode":true,"style":"form","in":"query","name":"to"},{"required":false,"style":"form","explode":true,"in":"query","name":"limit","schema":{"type":"integer","format":"int32"}},{"name":"live","schema":{"type":"boolean"},"required":false,"explode":true,"style":"form","in":"query"},{"name":"filters","in":"query","schema":{"type":"string"},"explode":true,"style":"form","required":false},{"schema":{"$ref":"#/components/schemas/UserActivityType"},"name":"type","explode":true,"style":"form","required":false,"in":"query"}],"tags":["Userpoint Activity"],"operationId":"findUserActivitiesLegacy","summary":"Find user activities by PublicUserIdentifiers, old route","description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserActivityTraitResource"}},"max_results":{"type":"integer"},"count":{"type":"integer"},"total":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"first_result":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"PublicUserIdentifiers":{"type":"string","description":"User identifier in one of the following format : - a UUID (a.k.a userpoint id) - user_point_id=xxx where xxx is a UUID - compartment_id=xxx,user_account_id=yyy - user_agent_id=xxx - email_hash=xxx ","pattern":"^([0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}|user_point_id=[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}|compartment_id=\\d+,user_account_id=\\S+|user_account_id=\\S+(,compartment_id=\\d+)?|user_agent_id=\\S+|email_hash=\\S+)$"},"UserActivityType":{"type":"string","enum":["ALL","USER_PLATFORM","TOUCH","SITE_VISIT","APP_VISIT","CTV_VISIT","EMAIL","DISPLAY_AD","STOPWATCH","STAGING_AREA","RECOMMENDER","USER_SCENARIO_START","USER_SCENARIO_STOP","USER_SCENARIO_NODE_ENTER","USER_SCENARIO_NODE_EXIT"],"readOnly":false},"UserActivityTraitResource":{"discriminator":{"propertyName":"$type","mapping":{"USER_SCENARIO_NODE_EXIT":"#/components/schemas/UserScenarioNodeExitActivityResource","USER_SCENARIO_NODE_ENTER":"#/components/schemas/UserScenarioNodeEnterActivityResource","RECOMMENDER":"#/components/schemas/RecommenderActivityResource","CTV_VISIT":"#/components/schemas/CtvVisitUserActivityResource","DISPLAY_AD":"#/components/schemas/DisplayAdActivityResource","TOUCH":"#/components/schemas/TouchUserActivityResource","EMAIL":"#/components/schemas/EmailActivityResource","SITE_VISIT":"#/components/schemas/VisitUserActivityResource","USER_SCENARIO_START":"#/components/schemas/UserScenarioStartActivityResource","APP_VISIT":"#/components/schemas/AppVisitUserActivityResource","USER_SCENARIO_STOP":"#/components/schemas/UserScenarioStopActivityResource"}},"oneOf":[{"$ref":"#/components/schemas/RecommenderActivityResource"},{"$ref":"#/components/schemas/UserScenarioStopActivityResource"},{"$ref":"#/components/schemas/DisplayAdActivityResource"},{"$ref":"#/components/schemas/EmailActivityResource"},{"$ref":"#/components/schemas/UserScenarioStartActivityResource"},{"$ref":"#/components/schemas/AppVisitUserActivityResource"},{"$ref":"#/components/schemas/VisitUserActivityResource"},{"$ref":"#/components/schemas/UserScenarioNodeExitActivityResource"},{"$ref":"#/components/schemas/TouchUserActivityResource"},{"$ref":"#/components/schemas/UserScenarioNodeEnterActivityResource"},{"$ref":"#/components/schemas/CtvVisitUserActivityResource"}],"properties":{"$type":{"type":"string","enum":["RECOMMENDER","USER_SCENARIO_STOP","DISPLAY_AD","EMAIL","USER_SCENARIO_START","APP_VISIT","SITE_VISIT","USER_SCENARIO_NODE_EXIT","TOUCH","USER_SCENARIO_NODE_ENTER","CTV_VISIT"]}},"required":["$type"]},"RecommenderActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserPlatformActivityResource"},{"type":"object"}]},"UserPlatformActivityResource":{"type":"object"},"UserScenarioStopActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"UserActivityResource":{"type":"object"},"DisplayAdActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"EmailActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"UserScenarioStartActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"AppVisitUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/VisitActivityResource"},{"type":"object"}]},"VisitActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"VisitUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/VisitActivityResource"},{"type":"object"}]},"UserScenarioNodeExitActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"TouchUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"UserScenarioNodeEnterActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"CtvVisitUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/VisitActivityResource"},{"type":"object"}]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## DELETE /datamarts/{datamart\_id}/user\_timelines/{public\_user\_identifier}/user\_activities

> Delete user activities by PublicUserIdentifiers, old route

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Activity","description":"Operations related to **UserPoint Activities**, the tracking of user interactions online or offline. Each UserActivity represents a session or interaction containing a collection of UserEvents:\n- **Activity types** - Website visits, in-store purchases, call center interactions, campaign engagements\n- **Predefined events** - $page_view, $transaction_confirmed, $ad_click, $set_user_choice, $app_open\n- **Custom properties** - $items (products), $campaign_technical_name, event-specific attributes\n- **Processing pipeline** - Event rules, activity analyzers, conversion detection, automation triggers\n\nActivities are ordered chronologically in a user timeline.\n\nRelevant documentation:\n- [UserActivity & UserEvent](https://developer.mediarithmics.io/user-points/user-activities)\n- [Real-time tracking](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/user_timelines/{public_user_identifier}/user_activities":{"delete":{"parameters":[{"schema":{"type":"string"},"name":"datamart_id","explode":false,"style":"simple","required":true,"in":"path"},{"required":true,"in":"path","schema":{"$ref":"#/components/schemas/PublicUserIdentifiers"},"name":"public_user_identifier","explode":false,"style":"simple"},{"name":"from","schema":{"type":"string"},"required":false,"in":"query","style":"form","explode":true},{"style":"form","required":false,"schema":{"type":"string"},"explode":true,"in":"query","name":"to"},{"explode":true,"in":"query","required":false,"schema":{"type":"integer","format":"int32"},"style":"form","name":"limit"},{"in":"query","explode":true,"style":"form","required":false,"name":"filters","schema":{"type":"string"}}],"operationId":"deleteUserActivitiesLegacy","summary":"Delete user activities by PublicUserIdentifiers, old route","tags":["Userpoint Activity"],"responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":""}}},"components":{"schemas":{"PublicUserIdentifiers":{"type":"string","description":"User identifier in one of the following format : - a UUID (a.k.a userpoint id) - user_point_id=xxx where xxx is a UUID - compartment_id=xxx,user_account_id=yyy - user_agent_id=xxx - email_hash=xxx ","pattern":"^([0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}|user_point_id=[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}|compartment_id=\\d+,user_account_id=\\S+|user_account_id=\\S+(,compartment_id=\\d+)?|user_agent_id=\\S+|email_hash=\\S+)$"},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /datamarts/{datamart\_id}/user\_timelines/compartment\_id={compartment\_id}/user\_account\_id={user\_account\_id}/user\_activities

> Find user activities by UserAccountIdValue and UserAccountCompartmentId

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Activity","description":"Operations related to **UserPoint Activities**, the tracking of user interactions online or offline. Each UserActivity represents a session or interaction containing a collection of UserEvents:\n- **Activity types** - Website visits, in-store purchases, call center interactions, campaign engagements\n- **Predefined events** - $page_view, $transaction_confirmed, $ad_click, $set_user_choice, $app_open\n- **Custom properties** - $items (products), $campaign_technical_name, event-specific attributes\n- **Processing pipeline** - Event rules, activity analyzers, conversion detection, automation triggers\n\nActivities are ordered chronologically in a user timeline.\n\nRelevant documentation:\n- [UserActivity & UserEvent](https://developer.mediarithmics.io/user-points/user-activities)\n- [Real-time tracking](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/user_timelines/compartment_id={compartment_id}/user_account_id={user_account_id}/user_activities":{"get":{"operationId":"findUserActivitiesWithAccountId","description":"","tags":["Userpoint Activity"],"parameters":[{"required":true,"in":"path","name":"datamart_id","schema":{"type":"string"},"explode":false,"style":"simple"},{"schema":{"type":"string"},"name":"compartment_id","required":true,"style":"simple","in":"path","explode":false},{"explode":false,"style":"simple","schema":{"type":"string"},"required":true,"name":"user_account_id","in":"path"},{"schema":{"type":"string"},"explode":true,"in":"query","style":"form","name":"from","required":false},{"explode":true,"in":"query","required":false,"name":"to","style":"form","schema":{"type":"string"}},{"style":"form","schema":{"type":"integer","format":"int32"},"name":"limit","explode":true,"required":false,"in":"query"},{"in":"query","explode":true,"style":"form","schema":{"type":"boolean"},"required":false,"name":"live"},{"in":"query","explode":true,"style":"form","name":"filters","schema":{"type":"string"},"required":false},{"required":false,"style":"form","explode":true,"in":"query","name":"type","schema":{"$ref":"#/components/schemas/UserActivityType"}}],"summary":"Find user activities by UserAccountIdValue and UserAccountCompartmentId","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"integer"},"max_results":{"type":"integer"},"first_result":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserActivityTraitResource"}},"count":{"type":"integer"},"status":{"type":"string","enum":["ok"]}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"UserActivityType":{"type":"string","enum":["ALL","USER_PLATFORM","TOUCH","SITE_VISIT","APP_VISIT","CTV_VISIT","EMAIL","DISPLAY_AD","STOPWATCH","STAGING_AREA","RECOMMENDER","USER_SCENARIO_START","USER_SCENARIO_STOP","USER_SCENARIO_NODE_ENTER","USER_SCENARIO_NODE_EXIT"],"readOnly":false},"UserActivityTraitResource":{"discriminator":{"propertyName":"$type","mapping":{"USER_SCENARIO_NODE_EXIT":"#/components/schemas/UserScenarioNodeExitActivityResource","USER_SCENARIO_NODE_ENTER":"#/components/schemas/UserScenarioNodeEnterActivityResource","RECOMMENDER":"#/components/schemas/RecommenderActivityResource","CTV_VISIT":"#/components/schemas/CtvVisitUserActivityResource","DISPLAY_AD":"#/components/schemas/DisplayAdActivityResource","TOUCH":"#/components/schemas/TouchUserActivityResource","EMAIL":"#/components/schemas/EmailActivityResource","SITE_VISIT":"#/components/schemas/VisitUserActivityResource","USER_SCENARIO_START":"#/components/schemas/UserScenarioStartActivityResource","APP_VISIT":"#/components/schemas/AppVisitUserActivityResource","USER_SCENARIO_STOP":"#/components/schemas/UserScenarioStopActivityResource"}},"oneOf":[{"$ref":"#/components/schemas/RecommenderActivityResource"},{"$ref":"#/components/schemas/UserScenarioStopActivityResource"},{"$ref":"#/components/schemas/DisplayAdActivityResource"},{"$ref":"#/components/schemas/EmailActivityResource"},{"$ref":"#/components/schemas/UserScenarioStartActivityResource"},{"$ref":"#/components/schemas/AppVisitUserActivityResource"},{"$ref":"#/components/schemas/VisitUserActivityResource"},{"$ref":"#/components/schemas/UserScenarioNodeExitActivityResource"},{"$ref":"#/components/schemas/TouchUserActivityResource"},{"$ref":"#/components/schemas/UserScenarioNodeEnterActivityResource"},{"$ref":"#/components/schemas/CtvVisitUserActivityResource"}],"properties":{"$type":{"type":"string","enum":["RECOMMENDER","USER_SCENARIO_STOP","DISPLAY_AD","EMAIL","USER_SCENARIO_START","APP_VISIT","SITE_VISIT","USER_SCENARIO_NODE_EXIT","TOUCH","USER_SCENARIO_NODE_ENTER","CTV_VISIT"]}},"required":["$type"]},"RecommenderActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserPlatformActivityResource"},{"type":"object"}]},"UserPlatformActivityResource":{"type":"object"},"UserScenarioStopActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"UserActivityResource":{"type":"object"},"DisplayAdActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"EmailActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"UserScenarioStartActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"AppVisitUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/VisitActivityResource"},{"type":"object"}]},"VisitActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"VisitUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/VisitActivityResource"},{"type":"object"}]},"UserScenarioNodeExitActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"TouchUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"UserScenarioNodeEnterActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"CtvVisitUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/VisitActivityResource"},{"type":"object"}]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## DELETE /datamarts/{datamart\_id}/user\_timelines/compartment\_id={compartment\_id}/user\_account\_id={user\_account\_id}/user\_activities

> Delete user activities by UserAccountIdValue and UserAccountCompartmentId

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Activity","description":"Operations related to **UserPoint Activities**, the tracking of user interactions online or offline. Each UserActivity represents a session or interaction containing a collection of UserEvents:\n- **Activity types** - Website visits, in-store purchases, call center interactions, campaign engagements\n- **Predefined events** - $page_view, $transaction_confirmed, $ad_click, $set_user_choice, $app_open\n- **Custom properties** - $items (products), $campaign_technical_name, event-specific attributes\n- **Processing pipeline** - Event rules, activity analyzers, conversion detection, automation triggers\n\nActivities are ordered chronologically in a user timeline.\n\nRelevant documentation:\n- [UserActivity & UserEvent](https://developer.mediarithmics.io/user-points/user-activities)\n- [Real-time tracking](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/user_timelines/compartment_id={compartment_id}/user_account_id={user_account_id}/user_activities":{"delete":{"tags":["Userpoint Activity"],"parameters":[{"explode":false,"required":true,"schema":{"type":"string"},"name":"datamart_id","style":"simple","in":"path"},{"explode":false,"schema":{"type":"string"},"name":"compartment_id","style":"simple","required":true,"in":"path"},{"required":true,"schema":{"type":"string"},"explode":false,"style":"simple","name":"user_account_id","in":"path"},{"name":"from","style":"form","schema":{"type":"string"},"required":false,"explode":true,"in":"query"},{"schema":{"type":"string"},"required":false,"explode":true,"style":"form","in":"query","name":"to"},{"name":"limit","explode":true,"in":"query","schema":{"type":"integer","format":"int32"},"style":"form","required":false},{"style":"form","explode":true,"schema":{"type":"string"},"in":"query","required":false,"name":"filters"}],"responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"deleteUserActivitiesWithAccountId","description":"","summary":"Delete user activities by UserAccountIdValue and UserAccountCompartmentId"}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}}}}
```

## GET /datamarts/{datamart\_id}/user\_points/{public\_user\_identifier}/user\_activities/{user\_activity\_key}

> Find user activity by key

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Activity","description":"Operations related to **UserPoint Activities**, the tracking of user interactions online or offline. Each UserActivity represents a session or interaction containing a collection of UserEvents:\n- **Activity types** - Website visits, in-store purchases, call center interactions, campaign engagements\n- **Predefined events** - $page_view, $transaction_confirmed, $ad_click, $set_user_choice, $app_open\n- **Custom properties** - $items (products), $campaign_technical_name, event-specific attributes\n- **Processing pipeline** - Event rules, activity analyzers, conversion detection, automation triggers\n\nActivities are ordered chronologically in a user timeline.\n\nRelevant documentation:\n- [UserActivity & UserEvent](https://developer.mediarithmics.io/user-points/user-activities)\n- [Real-time tracking](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/user_points/{public_user_identifier}/user_activities/{user_activity_key}":{"get":{"operationId":"findUserActivity","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/UserActivityTraitResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"summary":"Find user activity by key","description":"","parameters":[{"schema":{"type":"string"},"style":"simple","required":true,"in":"path","name":"datamart_id","explode":false},{"required":true,"style":"simple","in":"path","explode":false,"name":"public_user_identifier","schema":{"$ref":"#/components/schemas/PublicUserIdentifiers"}},{"required":true,"name":"user_activity_key","in":"path","style":"simple","schema":{"type":"string"},"explode":false}],"tags":["Userpoint Activity"]}}},"components":{"schemas":{"UserActivityTraitResource":{"discriminator":{"propertyName":"$type","mapping":{"USER_SCENARIO_NODE_EXIT":"#/components/schemas/UserScenarioNodeExitActivityResource","USER_SCENARIO_NODE_ENTER":"#/components/schemas/UserScenarioNodeEnterActivityResource","RECOMMENDER":"#/components/schemas/RecommenderActivityResource","CTV_VISIT":"#/components/schemas/CtvVisitUserActivityResource","DISPLAY_AD":"#/components/schemas/DisplayAdActivityResource","TOUCH":"#/components/schemas/TouchUserActivityResource","EMAIL":"#/components/schemas/EmailActivityResource","SITE_VISIT":"#/components/schemas/VisitUserActivityResource","USER_SCENARIO_START":"#/components/schemas/UserScenarioStartActivityResource","APP_VISIT":"#/components/schemas/AppVisitUserActivityResource","USER_SCENARIO_STOP":"#/components/schemas/UserScenarioStopActivityResource"}},"oneOf":[{"$ref":"#/components/schemas/RecommenderActivityResource"},{"$ref":"#/components/schemas/UserScenarioStopActivityResource"},{"$ref":"#/components/schemas/DisplayAdActivityResource"},{"$ref":"#/components/schemas/EmailActivityResource"},{"$ref":"#/components/schemas/UserScenarioStartActivityResource"},{"$ref":"#/components/schemas/AppVisitUserActivityResource"},{"$ref":"#/components/schemas/VisitUserActivityResource"},{"$ref":"#/components/schemas/UserScenarioNodeExitActivityResource"},{"$ref":"#/components/schemas/TouchUserActivityResource"},{"$ref":"#/components/schemas/UserScenarioNodeEnterActivityResource"},{"$ref":"#/components/schemas/CtvVisitUserActivityResource"}],"properties":{"$type":{"type":"string","enum":["RECOMMENDER","USER_SCENARIO_STOP","DISPLAY_AD","EMAIL","USER_SCENARIO_START","APP_VISIT","SITE_VISIT","USER_SCENARIO_NODE_EXIT","TOUCH","USER_SCENARIO_NODE_ENTER","CTV_VISIT"]}},"required":["$type"]},"RecommenderActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserPlatformActivityResource"},{"type":"object"}]},"UserPlatformActivityResource":{"type":"object"},"UserScenarioStopActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"UserActivityResource":{"type":"object"},"DisplayAdActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"EmailActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"UserScenarioStartActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"AppVisitUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/VisitActivityResource"},{"type":"object"}]},"VisitActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"VisitUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/VisitActivityResource"},{"type":"object"}]},"UserScenarioNodeExitActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"TouchUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"UserScenarioNodeEnterActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"CtvVisitUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/VisitActivityResource"},{"type":"object"}]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]},"PublicUserIdentifiers":{"type":"string","description":"User identifier in one of the following format : - a UUID (a.k.a userpoint id) - user_point_id=xxx where xxx is a UUID - compartment_id=xxx,user_account_id=yyy - user_agent_id=xxx - email_hash=xxx ","pattern":"^([0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}|user_point_id=[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}|compartment_id=\\d+,user_account_id=\\S+|user_account_id=\\S+(,compartment_id=\\d+)?|user_agent_id=\\S+|email_hash=\\S+)$"}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /datamarts/{datamart\_id}/user\_points/{public\_user\_identifier}/user\_activities

> Find user activities by PublicUserIdentifiers

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Mediarithmics most used API","description":"These operations where flagged by mediarithmics teams as most useful."},{"name":"Userpoint Activity","description":"Operations related to **UserPoint Activities**, the tracking of user interactions online or offline. Each UserActivity represents a session or interaction containing a collection of UserEvents:\n- **Activity types** - Website visits, in-store purchases, call center interactions, campaign engagements\n- **Predefined events** - $page_view, $transaction_confirmed, $ad_click, $set_user_choice, $app_open\n- **Custom properties** - $items (products), $campaign_technical_name, event-specific attributes\n- **Processing pipeline** - Event rules, activity analyzers, conversion detection, automation triggers\n\nActivities are ordered chronologically in a user timeline.\n\nRelevant documentation:\n- [UserActivity & UserEvent](https://developer.mediarithmics.io/user-points/user-activities)\n- [Real-time tracking](https://developer.mediarithmics.io/data-ingestion/real-time-user-tracking)\n"}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/datamarts/{datamart_id}/user_points/{public_user_identifier}/user_activities":{"get":{"tags":["Userpoint Activity","Mediarithmics most used API"],"operationId":"findUserActivities","parameters":[{"name":"datamart_id","explode":false,"style":"simple","schema":{"type":"string"},"in":"path","required":true},{"explode":false,"in":"path","style":"simple","required":true,"name":"public_user_identifier","schema":{"$ref":"#/components/schemas/PublicUserIdentifiers"}},{"schema":{"type":"string"},"in":"query","required":false,"explode":true,"style":"form","name":"from"},{"schema":{"type":"string"},"required":false,"in":"query","style":"form","name":"to","explode":true},{"required":false,"in":"query","name":"limit","explode":true,"style":"form","schema":{"type":"integer","format":"int32"}},{"explode":true,"in":"query","schema":{"type":"boolean"},"style":"form","required":false,"name":"live"},{"in":"query","schema":{"type":"string"},"name":"filters","required":false,"style":"form","explode":true},{"style":"form","name":"type","required":false,"schema":{"$ref":"#/components/schemas/UserActivityType"},"in":"query","explode":true}],"description":"","summary":"Find user activities by PublicUserIdentifiers","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserActivityTraitResource"}},"status":{"type":"string","enum":["ok"]},"total":{"type":"integer"},"max_results":{"type":"integer"},"count":{"type":"integer"},"first_result":{"type":"integer"}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}}}}},"components":{"schemas":{"PublicUserIdentifiers":{"type":"string","description":"User identifier in one of the following format : - a UUID (a.k.a userpoint id) - user_point_id=xxx where xxx is a UUID - compartment_id=xxx,user_account_id=yyy - user_agent_id=xxx - email_hash=xxx ","pattern":"^([0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}|user_point_id=[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}|compartment_id=\\d+,user_account_id=\\S+|user_account_id=\\S+(,compartment_id=\\d+)?|user_agent_id=\\S+|email_hash=\\S+)$"},"UserActivityType":{"type":"string","enum":["ALL","USER_PLATFORM","TOUCH","SITE_VISIT","APP_VISIT","CTV_VISIT","EMAIL","DISPLAY_AD","STOPWATCH","STAGING_AREA","RECOMMENDER","USER_SCENARIO_START","USER_SCENARIO_STOP","USER_SCENARIO_NODE_ENTER","USER_SCENARIO_NODE_EXIT"],"readOnly":false},"UserActivityTraitResource":{"discriminator":{"propertyName":"$type","mapping":{"USER_SCENARIO_NODE_EXIT":"#/components/schemas/UserScenarioNodeExitActivityResource","USER_SCENARIO_NODE_ENTER":"#/components/schemas/UserScenarioNodeEnterActivityResource","RECOMMENDER":"#/components/schemas/RecommenderActivityResource","CTV_VISIT":"#/components/schemas/CtvVisitUserActivityResource","DISPLAY_AD":"#/components/schemas/DisplayAdActivityResource","TOUCH":"#/components/schemas/TouchUserActivityResource","EMAIL":"#/components/schemas/EmailActivityResource","SITE_VISIT":"#/components/schemas/VisitUserActivityResource","USER_SCENARIO_START":"#/components/schemas/UserScenarioStartActivityResource","APP_VISIT":"#/components/schemas/AppVisitUserActivityResource","USER_SCENARIO_STOP":"#/components/schemas/UserScenarioStopActivityResource"}},"oneOf":[{"$ref":"#/components/schemas/RecommenderActivityResource"},{"$ref":"#/components/schemas/UserScenarioStopActivityResource"},{"$ref":"#/components/schemas/DisplayAdActivityResource"},{"$ref":"#/components/schemas/EmailActivityResource"},{"$ref":"#/components/schemas/UserScenarioStartActivityResource"},{"$ref":"#/components/schemas/AppVisitUserActivityResource"},{"$ref":"#/components/schemas/VisitUserActivityResource"},{"$ref":"#/components/schemas/UserScenarioNodeExitActivityResource"},{"$ref":"#/components/schemas/TouchUserActivityResource"},{"$ref":"#/components/schemas/UserScenarioNodeEnterActivityResource"},{"$ref":"#/components/schemas/CtvVisitUserActivityResource"}],"properties":{"$type":{"type":"string","enum":["RECOMMENDER","USER_SCENARIO_STOP","DISPLAY_AD","EMAIL","USER_SCENARIO_START","APP_VISIT","SITE_VISIT","USER_SCENARIO_NODE_EXIT","TOUCH","USER_SCENARIO_NODE_ENTER","CTV_VISIT"]}},"required":["$type"]},"RecommenderActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserPlatformActivityResource"},{"type":"object"}]},"UserPlatformActivityResource":{"type":"object"},"UserScenarioStopActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"UserActivityResource":{"type":"object"},"DisplayAdActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"EmailActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"UserScenarioStartActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"AppVisitUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/VisitActivityResource"},{"type":"object"}]},"VisitActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"VisitUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/VisitActivityResource"},{"type":"object"}]},"UserScenarioNodeExitActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"TouchUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"UserScenarioNodeEnterActivityResource":{"allOf":[{"$ref":"#/components/schemas/UserActivityResource"},{"type":"object"}]},"CtvVisitUserActivityResource":{"allOf":[{"$ref":"#/components/schemas/VisitActivityResource"},{"type":"object"}]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/api-reference/userpoint/userpoint-activity.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
