Skip to content
Testsigma DOCS

Create an element

POST/ui_identifiers

Base URL  https://app.testsigma.com/api/v1

Create a new element (UI identifier) in the specified application version.

Authenticate with your API key as a Bearer token in the Authorization header. Generate a key →
nameName for the new element.
locatorTypeLocator strategy — xpath, css_selector, id, name, classname, linktext, tagname.
definitionThe locator expression.
createdByUser ID of the creator.
statusReview status — READY or DRAFT.
screenNameIdID of the screen to associate the element with.
applicationVersionIdID of the application version.
createdTypeCreation mode — CHROME, ADVANCED, or MANUAL.
idID of the newly created element.
nameName of the created element.
locatorTypeLocator strategy used.
definitionLocator expression.
statusReview status.
REQUEST
curl -X POST \
  'https://app.testsigma.com/api/v1/ui_identifiers' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Submit Button",
    "locatorType": "xpath",
    "definition": "//button[@type='submit']",
    "createdBy": 9,
    "status": "READY",
    "screenNameId": 12,
    "applicationVersionId": 39,
    "createdType": "MANUAL"
  }'
const response = await fetch('https://app.testsigma.com/api/v1/ui_identifiers', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
      "name": "Submit Button",
      "locatorType": "xpath",
      "definition": "//button[@type='submit']",
      "createdBy": 9,
      "status": "READY",
      "screenNameId": 12,
      "applicationVersionId": 39,
      "createdType": "MANUAL"
  })
});
const data = await response.json();
import requests

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