Skip to main content
POST
/
v1
/
templates
/
collections
/
{template_id}
/
instantiate
Instantiate Collection Template
curl --request POST \
  --url https://api.mixpeek.com/v1/templates/collections/{template_id}/instantiate \
  --header 'Content-Type: application/json' \
  --data '
{
  "collection_name": "<string>",
  "bucket_ids": [
    "<string>"
  ],
  "collection_id": "<string>",
  "description": "<string>",
  "tags": [
    "<string>"
  ]
}
'
{
  "collection_id": "<string>",
  "collection_name": "<string>",
  "template_id": "<string>",
  "status": "created",
  "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

template_id
string
required

Template ID

Body

application/json

Request to instantiate a collection from a template.

collection_name
string
required

Name for the new collection

Required string length: 1 - 100
bucket_ids
string[] | null

Bucket IDs to use for the collection (for bucket sources)

collection_id
string | null

Collection ID to use for the collection (for collection sources)

description
string | null

Optional description override for the collection

Maximum string length: 1000
tags
string[]

Optional tags for the collection

Response

Successful Response

Response after instantiating a collection template.

collection_id
string
required

ID of the created collection

collection_name
string
required

Name of the created collection

template_id
string
required

ID of the template used

status
string
default:created

Status of the instantiation

created_at
string<date-time>

Timestamp when collection was created