---
title: "Add Mablscript selector override"
method: POST
path: "/tests/testScripts/{journey_id}/overrides"
tags: ["MablscriptOverride"]
---

# Add Mablscript selector override

`POST /tests/testScripts/{journey_id}/overrides`

Used to add a selector override to an existing mablscript operation

## Path parameters

- `journey_id` string, required

## Request body

- SelectorOverrideUpdate — Used to pass properties required to add a new selector override
  - `selector_variant_id` string
  - `selector_id` string, required
  - `environment_id` string, required
  - `journey_run_id` string
  - `step_id_in_journey` string
  - `step_run_id` string
  - `selector` object, required — Map of string => object
  - `accepted` boolean, required — True if the user accepted the override; false if the override was rejected
  - `override_type` string
  - `selector_type` string
  - `find_type` string
  - `browser` string
  - `emulation_mode` string — Desktop or mobile web emulation of run that generated this override
  - `device_emulation_id` string — Device ID, if any, used for run that generated this override
  - `device_emulation_preset_type` string — Device preset type, if any, used for run that generated this override

## Response `200`

The complete state of the mablscript override after adding the selector override

- MablscriptOverride — An override that changes the behavior of a mablscript operation
  - `id` string, required — An ID uniquely identifying this override
  - `environment_id` string, required — The ID of the environment associated with this override
  - `selector_id` string, required — The ID of the selector associated with this override
  - `selector_type` 'ancestor' | 'target'
  - `find_type` 'target_only' | 'ancestor_target'
  - `last_updated_time` integer, required — Time at which the override was created
  - `selector_overrides` SelectorOverride[], required — History of selector overrides where the most recent override is at index 0
    - `selector_variant_id` string — Unique ID for this specific override
    - `journey_invariant_id` string
    - `journey_run_id` string
    - `step_id_in_journey` string
    - `step_run_id` string
    - `created_time` integer, required — Time the override was created
    - `selector` object, required — Map of string => object
    - `override_type` 'heal' | 'update'
    - `browser` string
    - `emulation_mode` string — Desktop or mobile web emulation of run that generated this override
    - `device_emulation_id` string — Device ID, if any, used for run that generated this override
    - `device_emulation_preset_type` string — Device preset type, if any, used for run that generated this override
    - `accepted` boolean — True if the user accepted the override; false if the override was rejected

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
