---
title: "Add element"
method: POST
path: "/api/v1/elements"
tags: ["Elements"]
---

# Add element

`POST /api/v1/elements`

This endpoint creates an element within a specific section of an ELN or knowledgebase item.

To add an element, specify its type and the corresponding section ID,
Once created, the element is automatically integrated and displayed in the designated section.

## Request body

- union
  - AddElement
    - `token` string, required
    - `item` object — Valid element types are:<br>• samples<br>• equipment<br>• code<br>• compound<br>• reaction<br>• text<br>• steps<br>• excel<br>• plate<br>
      - `name` string — Specifies the name of the element. If not provided, the element will be assigned a default name
      - `container_id` integer, required — The ID of the section to which the element will be added
      - `container_type` string, required — The type of container in which the element will be placed
      - `element_type` string, required — The type of element to be added
      - `data` string, nullable, required
  - AddPlateElement
    - `token` string, required
    - `item` object — Valid plate dimensions are:<br>• 3x2 (6 wells)<br>• 4x3 (12 wells)<br>• 6x4 (24 wells)<br>• 8x6 (48 wells)<br>• 12x6 (72 wells)<br>• 12x8 (96 wells)<br>• 24x16 (384 wells)<br>
      - `name` string — Specifies the name of the element. If not provided, the element will be assigned a default name
      - `container_id` integer, required — The ID of the section to which the element will be added
      - `container_type` string, required — The type of container in which the plate element will be placed
      - `element_type` string, required — The type of element to be added
      - `cols` integer, required — the number of columns in the plate layout
      - `rows` integer, required — The number of rows in the plate layout
      - `data` string, nullable, required

## Response `201`

Created

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