Templates
A template is a reusable schema blueprint — a tree of levels (root A, children assigned breadth-first), each typed singular, series, many, or composite and carrying property definitions. Templates are either your team's own (visibility: "team", category: "custom") or part of the shared public catalog (battery, textile, electronics, furniture). Shape one in a draft, complete it to freeze it, then instantiate it as an ontology.
The template model
- Name
object- Type
- string
- Description
Always
template.
- Name
id- Type
- string
- Description
Unique identifier, e.g.
template_00a1b2c3d4e5f607.
- Name
name- Type
- string
- Description
Display name (3–30 characters). Nullable.
- Name
description- Type
- string
- Description
Short description (3–255 characters). Nullable.
- Name
status- Type
- string
- Description
draftorcomplete. Completed templates are immutable.
- Name
category- Type
- string
- Description
custom(your team's) or a public catalog category —battery,textile,electronics,furniture. Nullable.
- Name
visibility- Type
- string
- Description
teamorpublic.
- Name
forked_from- Type
- object
- Description
Provenance recorded when the template was forked from another. Nullable.
- Name
structure- Type
- object
- Description
The level tree, keyed by level key (see below). Nullable on a fresh draft.
- Name
created_at- Type
- string
- Description
ISO 8601 timestamp of creation.
- Name
updated_at- Type
- string
- Description
ISO 8601 timestamp of the last update.
The structure document
structure is a map of level key → level node. Each node carries its type, its parent/children wiring, and its property definitions. PATCH replaces the whole document, and the root level A must always exist.
structure
{
"A": {
"id": "A", "name": "SKU", "type": "singular", "is_root": true,
"static_lineage": true, "properties": [], "children": ["B"]
},
"B": {
"id": "B", "name": "Pack", "type": "series", "is_root": false,
"static_lineage": true, "parent": "A", "children": [],
"properties": [
{ "id": "property_9f2k7d", "name": "Capacity", "type": "measurement",
"value": { "required": true } }
]
}
}
Property type values include short_text, long_text, number, measurement, boolean, date, tags, range, file, image, chart, plus the non-editable category and composite. See the Data model for how level types behave.
List templates
Lists your team's own templates (category=custom, the default) or the shared public catalog. Returns a paginated list. Requires templates:read.
Optional attributes
- Name
category- Type
- string
- Description
custom(default),battery,textile,electronics, orfurniture.
- Name
limit- Type
- integer
- Description
Page size, 1–100 (default 10).
- Name
cursor- Type
- string
- Description
A pagination cursor from a previous response's
next_cursor.
Request
curl -G https://api.synexcloud.com/v1/templates \
-H "Authorization: Bearer $SYNEX_API_KEY" \
-d category=battery \
-d limit=10
Response
{
"object": "list",
"data": [
{
"object": "template",
"id": "template_00a1b2c3d4e5f607",
"name": "EV Battery Pack",
"description": "48V modular pack blueprint",
"status": "complete",
"category": "battery",
"visibility": "public",
"forked_from": null,
"structure": { "A": { "id": "A", "type": "singular" } },
"created_at": "2026-07-01T08:00:00Z",
"updated_at": "2026-07-01T08:00:00Z"
}
],
"has_more": false,
"next_cursor": null,
"url": "/v1/templates"
}
Create a draft template
Creates a draft template with an empty root level A. Shape its structure with PATCH, then finalize it with complete. Requires templates:write. Accepts an optional Idempotency-Key header.
Required attributes
- Name
name- Type
- string
- Description
Display name, 3–30 characters.
- Name
description- Type
- string
- Description
Short description, 3–255 characters.
Request
curl https://api.synexcloud.com/v1/templates \
-H "Authorization: Bearer $SYNEX_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Battery blueprint", "description": "48V modular pack" }'
Response
{
"object": "template",
"id": "template_11b2c3d4e5f60718",
"name": "Battery blueprint",
"description": "48V modular pack",
"status": "draft",
"category": "custom",
"visibility": "team",
"forked_from": null,
"structure": {
"A": { "id": "A", "name": "SKU", "type": "singular", "is_root": true }
},
"created_at": "2026-07-12T09:31:00Z",
"updated_at": "2026-07-12T09:31:00Z"
}
Retrieve a template
Retrieves one of your team's templates or a public one by id. Requires templates:read.
Request
curl https://api.synexcloud.com/v1/templates/template_11b2c3d4e5f60718 \
-H "Authorization: Bearer $SYNEX_API_KEY"
Response
{
"object": "template",
"id": "template_11b2c3d4e5f60718",
"name": "Battery blueprint",
"description": "48V modular pack",
"status": "draft",
"category": "custom",
"visibility": "team",
"forked_from": null,
"structure": { "A": { "id": "A", "type": "singular", "is_root": true } },
"created_at": "2026-07-12T09:31:00Z",
"updated_at": "2026-07-12T09:31:00Z"
}
Update a draft template
Updates a draft's name, description, and/or structure. Completed templates are immutable — updating one fails with 409 template_not_draft. Requires templates:write.
Optional attributes
- Name
name- Type
- string
- Description
Display name, 3–30 characters.
- Name
description- Type
- string
- Description
Short description, 3–255 characters.
- Name
structure- Type
- object
- Description
The full replacement level tree, keyed by level key. The root level
Amust exist.
Request
curl -X PATCH https://api.synexcloud.com/v1/templates/template_11b2c3d4e5f60718 \
-H "Authorization: Bearer $SYNEX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"structure": {
"A": { "id": "A", "name": "SKU", "type": "singular", "is_root": true, "children": ["B"] },
"B": { "id": "B", "name": "Pack", "type": "series", "parent": "A",
"properties": [{ "id": "property_9f2k7d", "name": "Capacity", "type": "measurement" }] }
}
}'
Response
{
"object": "template",
"id": "template_11b2c3d4e5f60718",
"status": "draft",
"structure": {
"A": { "id": "A", "name": "SKU", "type": "singular", "is_root": true, "children": ["B"] },
"B": { "id": "B", "name": "Pack", "type": "series", "parent": "A" }
},
"updated_at": "2026-07-12T09:40:00Z"
}
Fork a template
Creates a new draft copy of a completed template — your own or a public one — recording provenance in forked_from. Drafts cannot be forked (409 template_is_draft). Requires templates:write. Accepts an optional Idempotency-Key header.
Required attributes
- Name
name- Type
- string
- Description
Display name for the fork, 3–30 characters.
- Name
description- Type
- string
- Description
Short description, 3–255 characters.
Request
curl https://api.synexcloud.com/v1/templates/template_00a1b2c3d4e5f607/fork \
-H "Authorization: Bearer $SYNEX_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "EV Pack (Acme)", "description": "Battery pack, Acme variant" }'
Response
{
"object": "template",
"id": "template_22c3d4e5f6071829",
"name": "EV Pack (Acme)",
"description": "Battery pack, Acme variant",
"status": "draft",
"category": "custom",
"visibility": "team",
"forked_from": { "id": "template_00a1b2c3d4e5f607" },
"created_at": "2026-07-12T10:00:00Z",
"updated_at": "2026-07-12T10:00:00Z"
}
Complete a template
Finalizes a draft. Completed templates are immutable and can be forked or instantiated into ontologies. Requires templates:write.
Request
curl https://api.synexcloud.com/v1/templates/template_11b2c3d4e5f60718/complete \
-H "Authorization: Bearer $SYNEX_API_KEY"
Response
{
"object": "template",
"id": "template_11b2c3d4e5f60718",
"name": "Battery blueprint",
"status": "complete",
"visibility": "team",
"updated_at": "2026-07-12T10:05:00Z"
}
Delete a draft template
Deletes a draft template. Only drafts can be deleted — deleting a completed template fails with 409 template_not_draft. Requires templates:write.
Request
curl -X DELETE https://api.synexcloud.com/v1/templates/template_11b2c3d4e5f60718 \
-H "Authorization: Bearer $SYNEX_API_KEY"
Response
{
"object": "template",
"id": "template_11b2c3d4e5f60718",
"deleted": true
}