> 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-scenario.md).

# Userpoint Scenario

Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario\_id, execution\_id, node\_id, timestamps (start\_ts, node\_start\_ts, callback\_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.

Relevant documentation:

* [Automations](https://developer.mediarithmics.io/advanced-usages/automations)
* [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)

## GET /datamarts/{datamart\_id}/user\_points/{user\_identifier}/user\_scenarios/scenario\_id={scenario\_id}/change\_logs

> Find user scenario change logs by user point id and scenario id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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/{user_identifier}/user_scenarios/scenario_id={scenario_id}/change_logs":{"get":{"operationId":"findUserScenarioChangeLogsByUserIdentifierAndScenarioId","tags":["Userpoint Scenario"],"parameters":[{"in":"path","explode":false,"style":"simple","schema":{"type":"integer","format":"int64"},"required":true,"name":"datamart_id"},{"name":"user_identifier","required":true,"schema":{"$ref":"#/components/schemas/PublicUserIdentifiers"},"style":"simple","in":"path","explode":false},{"explode":false,"style":"simple","name":"scenario_id","required":true,"schema":{"type":"string"},"in":"path"}],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserScenarioChangeLogResource"}},"count":{"type":"integer"},"max_results":{"type":"integer"},"total":{"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"}},"summary":"Find user scenario change logs by user point id and scenario id","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+)$"},"UserScenarioChangeLogResource":{"type":"object","properties":{"user_point_id":{"type":"string","format":"uuid","readOnly":true},"node_id":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":false},"execution_id":{"type":"string","format":"uuid","readOnly":true},"matched_exit_condition_id":{"type":"string","readOnly":true},"scenario_id":{"type":"string","readOnly":true},"active":{"type":"boolean","default":false,"readOnly":true},"node_start_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["active","datamart_id","execution_id","node_id","node_start_ts","scenario_id","user_point_id"]},"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"}}}}}}}
```

## GET /datamarts/{datamart\_id}/user\_points/compartment\_id={compartment\_id}/user\_account\_id={user\_account\_id}/user\_scenarios

> Find user scenarios by compartment id and user account id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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/compartment_id={compartment_id}/user_account_id={user_account_id}/user_scenarios":{"get":{"operationId":"findUserScenariosByUserAccountId","description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"first_result":{"type":"integer"},"total":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserScenarioResource"}},"status":{"type":"string","enum":["ok"]},"max_results":{"type":"integer"},"count":{"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"}},"parameters":[{"name":"datamart_id","style":"simple","required":true,"schema":{"type":"integer","format":"int64"},"in":"path","explode":false},{"required":true,"name":"compartment_id","in":"path","explode":false,"style":"simple","schema":{"type":"string"}},{"schema":{"type":"string"},"name":"user_account_id","in":"path","explode":false,"required":true,"style":"simple"}],"tags":["Userpoint Scenario"],"summary":"Find user scenarios by compartment id and user account id"}}},"components":{"schemas":{"UserScenarioResource":{"type":"object","properties":{"start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"execution_id":{"type":"string","format":"uuid","readOnly":false},"callback_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"node_start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"scenario_id":{"type":"string","readOnly":false},"user_point_id":{"type":"string","format":"uuid","readOnly":true},"node_id":{"type":"string","readOnly":false},"matched_exit_condition_id":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"active":{"type":"boolean","default":false,"readOnly":false}},"required":["active","datamart_id","execution_id","node_id","scenario_id","user_point_id"]},"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"}}}}}}}
```

## POST /datamarts/{datamart\_id}/user\_points/compartment\_id={compartment\_id}/user\_account\_id={user\_account\_id}/user\_scenarios/scenario\_id={scenario\_id}/scenario\_exits/exit\_condition\_id={exit\_condition\_id}

> create user scenario exit by user account id and scenario id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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/compartment_id={compartment_id}/user_account_id={user_account_id}/user_scenarios/scenario_id={scenario_id}/scenario_exits/exit_condition_id={exit_condition_id}":{"post":{"tags":["Userpoint Scenario"],"description":"","operationId":"createUserScenarioExitByUserAccountId","parameters":[{"required":true,"style":"simple","schema":{"type":"integer","format":"int64"},"in":"path","explode":false,"name":"datamart_id"},{"style":"simple","in":"path","name":"compartment_id","required":true,"schema":{"type":"string"},"explode":false},{"style":"simple","schema":{"type":"string"},"name":"scenario_id","explode":false,"in":"path","required":true},{"in":"path","name":"exit_condition_id","schema":{"type":"string"},"required":true,"style":"simple","explode":false},{"in":"path","schema":{"type":"string"},"name":"user_account_id","style":"simple","required":true,"explode":false}],"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"}},"summary":"create user scenario exit by user account id and scenario id"}}},"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/compartment\_id={compartment\_id}/user\_account\_id={user\_account\_id}/user\_scenarios/scenario\_id={scenario\_id}/change\_logs

> Find user scenario change logs by compartment id, user account id and scenario id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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/compartment_id={compartment_id}/user_account_id={user_account_id}/user_scenarios/scenario_id={scenario_id}/change_logs":{"get":{"parameters":[{"required":true,"style":"simple","in":"path","name":"datamart_id","explode":false,"schema":{"type":"integer","format":"int64"}},{"explode":false,"schema":{"type":"string"},"name":"compartment_id","in":"path","style":"simple","required":true},{"style":"simple","in":"path","schema":{"type":"string"},"name":"scenario_id","explode":false,"required":true},{"name":"user_account_id","required":true,"explode":false,"schema":{"type":"string"},"style":"simple","in":"path"}],"summary":"Find user scenario change logs by compartment id, user account id and scenario id","operationId":"findUserScenarioChangeLogsByUserAccountIdAndScenarioId","description":"","tags":["Userpoint Scenario"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"count":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserScenarioChangeLogResource"}},"max_results":{"type":"integer"},"first_result":{"type":"integer"},"total":{"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":{"UserScenarioChangeLogResource":{"type":"object","properties":{"user_point_id":{"type":"string","format":"uuid","readOnly":true},"node_id":{"type":"string","readOnly":true},"datamart_id":{"type":"string","readOnly":false},"execution_id":{"type":"string","format":"uuid","readOnly":true},"matched_exit_condition_id":{"type":"string","readOnly":true},"scenario_id":{"type":"string","readOnly":true},"active":{"type":"boolean","default":false,"readOnly":true},"node_start_ts":{"type":"integer","format":"int64","default":0,"readOnly":true}},"required":["active","datamart_id","execution_id","node_id","node_start_ts","scenario_id","user_point_id"]},"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"}}}}}}}
```

## POST /datamarts/{datamart\_id}/user\_scenario\_analytics

> Fetch users scenario analytics

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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_scenario_analytics":{"post":{"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/ReportView"}},"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"}},"requestBody":{"description":"The object of the request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRequestBody"}}},"required":true},"tags":["Userpoint Scenario"],"summary":"Fetch users scenario analytics","description":"","parameters":[{"schema":{"type":"string"},"explode":false,"style":"simple","in":"path","required":true,"name":"datamart_id"}],"operationId":"getUsersScenarioAnalytics"}}},"components":{"schemas":{"ReportView":{"type":"object","properties":{"items_per_page":{"type":"integer","format":"int32","default":0,"readOnly":false},"total_items":{"type":"integer","format":"int32","default":0,"readOnly":false},"columns_headers":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"rows":{"type":"array","items":{"type":"array","items":{"$ref":"#/components/schemas/Any"},"readOnly":false},"readOnly":false}},"required":["columns_headers","items_per_page","rows","total_items"]},"Any":{"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"]},"ReportRequestBody":{"type":"object","properties":{"dimensions":{"type":"array","items":{"$ref":"#/components/schemas/Dimension"},"readOnly":false},"sample_factor":{"type":"integer","format":"int32","default":0,"readOnly":false},"metrics":{"type":"array","items":{"$ref":"#/components/schemas/Metric"},"readOnly":false},"dimension_filter_clauses":{"type":"object","properties":{"operator":{"$ref":"#/components/schemas/BooleanOperator"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/DimensionFilter"},"readOnly":false}},"readOnly":false,"required":["filters","operator"]},"order_by":{"$ref":"#/components/schemas/OrderBy"},"max_result":{"type":"integer","format":"int32","default":0,"readOnly":false},"metric_filter_clauses":{"type":"object","properties":{"operator":{"$ref":"#/components/schemas/BooleanOperator"},"filters":{"type":"array","items":{"$ref":"#/components/schemas/MetricFilter"},"readOnly":false}},"readOnly":false,"required":["filters","operator"]},"first_result":{"type":"integer","format":"int32","default":0,"readOnly":false},"date_ranges":{"type":"array","items":{"$ref":"#/components/schemas/DateRange"},"readOnly":false}},"required":["date_ranges","dimensions","metrics"]},"Dimension":{"type":"object","properties":{"name":{"type":"string","readOnly":false}},"required":["name"]},"Metric":{"type":"object","properties":{"expression":{"type":"string","readOnly":false},"alias":{"type":"string","readOnly":false},"formatting_type":{"$ref":"#/components/schemas/FormattingType"}},"required":["expression"]},"FormattingType":{"type":"string","enum":["INTEGER","FLOAT","TIME","PERCENT"],"readOnly":false},"BooleanOperator":{"type":"string","enum":["OR","AND"],"readOnly":false},"DimensionFilter":{"allOf":[{"$ref":"#/components/schemas/Filter"},{"type":"object","properties":{"dimension_name":{"type":"string","readOnly":false},"case_sensitive":{"type":"boolean","default":false,"readOnly":false},"expressions":{"type":"array","items":{"type":"string","readOnly":false},"readOnly":false},"operator":{"$ref":"#/components/schemas/DimensionFilterOperator"},"not":{"type":"boolean","default":false,"readOnly":false}},"required":["dimension_name","expressions","operator"]}]},"Filter":{"type":"object"},"DimensionFilterOperator":{"type":"string","enum":["EXACT","NUMERIC_EQUAL","NUMERIC_GREATER_THAN","NUMERIC_LESS_THAN","IN_LIST","IS_NULL","LIKE"],"readOnly":false},"OrderBy":{"type":"object","properties":{"field_name":{"type":"string","readOnly":false},"sort_order":{"$ref":"#/components/schemas/SortBy"}},"required":["field_name"]},"SortBy":{"type":"string","enum":["ASCENDING","DESCENDING"],"readOnly":false},"MetricFilter":{"allOf":[{"$ref":"#/components/schemas/Filter"},{"type":"object","properties":{"metric_name":{"type":"string","readOnly":false},"not":{"type":"boolean","default":false,"readOnly":false},"operator":{"$ref":"#/components/schemas/MetricFilterOperator"},"comparison_value":{"type":"string","readOnly":false}},"required":["comparison_value","metric_name","operator"]}]},"MetricFilterOperator":{"type":"string","enum":["EQUAL","GREATER_THAN","LESS_THAN"],"readOnly":false},"DateRange":{"type":"object","properties":{"start_date":{"type":"string","readOnly":false},"end_date":{"type":"string","readOnly":false},"timezone":{"type":"string","readOnly":false}},"required":["end_date","start_date"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /datamarts/{datamart\_id}/user\_points/{user\_identifier}/user\_scenarios/scenario\_id={scenario\_id}/scenario\_exits/exit\_condition\_id={exit\_condition\_id}

> create user scenario exit by user point id and scenario id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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/{user_identifier}/user_scenarios/scenario_id={scenario_id}/scenario_exits/exit_condition_id={exit_condition_id}":{"post":{"description":"","tags":["Userpoint Scenario"],"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"}},"summary":"create user scenario exit by user point id and scenario id","parameters":[{"schema":{"type":"integer","format":"int64"},"in":"path","explode":false,"name":"datamart_id","style":"simple","required":true},{"required":true,"style":"simple","name":"user_identifier","in":"path","schema":{"$ref":"#/components/schemas/PublicUserIdentifiers"},"explode":false},{"name":"scenario_id","required":true,"schema":{"type":"string"},"style":"simple","in":"path","explode":false},{"name":"exit_condition_id","in":"path","schema":{"type":"string"},"required":true,"style":"simple","explode":false}],"operationId":"createUserScenarioExitByUserIdentifier"}}},"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"]},"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+)$"}}}}
```

## GET /datamarts/{datamart\_id}/user\_points/{user\_identifier}/user\_scenarios/scenario\_id={scenario\_id}/execution\_id={execution\_id}

> Find user scenarios by user point id scenario id and execution id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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/{user_identifier}/user_scenarios/scenario_id={scenario_id}/execution_id={execution_id}":{"get":{"description":"","parameters":[{"style":"simple","name":"datamart_id","required":true,"schema":{"type":"integer","format":"int64"},"in":"path","explode":false},{"style":"simple","required":true,"explode":false,"schema":{"$ref":"#/components/schemas/PublicUserIdentifiers"},"name":"user_identifier","in":"path"},{"name":"scenario_id","schema":{"type":"string"},"in":"path","required":true,"explode":false,"style":"simple"},{"explode":false,"style":"simple","name":"execution_id","schema":{"type":"string"},"in":"path","required":true}],"operationId":"findUserScenarioByUserIdentifierScenarioIdAndExecutionId","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/UserScenarioResource"}},"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"}},"tags":["Userpoint Scenario"],"summary":"Find user scenarios by user point id scenario id and execution id"}}},"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+)$"},"UserScenarioResource":{"type":"object","properties":{"start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"execution_id":{"type":"string","format":"uuid","readOnly":false},"callback_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"node_start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"scenario_id":{"type":"string","readOnly":false},"user_point_id":{"type":"string","format":"uuid","readOnly":true},"node_id":{"type":"string","readOnly":false},"matched_exit_condition_id":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"active":{"type":"boolean","default":false,"readOnly":false}},"required":["active","datamart_id","execution_id","node_id","scenario_id","user_point_id"]},"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"}}}}}}}
```

## GET /datamarts/{datamart\_id}/user\_points/compartment\_id={compartment\_id}/user\_account\_id={user\_account\_id}/user\_scenarios/scenario\_id={scenario\_id}/execution\_id={execution\_id}

> Find user scenario by compartment id user account id scenario id and execution id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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/compartment_id={compartment_id}/user_account_id={user_account_id}/user_scenarios/scenario_id={scenario_id}/execution_id={execution_id}":{"get":{"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/UserScenarioResource"}},"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"}},"description":"","summary":"Find user scenario by compartment id user account id scenario id and execution id","operationId":"findUserScenarioByUserAccountIdScenarioIdAndExecutionId","parameters":[{"in":"path","name":"datamart_id","required":true,"explode":false,"style":"simple","schema":{"type":"integer","format":"int64"}},{"style":"simple","required":true,"schema":{"type":"string"},"explode":false,"name":"compartment_id","in":"path"},{"style":"simple","explode":false,"name":"scenario_id","schema":{"type":"string"},"in":"path","required":true},{"style":"simple","schema":{"type":"string"},"name":"user_account_id","in":"path","required":true,"explode":false},{"required":true,"schema":{"type":"string"},"name":"execution_id","style":"simple","explode":false,"in":"path"}],"tags":["Userpoint Scenario"]}}},"components":{"schemas":{"UserScenarioResource":{"type":"object","properties":{"start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"execution_id":{"type":"string","format":"uuid","readOnly":false},"callback_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"node_start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"scenario_id":{"type":"string","readOnly":false},"user_point_id":{"type":"string","format":"uuid","readOnly":true},"node_id":{"type":"string","readOnly":false},"matched_exit_condition_id":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"active":{"type":"boolean","default":false,"readOnly":false}},"required":["active","datamart_id","execution_id","node_id","scenario_id","user_point_id"]},"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"}}}}}}}
```

## GET /datamarts/{datamart\_id}/user\_points/{user\_identifier}/user\_scenarios/scenario\_id={scenario\_id}

> Find user scenarios by user identifier and scenario id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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/{user_identifier}/user_scenarios/scenario_id={scenario_id}":{"get":{"operationId":"findUserScenariosByUserIdentifierAndScenarioId","parameters":[{"name":"datamart_id","style":"simple","schema":{"type":"integer","format":"int64"},"explode":false,"in":"path","required":true},{"name":"user_identifier","explode":false,"style":"simple","required":true,"schema":{"$ref":"#/components/schemas/PublicUserIdentifiers"},"in":"path"},{"explode":false,"in":"path","style":"simple","schema":{"type":"string"},"required":true,"name":"scenario_id"}],"tags":["Userpoint Scenario"],"summary":"Find user scenarios by user identifier and scenario id","description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"first_result":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserScenarioResource"}},"status":{"type":"string","enum":["ok"]},"max_results":{"type":"integer"},"count":{"type":"integer"},"total":{"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+)$"},"UserScenarioResource":{"type":"object","properties":{"start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"execution_id":{"type":"string","format":"uuid","readOnly":false},"callback_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"node_start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"scenario_id":{"type":"string","readOnly":false},"user_point_id":{"type":"string","format":"uuid","readOnly":true},"node_id":{"type":"string","readOnly":false},"matched_exit_condition_id":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"active":{"type":"boolean","default":false,"readOnly":false}},"required":["active","datamart_id","execution_id","node_id","scenario_id","user_point_id"]},"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"}}}}}}}
```

## PUT /datamarts/{datamart\_id}/user\_points/{user\_identifier}/user\_scenarios/scenario\_id={scenario\_id}

> Upsert user scenario by user point id and scenario id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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/{user_identifier}/user_scenarios/scenario_id={scenario_id}":{"put":{"operationId":"upsertUserScenarioByUserIdentifier","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/UserScenarioResource"}},"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":"Upsert user scenario by user point id and scenario id","parameters":[{"schema":{"type":"integer","format":"int64"},"name":"datamart_id","explode":false,"style":"simple","required":true,"in":"path"},{"name":"user_identifier","required":true,"explode":false,"schema":{"$ref":"#/components/schemas/PublicUserIdentifiers"},"in":"path","style":"simple"},{"in":"path","style":"simple","required":true,"name":"scenario_id","schema":{"type":"string"},"explode":false}],"description":"","requestBody":{"description":"The new value of the user scenario","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserScenarioResource"}}},"required":true},"tags":["Userpoint Scenario"]}}},"components":{"schemas":{"UserScenarioResource":{"type":"object","properties":{"start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"execution_id":{"type":"string","format":"uuid","readOnly":false},"callback_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"node_start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"scenario_id":{"type":"string","readOnly":false},"user_point_id":{"type":"string","format":"uuid","readOnly":true},"node_id":{"type":"string","readOnly":false},"matched_exit_condition_id":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"active":{"type":"boolean","default":false,"readOnly":false}},"required":["active","datamart_id","execution_id","node_id","scenario_id","user_point_id"]},"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"}}}}}}}
```

## DELETE /datamarts/{datamart\_id}/user\_points/{user\_identifier}/user\_scenarios/scenario\_id={scenario\_id}

> Delete user scenario by user point id and scenario id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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/{user_identifier}/user_scenarios/scenario_id={scenario_id}":{"delete":{"operationId":"deleteUserScenarioByUserIdentifierAndScenarioId","tags":["Userpoint Scenario"],"description":"","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"}},"parameters":[{"required":true,"in":"path","explode":false,"schema":{"type":"integer","format":"int64"},"name":"datamart_id","style":"simple"},{"explode":false,"required":true,"schema":{"$ref":"#/components/schemas/PublicUserIdentifiers"},"name":"user_identifier","style":"simple","in":"path"},{"explode":false,"style":"simple","schema":{"type":"string"},"in":"path","required":true,"name":"scenario_id"}],"summary":"Delete user scenario by user point id and scenario id"}}},"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"]},"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+)$"}}}}
```

## GET /datamarts/{datamart\_id}/user\_points/{user\_identifier}/user\_scenarios

> Find user scenarios by user point id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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/{user_identifier}/user_scenarios":{"get":{"parameters":[{"explode":false,"name":"datamart_id","style":"simple","in":"path","required":true,"schema":{"type":"integer","format":"int64"}},{"in":"path","schema":{"$ref":"#/components/schemas/PublicUserIdentifiers"},"required":true,"name":"user_identifier","explode":false,"style":"simple"}],"description":"","operationId":"findUserScenariosByUserPointId","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer"},"max_results":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserScenarioResource"}},"status":{"type":"string","enum":["ok"]},"first_result":{"type":"integer"},"total":{"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"}},"summary":"Find user scenarios by user point id","tags":["Userpoint Scenario"]}}},"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+)$"},"UserScenarioResource":{"type":"object","properties":{"start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"execution_id":{"type":"string","format":"uuid","readOnly":false},"callback_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"node_start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"scenario_id":{"type":"string","readOnly":false},"user_point_id":{"type":"string","format":"uuid","readOnly":true},"node_id":{"type":"string","readOnly":false},"matched_exit_condition_id":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"active":{"type":"boolean","default":false,"readOnly":false}},"required":["active","datamart_id","execution_id","node_id","scenario_id","user_point_id"]},"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"}}}}}}}
```

## GET /datamarts/{datamart\_id}/user\_points/compartment\_id={compartment\_id}/user\_account\_id={user\_account\_id}/user\_scenarios/scenario\_id={scenario\_id}

> Find user scenarios by compartment id user account id and scenario id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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/compartment_id={compartment_id}/user_account_id={user_account_id}/user_scenarios/scenario_id={scenario_id}":{"get":{"summary":"Find user scenarios by compartment id user account id and scenario id","tags":["Userpoint Scenario"],"operationId":"findUserScenariosByUserAccountIdAndScenarioId","description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"max_results":{"type":"integer"},"first_result":{"type":"integer"},"count":{"type":"integer"},"total":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/UserScenarioResource"}}},"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"}},"parameters":[{"style":"simple","in":"path","required":true,"schema":{"type":"integer","format":"int64"},"explode":false,"name":"datamart_id"},{"name":"compartment_id","in":"path","explode":false,"schema":{"type":"string"},"style":"simple","required":true},{"name":"scenario_id","explode":false,"in":"path","style":"simple","schema":{"type":"string"},"required":true},{"explode":false,"required":true,"style":"simple","in":"path","name":"user_account_id","schema":{"type":"string"}}]}}},"components":{"schemas":{"UserScenarioResource":{"type":"object","properties":{"start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"execution_id":{"type":"string","format":"uuid","readOnly":false},"callback_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"node_start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"scenario_id":{"type":"string","readOnly":false},"user_point_id":{"type":"string","format":"uuid","readOnly":true},"node_id":{"type":"string","readOnly":false},"matched_exit_condition_id":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"active":{"type":"boolean","default":false,"readOnly":false}},"required":["active","datamart_id","execution_id","node_id","scenario_id","user_point_id"]},"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"}}}}}}}
```

## PUT /datamarts/{datamart\_id}/user\_points/compartment\_id={compartment\_id}/user\_account\_id={user\_account\_id}/user\_scenarios/scenario\_id={scenario\_id}

> Upsert user scenario by compartment id user account id and scenario id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Userpoint Scenario","description":"Operations related to **UserPoint Scenarios**, the tracking of user progress through automations (marketing workflows). Scenarios are composed of nodes linked by edges, enabling automated user journeys triggered by events or segment entries. Each UserScenario tracks execution state including scenario_id, execution_id, node_id, timestamps (start_ts, node_start_ts, callback_ts), and active status as users progress through nodes like wait periods, email sends, segment additions, or custom actions.\n\nRelevant documentation:\n- [Automations](https://developer.mediarithmics.io/advanced-usages/automations)\n- [User scenarios guide](https://userguides.mediarithmics.io/activation/automations)\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/compartment_id={compartment_id}/user_account_id={user_account_id}/user_scenarios/scenario_id={scenario_id}":{"put":{"operationId":"upsertUserScenarioByUserAccountId","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/UserScenarioResource"}},"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"}},"parameters":[{"in":"path","name":"datamart_id","explode":false,"schema":{"type":"integer","format":"int64"},"style":"simple","required":true},{"name":"compartment_id","required":true,"style":"simple","in":"path","explode":false,"schema":{"type":"string"}},{"in":"path","name":"scenario_id","schema":{"type":"string"},"explode":false,"required":true,"style":"simple"},{"in":"path","name":"user_account_id","explode":false,"style":"simple","schema":{"type":"string"},"required":true}],"description":"","summary":"Upsert user scenario by compartment id user account id and scenario id","requestBody":{"description":"The new value of the user scenario","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserScenarioResource"}}},"required":true},"tags":["Userpoint Scenario"]}}},"components":{"schemas":{"UserScenarioResource":{"type":"object","properties":{"start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"execution_id":{"type":"string","format":"uuid","readOnly":false},"callback_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"node_start_ts":{"type":"integer","format":"int64","default":0,"readOnly":false},"scenario_id":{"type":"string","readOnly":false},"user_point_id":{"type":"string","format":"uuid","readOnly":true},"node_id":{"type":"string","readOnly":false},"matched_exit_condition_id":{"type":"string","readOnly":false},"datamart_id":{"type":"string","readOnly":true},"active":{"type":"boolean","default":false,"readOnly":false}},"required":["active","datamart_id","execution_id","node_id","scenario_id","user_point_id"]},"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-scenario.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.
