---
title: "Create Retriever Template"
method: POST
path: "/v1/templates/retrievers/from-retriever/{retriever_id}"
tags: ["Templates", "Retriever Templates"]
---

# Create Retriever Template

`POST /v1/templates/retrievers/from-retriever/{retriever_id}`

## Request

- Base URL: `https://api.mixpeek.com`
- URL: `https://api.mixpeek.com/v1/templates/retrievers/from-retriever/{retriever_id}`
- Auth: HTTP bearer and API key in header `X-Namespace`

Create template from existing retriever.

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

- `retriever_id` string, required: Retriever 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 `200`

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`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error
- `503`: Service Unavailable

## Changes

- **2026-10-09** `61a175e8eb9a`: 1 warning, 5 info
  - removed the optional property `detail` from the response with the `422` status
  - added the non-success response with the status `429`
  - added the non-success response with the status `503`
  - added the optional property `success` to the response with the `422` status
  - …2 more
- **2026-10-04** `38e0822db900`: 1 breaking, 1 info
  - removed the success response with the status `201`
  - added the success response with the status `200`
- **2026-08-09** `5d4c905106b4`: 1 info
  - the endpoint scheme security `BearerAuth AND NamespaceHeader` was added to the API

[Operation history](https://skmtc.dev/mixpeek/apis/mixpeek-api/changes/v1/templates/retrievers/from-retriever/:retriever_id/post.md)

---

[API](https://skmtc.dev/mixpeek/apis/mixpeek-api.md) - [All operations](https://skmtc.dev/mixpeek/apis/mixpeek-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mixpeek/apis/mixpeek-api/revisions/790bc16455f6?raw)
