---
title: "Fork Template V2"
method: POST
path: "/knowledge_bases/v2/fork-template"
tags: ["Knowledge Bases V2"]
---

# Fork Template V2

`POST /knowledge_bases/v2/fork-template`

Create a new knowledge base from a template with v2 processing.

This endpoint:
1. Finds the template by name
2. Creates a new KB with document record (forked=True, source=template_name)
3. Uploads template content to S3
4. Queues Celery task for async processing (chunking, vectorization)

The document processing happens asynchronously via Celery.

## Request body

- ForkTemplateRequest
  - `template_name` string, required
  - `new_name` string, nullable

## Response `201`

Successful Response

- KnowledgeBaseWithDocumentResponse — Response after creating knowledge base with document
  - `success` boolean, required
  - `knowledge_base_id` integer, required
  - `knowledge_base_public_id` string, required
  - `document_id` integer, required
  - `document_public_id` string, required
  - `name` string, required
  - `version` integer, required
  - `processing_status` string, required
  - `celery_task_id` string, nullable
  - `message` string, nullable

## Other responses

- `400` — Duplicate name or invalid request
- `404` — Template not found
- `422` — Validation Error

---

[API](https://skmtc.net/myaltimate/apis/fastapi.md) · [All operations](https://skmtc.net/myaltimate/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/myaltimate/fastapi/versions/aab3fe5c9f05/schema)
