---
title: "Create Namespace Template"
method: POST
path: "/v1/templates/namespaces/from-namespace/{namespace_id}"
tags: ["Templates", "Namespace Templates"]
---

# Create Namespace Template

`POST /v1/templates/namespaces/from-namespace/{namespace_id}`

Create template from existing namespace.

Supports three template scopes:
- **organization**: Available to all users in your organization (default)
- **user**: Available only to you
- **system**: Available to all organizations (requires Mixpeek admin email)

## Path parameters

- `namespace_id` string, required — Namespace ID

## Request body

- CreateTemplateFromResourceRequest — Request to create a template from an existing resource.
  - `template_name` string, required — Name for the new template
  - `description` string, nullable — Description of the template's purpose (OPTIONAL)
  - `scope` 'system' | 'organization' | 'user' | 'public' — Scope of template availability. system: Mixpeek-provided, available to all orgs organization: Private to org members user: Private to creator only public: User-created, discoverable by all orgs (marketplace)
  - `category` string, nullable — Optional category for organizing templates
  - `tags` string[] — Optional tags for the template
  - `is_public` boolean — Whether this template should be publicly discoverable

## Response `201`

Successful Response

- CreateTemplateFromResourceResponse — Response after creating a template from a resource.
  - `template_id` string, required — ID of the created template
  - `template_name` string, required — Name of the created template
  - `template_type` 'namespace' | 'retriever' | 'cluster' | 'collection' | 'bucket' | 'taxonomy' | 'scaffold', required — Types of resources that can be templated.
  - `scope` 'system' | 'organization' | 'user' | 'public', required — Scope of template availability. system: Mixpeek-provided, available to all orgs organization: Private to org members user: Private to creator only public: User-created, discoverable by all orgs (marketplace)
  - `source_resource_id` string, required — ID of the resource used to create this template
  - `created_at` string, date-time — Timestamp when template was created

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `500` — Internal Server Error

---

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