---
title: "Remove StateDetection"
method: DELETE
path: "/stateDetections/{id}"
tags: ["StateDetection"]
---

# Remove StateDetection

`DELETE /stateDetections/{id}`

Used to remove a state detection

## Path parameters

- `id` string, required

## Response `200`

The state detection was successfully removed

- StateDetection
  - `id` string — The ID of the state detection
  - `organization_id` string — DEPRECATED - The ID of the organization to which this state detection applies - see workspace_id
  - `workspace_id` string — The ID of the workspace to which this state detection applies
  - `environment_id` string — The ID of the environment to which this state detection applies
  - `application_id` string — The ID of the application to which this state detection applies
  - `deployment_id` string — The ID of the deployment to which this state detection applies
  - `credentials_id` string — The ID of the credentials to which this state detection applies
  - `run_policy_id` string — DEPRECATED - The ID of the run policy to which this state detection applies - see plan_id
  - `plan_id` string — The ID of the plan to which this state detection applies
  - `created_time` integer — Time at which the state detection was created
  - `created_by_id` string — The ID of the user who created this state detection
  - `last_updated_time` integer — time the state detection was last updated
  - `last_updated_by_id` string — The ID of the user who last updated this state detection
  - `expire_datetime` string, date-time — Date time entity will be automatically purged from storage
  - `run_policy_execution_id` string — DEPRECATED - The ID of the run policy execution to which this state detection applies - see plan_run_id
  - `plan_run_id` string — The ID of the run policy execution to which this state detection applies
  - `test_type` 'api' | 'browser' | 'performance' | 'mobile' — Type of test
  - `journey_run_id` string — The ID of the journey run to which this state detection applies
  - `test_script_id` string — DEPRECATED - The ID of the journey to which this state detection applies - see journey_id
  - `journey_id` string — The ID of the journey to which this state detection applies
  - `journey_invariant_id` string — The invariant ID of the journey to which this state detection applies
  - `operation_id` string — The ID of the operation_id to which this state detection applies
  - `flow_id` string — The ID of the flow to which this state detection applies
  - `flow_invariant_id` string — The invariant ID of the flow to which this state detection applies
  - `action_code` string — The code (type) of the action to which this state detection applies
  - `action_index` integer — DEPRECATED - The index of the executed action (with respect to the execution of the journey) to which this state detection applies
  - `flow_step_index` integer — DEPRECATED - The index of the step (with respect to the flow) to which this state detection applies
  - `flow_source_index_in_journey` integer — The index of the flow source within the journey
  - `step_source_index_in_flow` integer — The index of the step source within its respective flow source
  - `action_source_index_in_step` integer — The index of the action source within its respective step source
  - `cumulative_action_source_index_in_flow` integer — The index of the action source within its respective flow source
  - `flow_run_index_in_journey` integer — The index of the executed flow within the journey
  - `step_run_index_in_flow` integer — The index of the executed step within its respective executing flow
  - `action_run_index_in_step` integer — The index of the executed action within its respective executing step
  - `cumulative_action_run_index_in_flow` integer — The index of the executed action within its respective executing flow
  - `step_id_in_journey` string — The ID of the step within a specific journey that may repeat flows, if any, to which this state detection applies
  - `step_id_in_flow` string — The ID of the step within its flow, if any, to which this state detection applies
  - `step_run_id` string — The ID of a single execution of the step, if any, to which this state detection applies
  - `group_id` string — The ID of the group of state detections to which this one belongs
  - `model_id` string — The ID of the state detection model that created this state detection
  - `model_version` string — The version of the state detection model that created this state detection
  - `resource` string — The resource under test to which this state detection applies
  - `category` string — The category of the state detection indicating what aspect of system state this represents
  - `current_state` string — The current state detected (for its corresponding category) in this state detection
  - `properties` object — The additional properties describing this state detection (key-value pairs)
  - `features_used` string[] — Features that resulted in this state detection
  - `grouping_fields` string[] — Measurement fields that were used to calculate the group_id of this state detection
  - `is_ad_hoc_run` boolean — Flag indicating if this state detection was from an ad-hoc run
  - `is_transient` boolean — Flag indicating whether state detection is considered potentially transient
  - `is_indeterminate` boolean — Flag indicating whether state detection is considered indeterminate
  - `should_retry` boolean — Flag indicating whether run policy execution corresponding to this state detection will be retried to gather further state information
  - `branch_name` string — The branch, if any, associated with this state detection
  - `browser` string — The browser that this state detection is measuring against
  - `browser_version` string — The browser version that this state detection is measuring against
  - `execution_runner_version` string — the version of the runner the execution occured on
  - `emulation_mode` string — Desktop or mobile web emulation to which this state detection applies
  - `device_emulation_id` string — Device ID to which this state detection applies
  - `device_emulation_preset_type` string — Device preset type to which this state detection applies
  - `window_start_time` integer — Time associated with an upstream journey execution or system event (epoch milliseconds)
  - `tags` Tag[] — Free text tags associated with this entity
    - `name` string, required — tag name
    - `values` string[]
  - `useful` boolean — Flag indicating whether or not the state detection was useful to the user
  - `correct` boolean — Flag indicating whether or not the user considers the state detection to be correct
  - `user_metadata` StateDetectionUserMetadata
    - `review_status` string — Current user review status

## 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)
