---
title: "Create a New Hive"
method: POST
path: "/v1/hives"
tags: ["Hive"]
---

# Create a New Hive

`POST /v1/hives`

Hive is a collection of documents that are used to train the Agent. Hive can be a PDF, DOCX, TXT or a website URL

## Request body

- BackendDtoModelsHiveContent
  - `hiveType` 'WEBSITE' | 'GOOGLE_DOCS' | 'DOCS' | 'TRANSCRIPTS', required
  - `url` string, nullable — URL of the content
  - `file_ids` string[], nullable — List of file ids to be referenced for the hive
  - `hiveProps` object, nullable — To recursively crawl child pages, add this as props {"crawl_child_pages": true}, "depth": "3"

## Response `200`

Hive created successfully

- Hive — Reference to all business knowledge base will be stored in Hive
  - `id` string
  - `orgId` string
  - `content` HiveContentOutput, required
    - `hiveType` 'WEBSITE' | 'GOOGLE_DOCS' | 'DOCS' | 'TRANSCRIPTS', required
    - `url` string, nullable — URL of the content
    - `files` Files[], nullable — List of files to be referenced for the hive
      - `id` string
      - `orgId` string
      - `fileName` string
      - `fileUrl` string
      - `createdBy` string
      - `createdAt` string, date-time
      - `updatedBy` string
      - `updatedAt` string, date-time
    - `hiveProps` object, nullable — To recursively crawl child pages, add this as props {"crawl_child_pages": true}, "depth": "3"
    - `internalProps` object, nullable — To add any internal props, add this as props {"last_crawl_time": "123123123123"}
  - `status` string, required
  - `createdBy` string
  - `createdAt` string, date-time
  - `updatedBy` string
  - `updatedAt` string, date-time

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/tratahq/apis/trata-ai-api.md) · [All operations](https://skmtc.net/tratahq/apis/trata-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tratahq/trata-ai-api/revisions/8f7b69ee5a90/schema)
