---
updatedAt: 2026-05-28T13:22:33.000Z
agentTools:
  projectIndex: https://api.help.mabl.com/llms.txt
---

# Update test metadata

Update the unversioned metadata of an existing test

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "mabl API",
    "description": "APIs for interacting with mabl services",
    "version": "0.563.3-2026-10-09.1791576280-jbaldassari-1791576682-SNAPSHOT"
  },
  "servers": [
    {
      "url": "https://api.mabl.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      },
      "bearerAuth": {
        "type": "apiKey",
        "name": "Authorization",
        "in": "header"
      }
    },
    "schemas": {
      "ExternalTestCase": {
        "description": "External test case",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Id associated with this test case"
          }
        }
      },
      "TestTypeEnum": {
        "description": "Type of test",
        "type": "string",
        "enum": [
          "api",
          "browser",
          "performance",
          "mobile"
        ]
      },
      "ErrorResponseGeneric": {
        "properties": {
          "code": {
            "type": "integer",
            "format": "int32",
            "minimum": 100,
            "maximum": 599
          },
          "id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "Label": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "description": "name",
            "type": "string"
          }
        }
      },
      "TestMetadata": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Invariant"
          },
          {
            "properties": {
              "device_emulations": {
                "type": "array",
                "description": "List of browser device emulation configurations. Empty list means configured for desktop",
                "items": {
                  "$ref": "#/components/schemas/DeviceEmulation"
                }
              },
              "datatables": {
                "type": "array",
                "description": "Array of datatable IDs for datatables that satisfy the parameter requirements of the test",
                "items": {
                  "type": "string"
                }
              },
              "name": {
                "type": "string",
                "description": "The display name of the test"
              },
              "test_cases": {
                "type": "array",
                "description": "User provided external test cases (limit 20)",
                "items": {
                  "$ref": "#/components/schemas/ExternalTestCase"
                }
              },
              "description": {
                "type": "string",
                "description": "Brief description the test"
              },
              "test_source": {
                "$ref": "#/components/schemas/TestSource"
              },
              "export_variables": {
                "type": "boolean",
                "description": "Whether this test should export variables"
              },
              "enabled": {
                "type": "boolean",
                "description": "If test is enabled to execute"
              },
              "test_type": {
                "$ref": "#/components/schemas/TestTypeEnum"
              },
              "send_mabl_header": {
                "type": "boolean",
                "description": "Controls whether or not the x-mabl-agent header is sent on requests"
              },
              "labels": {
                "type": "array",
                "description": "User provided labels",
                "items": {
                  "$ref": "#/components/schemas/Label"
                }
              }
            }
          }
        ],
        "type": "object"
      },
      "DeviceEmulationConfiguration": {
        "description": "Emulation configuration",
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "capabilities": {
            "type": "array",
            "description": "Optional device capabilities",
            "items": {
              "type": "string",
              "enum": [
                "touch",
                "mobile"
              ]
            }
          },
          "name": {
            "type": "string",
            "description": "Emulation configuration display name"
          },
          "preset_type": {
            "type": "string",
            "description": "Preset device configuration (optional)",
            "enum": [
              "blackberry_playbook",
              "blackberry_z30",
              "galaxy_fold",
              "galaxy_note_3",
              "galaxy_note_ii",
              "galaxy_s5",
              "galaxy_s6",
              "galaxy_s8",
              "galaxy_s21",
              "galaxy_s22",
              "galaxy_s23",
              "galaxy_s_iii",
              "galaxy_tab_s7",
              "ipad",
              "ipad_air_2020",
              "ipad_mini",
              "ipad_mini_4",
              "ipad_pro",
              "ipad_ten_point_two",
              "iphone_11_pro_max",
              "iphone_11",
              "iphone_12",
              "iphone_12_pro_max",
              "iphone_13_mini",
              "iphone_13",
              "iphone_13_pro",
              "iphone_13_pro_max",
              "iphone_14",
              "iphone_14_pro",
              "iphone_14_plus",
              "iphone_14_pro_max",
              "iphone_15",
              "iphone_15_plus",
              "iphone_15_pro",
              "iphone_15_pro_max",
              "iphone_4",
              "iphone_5_se",
              "iphone_6_7_8",
              "iphone_6_7_8_plus",
              "iphone_x",
              "jiophone_2",
              "kindle_fire_hdx",
              "laptop_with_hidpi_screen",
              "laptop_with_mdpi_screen",
              "laptop_with_touch",
              "lg_optimus_l70",
              "microsoft_lumia_550",
              "microsoft_lumia_950",
              "moto_g4",
              "nexus_4",
              "nexus_5",
              "nexus_5x",
              "nexus_6",
              "nexus_6p",
              "nexus_7",
              "nexus_10",
              "nokia_lumia_520",
              "nokia_n9",
              "pixel_2",
              "pixel_2_xl",
              "pixel_6",
              "surface_duo"
            ]
          },
          "screen": {
            "type": "object",
            "description": "Screen configuration",
            "properties": {
              "device_pixel_ratio": {
                "description": "Device pixel ratio (may be decimal)",
                "type": "number",
                "format": "double"
              },
              "horizontal": {
                "description": "Horizontal screen dimensions",
                "$ref": "#/components/schemas/DeviceScreenDimensions"
              },
              "vertical": {
                "description": "Vertical screen dimensions",
                "$ref": "#/components/schemas/DeviceScreenDimensions"
              }
            }
          },
          "type": {
            "type": "string",
            "description": "General device type",
            "enum": [
              "phone",
              "tablet",
              "notebook"
            ]
          },
          "user_agent": {
            "type": "string",
            "description": "Client User Agent string"
          }
        }
      },
      "DeviceEmulation": {
        "description": "Emulation configuration",
        "type": "object",
        "required": [
          "device_config",
          "orientation"
        ],
        "properties": {
          "device_config": {
            "$ref": "#/components/schemas/DeviceEmulationConfiguration"
          },
          "orientation": {
            "type": "string",
            "description": "Fixed device orientation",
            "enum": [
              "portrait_primary",
              "portrait_secondary",
              "landscape_primary",
              "landscape_secondary"
            ]
          }
        }
      },
      "DeviceScreenDimensions": {
        "type": "object",
        "required": [
          "height",
          "width"
        ],
        "properties": {
          "width": {
            "description": "Width (pixels)",
            "type": "integer",
            "format": "int32"
          },
          "height": {
            "description": "Height (pixels)",
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "Invariant": {
        "type": "object",
        "properties": {
          "workspace_id": {
            "type": "string",
            "description": "Workspace Id"
          },
          "created_time": {
            "type": "integer",
            "format": "int64",
            "description": "Time the test was created in epoch milliseconds"
          },
          "last_updated_time": {
            "type": "integer",
            "format": "int64",
            "description": "Time the test was last updated in epoch milliseconds"
          },
          "last_updated_by_id": {
            "type": "string",
            "description": "The ID of the user who last updated this test"
          },
          "id": {
            "type": "string",
            "description": "Unique identifier",
            "maxLength": 50
          },
          "created_by_id": {
            "type": "string",
            "description": "The ID of the user who created this test"
          }
        }
      },
      "TestSource": {
        "description": "Where the test lives",
        "type": "string",
        "enum": [
          "mabl_cloud",
          "external",
          "mabl_local",
          "mabl_agent"
        ]
      }
    },
    "responses": {
      "ErrorResponse": {
        "description": "Unknown error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseGeneric"
            }
          }
        }
      },
      "ErrorResponse401": {
        "description": "User not authenticated",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseGeneric"
            }
          }
        }
      },
      "ErrorResponse403": {
        "description": "User not authorized",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponseGeneric"
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "basicAuth": []
    },
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/test/{id}/metadata": {
      "patch": {
        "summary": "Update test metadata",
        "requestBody": {
          "description": "The test metadata fields to update",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestMetadata"
              }
            }
          },
          "required": true
        },
        "operationId": "updateTestMetadata",
        "description": "Update the unversioned metadata of an existing test",
        "responses": {
          "200": {
            "description": "The updated test on the master branch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestMetadata"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/ErrorResponse401"
          },
          "403": {
            "$ref": "#/components/responses/ErrorResponse403"
          },
          "404": {
            "description": "Test not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponseGeneric"
                }
              }
            }
          },
          "default": {
            "$ref": "#/components/responses/ErrorResponse"
          }
        },
        "parameters": [
          {
            "schema": {
              "type": "string"
            },
            "in": "path",
            "name": "id",
            "description": "The ID of the test to update",
            "required": true
          },
          {
            "schema": {
              "type": "string"
            },
            "in": "header",
            "name": "If-Match",
            "description": "If-Match header according to http/1.1 spec section 14.24",
            "required": false
          }
        ],
        "tags": [
          "Test"
        ]
      }
    }
  },
  "tags": [
    {
      "name": "Test"
    }
  ]
}
```