---
title: "Create Experiment Template"
method: POST
path: "/experiment_templates"
tags: ["experiment_templates"]
---

# Create Experiment Template

`POST /experiment_templates`

Create a new experiment template.

Parameters
----------
body : CreateExperimentTemplateBody
    Template creation data.

Returns
-------
ExperimentTemplate
    Created experiment template.

## Request body

- CreateExperimentTemplateBody — Request body for creating an experiment template.
  - `name` string, required
  - `description` string, nullable
  - `protocol_config` object, required
  - `parameters_schema` object
  - `time_series_spec` object
  - `metrics_spec` object
  - `source_protocol` string, nullable
  - `force_create` boolean
  - `project_id` string, nullable
  - `protocol_group_id` string, nullable

## Response `201`

Successful Response

- ExperimentTemplate — Pydantic model for experiment template database entity.
  - `id` string, nullable — Unique identifier for the template
  - `name` string, required — Name of the template
  - `description` string, nullable — Description of the template
  - `description_template` string, nullable — Template string for generating user-facing descriptions with {{param}} placeholders
  - `protocol_config` object, nullable — Protocol configuration (UCP format). Omitted from list responses by default; opt in via ``?include=protocol_config``.
  - `parameters_schema` object, nullable — Parameters schema defining what parameters this template accepts. Omitted from list responses by default; opt in via ``?include=parameters_schema``.
  - `organization_id` string, required — ID of the organization that owns this template
  - `created_at` string, nullable — When the template was created
  - `updated_at` string, nullable — When the template was last updated
  - `plot_options` object — Plot configuration options organized by plot type (time_series, metrics)
  - `time_series_spec` object — Specification mapping time-series keys to calculation rules.
  - `metrics_spec` object — Specification mapping metric names to calculation rules.
  - `source_protocol` string, nullable — Original protocol text as entered by the user
  - `created_by` string, nullable — User ID of the user who created this template
  - `created_by_email` string, nullable — Email of the user who created this template
  - `project_id` string, nullable — ID of the project that owns this protocol. Every protocol reachable through the API is project-scoped; None only on unmigrated rows.
  - `protocol_group_id` string, nullable — ID of the protocol group this protocol belongs to. Protocols sharing a group are related. None means ungrouped. The group is always in the same project as the protocol.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/ionworks/apis/fastapi.md) · [All operations](https://skmtc.dev/ionworks/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ionworks/fastapi/revisions/7337a3cbdaf2/schema)
