---
title: "Add an entity (or entities) to a dataset given a graph representation of the entity (or entities)."
method: POST
path: "/entity/add"
tags: ["entity"]
---

# Add an entity (or entities) to a dataset given a graph representation of the entity (or entities).

`POST /entity/add`

## Request body

- AddParams
  - `attempt_merge` boolean — If true, attempt to merge with existing entities in the dataset
  - `dataset` string, required
  - `entity_graph` LLMKnowledgeGraph, required — Knowledge graph info structured to deserialize and display in the same format that the LLM outputs. Also the first representation of an LLM output in the pipeline from raw tool output to being merged into a DB
    - `entities` LLMEntity[], required
      - `id` integer, required
      - `properties` object, required
      - `type` string, required
    - `relationships` LLMRelationship[]
      - `properties` object
      - `source` integer, required
      - `target` integer, required
      - `type` string, required
  - `source` union
    - 'None'
    - object
      - `Web` string, required
    - object
      - `DocumentPage` object[], required
    - object
      - `SecFiling` object[], required

## Response `200`

Added entity ids

- EntityId[]

---

[API](https://skmtc.dev/structifyai/apis/structify.md) · [All operations](https://skmtc.dev/structifyai/apis/structify/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/structifyai/structify/revisions/1364930b6980/schema)
