Developers
Templates & brand endpoints
Agent API v1 endpoints for the template library, brand kits and folders — search, instantiate with slots, and manage brand kits.
On this page
Templates#
Search the template library and turn a template into a new design.
Search templates#
/templatesSearch by prompt-like text, or list by kind and category. Premium templates are marked and require Pro to instantiate.
Parameters
qstringQueryFree text, e.g. minimal bakery menu.
kindDesignKindQueryFilter by kind.
categorystringQueryFilter by category.
limitintegerQuery1–60, default 24.
cursorstringQueryPagination cursor.
curl "https://api.desyn.app/api/v1/templates" \
-H "Authorization: Bearer $DESYN_API_KEY"{
"items": [
{
"slug": "bakery-menu-warm",
"title": "Warm bakery menu",
"kind": "menu",
"category": [
"food"
],
"premium": false,
"thumbnailUrl": "https://files.desyn.app/templates/bakery-menu-warm.webp"
}
],
"nextCursor": null
}Get a template#
/templates/{slug}Template metadata including its slots (named layers meant to be replaced, such as headline or photo).
Parameters
slugstringPathRequiredTemplate slug.
curl "https://api.desyn.app/api/v1/templates/$SLUG" \
-H "Authorization: Bearer $DESYN_API_KEY"{
"slug": "bakery-menu-warm",
"title": "Warm bakery menu",
"kind": "menu",
"premium": false,
"pages": 1,
"slots": [
"title",
"subtitle",
"item-1",
"price-1",
"photo"
]
}Instantiate a template#
/templates/{slug}/instantiateCreates a new design from the template, optionally filling slots and applying a brand kit in the same step.
Parameters
slugstringPathRequiredTemplate slug.
namestringBodyName of the new design.
slotsRecord<string, string>BodyText for text slots, asset ids for image slots.
brandKitIdstringBodyApply this brand kit.
curl -X POST "https://api.desyn.app/api/v1/templates/$SLUG/instantiate" \
-H "Authorization: Bearer $DESYN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Menu — autumn",
"slots": {
"title": "Autumn menu",
"photo": "a9b8c7d6e5f4"
}
}'{
"id": "k1dd2ee3ff4gg5hh6ii7jj8kk2",
"name": "Menu — autumn",
"kind": "menu",
"workspaceId": "j57a1b2c3d4e5f6g7h8i9j0k1m",
"folderId": null,
"seq": 2,
"pageCount": 3,
"thumbnailUrl": "https://files.desyn.app/thumbs/k17c2v9m3n8q4r5s6t7u8w9x0y/128.webp?sig=…",
"archived": false,
"updatedAt": 1792483200000
}Brand kits & folders#
Brand kits drive apply_brand and brand-aware generation; folders organize designs.
List brand kits#
/brand-kitsBrand kits of the workspace.
Parameters
workspaceIdstringQueryDefaults to the key's workspace.
curl "https://api.desyn.app/api/v1/brand-kits" \
-H "Authorization: Bearer $DESYN_API_KEY"{
"items": [
{
"id": "b1c2d3e4f5a6",
"name": "Sunline Coffee",
"colors": [
{
"name": "Ember",
"value": "#ff6a1f"
},
{
"name": "Cream",
"value": "#f6efe3"
}
],
"fonts": [
{
"role": "heading",
"family": "Instrument Serif"
},
{
"role": "body",
"family": "Instrument Sans"
}
],
"logos": [
"a1l2o3g4o5x6"
],
"voice": "Warm, unhurried, a little poetic. Never shouty."
}
]
}Create a brand kit#
/brand-kitsCreate a kit from explicit values. Requires the brandKit feature (Pro or self-hosted).
Parameters
namestringBodyRequiredKit name.
colors{ name, value }[]BodyPalette in order of importance.
fonts{ role, family, weight? }[]BodyRoles: heading, subheading, body, accent.
logosstring[]BodyAsset ids.
voicestringBodyTone of voice for AI copy.
rulesstring[]BodyHard rules, e.g. Never place the logo on photos.
curl -X POST "https://api.desyn.app/api/v1/brand-kits" \
-H "Authorization: Bearer $DESYN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Sunline Coffee",
"colors": [
{
"name": "Ember",
"value": "#ff6a1f"
}
],
"voice": "Warm, unhurried."
}'{
"id": "b1c2d3e4f5a6",
"name": "Sunline Coffee"
}Update a brand kit#
/brand-kits/{brandKitId}Replace any of the fields listed under create. Designs that follow the kit are not changed until you apply it again.
Parameters
brandKitIdstringPathRequiredBrand kit id.
curl -X PATCH "https://api.desyn.app/api/v1/brand-kits/$BRAND_KIT_ID" \
-H "Authorization: Bearer $DESYN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"voice": "Warm, unhurried, a little poetic."
}'{
"id": "b1c2d3e4f5a6",
"name": "Sunline Coffee"
}Delete a brand kit#
/brand-kits/{brandKitId}Deletes the kit. Designs keep their current styling.
Parameters
brandKitIdstringPathRequiredBrand kit id.
curl -X DELETE "https://api.desyn.app/api/v1/brand-kits/$BRAND_KIT_ID" \
-H "Authorization: Bearer $DESYN_API_KEY"{
"deleted": true
}List folders#
/foldersFolders of the workspace as a flat list with parentId.
Parameters
workspaceIdstringQueryDefaults to the key's workspace.
curl "https://api.desyn.app/api/v1/folders" \
-H "Authorization: Bearer $DESYN_API_KEY"{
"items": [
{
"id": "f1o2l3d4e5r6",
"name": "Spring launch",
"parentId": null
}
]
}Create a folder#
/foldersCreate a folder, optionally nested.
Parameters
namestringBodyRequiredFolder name.
parentIdstringBodyParent folder.
curl -X POST "https://api.desyn.app/api/v1/folders" \
-H "Authorization: Bearer $DESYN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Spring launch"
}'{
"id": "f1o2l3d4e5r6",
"name": "Spring launch",
"parentId": null
}