Skip to content
You're viewing the v2 docs. Looking for v1?Go to v1 docs
Docs
Testsigma
Popular questions
↑↓ to navigate↵ to selectesc to close
Book a demo

Update an element

PUT/ui_identifiers/{element_id}
Base URL https://app.testsigma.com/api/v1Region

Update an existing element's locator, locator type, screen name, or other metadata by its ID.

Authenticate with your API key as a Bearer token in the Authorization header. How to authenticate →
element_idThe ID of the element to update.
nameUpdated element name.
locatorTypeUpdated locator strategy.
definitionUpdated locator expression.
statusUpdated review status — READY or DRAFT.
screenNameIdUpdated screen ID.
applicationVersionIdApplication version ID.
idID of the updated element.
nameUpdated element name.
locatorTypeUpdated locator strategy.
definitionUpdated locator expression.
statusCurrent review status.
Request
curl -X PUT \
  'https://app.testsigma.com/api/v1/ui_identifiers/{element_id}' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Submit Button",
    "locatorType": "css_selector",
    "definition": "button[type='submit']",
    "status": "READY",
    "screenNameId": 12,
    "applicationVersionId": 39,
    "createdType": "MANUAL"
  }'
const response = await fetch('https://app.testsigma.com/api/v1/ui_identifiers/{element_id}', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "name": "Submit Button",
      "locatorType": "css_selector",
      "definition": "button[type='submit']",
      "status": "READY",
      "screenNameId": 12,
      "applicationVersionId": 39,
      "createdType": "MANUAL"
  })
});
const data = await response.json();
import requests

response = requests.put(
  'https://app.testsigma.com/api/v1/ui_identifiers/{element_id}',
  headers={
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  json={
      "name": "Submit Button",
      "locatorType": "css_selector",
      "definition": "button[type='submit']",
      "status": "READY",
      "screenNameId": 12,
      "applicationVersionId": 39,
      "createdType": "MANUAL"
  }
)
data = response.json()
Response200 OK
{
  "id": 103,
  "name": "Submit Button",
  "locatorType": "css_selector",
  "definition": "button[type='submit']",
  "status": "READY",
  "screenNameId": 12,
  "applicationVersionId": 39,
  "createdType": "MANUAL",
  "createdById": 9
}

Was this page helpful?