---
title: "Update element"
method: PUT
path: "/api/v1/elements/{id}"
tags: ["Elements"]
---

# Update element

`PUT /api/v1/elements/{id}`

This endpoint updates the content of a specified element by its ID.

Note: Updating the <code>data</code>/<code>form_json</code> field will replace any existing data.

## Path parameters

- `id` integer, required

## Request body

- union
  - UpdateFormElement
    - `token` string, required
    - `form_json` string — A JSON string containing key-value pairs that specify updates to the form fields. Each key corresponds to a form field name and the value specifies the new content for that field.
  - UpdateTextElement
    - `token` string, required
    - `data` string

## Response `200`

OK

## Other responses

- `401` — Error: Unauthorized
- `422` — Invalid request

---

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