Skip to main content
POST
/
v1
/
templates
/
clusters
/
from-cluster
/
{cluster_id}
Create Cluster Template
curl --request POST \
  --url https://api.mixpeek.com/v1/templates/clusters/from-cluster/{cluster_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "template_name": "<string>",
  "description": "<string>",
  "scope": "organization",
  "category": "<string>",
  "tags": [
    "<string>"
  ],
  "is_public": false
}
'
{
  "template_id": "<string>",
  "template_name": "<string>",
  "template_type": "namespace",
  "scope": "system",
  "source_resource_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z"
}

Headers

Authorization
string

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

X-Namespace
string

REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'

Path Parameters

cluster_id
string
required

Cluster ID

Body

application/json

Request to create a template from an existing resource.

template_name
string
required

Name for the new template

Required string length: 1 - 100
description
string | null

Description of the template's purpose (OPTIONAL)

Maximum string length: 1000
scope
enum<string>
default:organization

Template scope: 'organization' (all users in org) or 'user' (only you)

Available options:
system,
organization,
user
category
string | null

Optional category for organizing templates

Maximum string length: 50
tags
string[]

Optional tags for the template

is_public
boolean
default:false

Whether this template should be publicly discoverable

Response

Successful Response

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
enum<string>
required

Type of template created

Available options:
namespace,
retriever,
cluster,
collection,
bucket,
taxonomy
scope
enum<string>
required

Template scope

Available options:
system,
organization,
user
source_resource_id
string
required

ID of the resource used to create this template

created_at
string<date-time>

Timestamp when template was created