Skip to Content
SeyloDocs
API referenceTemplates

Preview what a template creates

POST
/api/v1/templates.preview

Runs the template's generate() in the sandbox with the form values and returns the services it would create in the project, with conflicts and warnings. Creates nothing. It is a POST (mutation) only because the form values do not fit a query string.

Needs services.create on the project. Available to MCP clients and the assistant.

Authorization

cookieseylo_session<token>

Request Body

application/json
  1. body
projectId*string

Panel-issued id.

Match^[a-z0-9]{16}$
slug*string
Match^[a-z0-9][a-z0-9-]*$
Length1 <= length <= 60
name*string

DNS-safe; the service's host name on the project network. Unique in its project.

Match^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
Length1 <= length <= 40
nodeId*string

Panel-issued id.

Match^[a-z0-9]{16}$
values*

Response Body

Success.

application/json
  1. response
services*array<>
warnings*array<string>
Example Request
curl -X POST 'https://example.com/api/v1/templates.preview' \  -H 'Content-Type: application/json' \  -d '{  "projectId": "string",  "slug": "string",  "name": "string",  "nodeId": "string",  "values": {}}'
Example Response
{  "services": [    {      "name": "string",      "kind": "app",      "image": "string",      "ports": [        1      ],      "internalOnly": true,      "domains": [        "string"      ],      "envKeys": [        "string"      ],      "volumes": [        {          "name": "string",          "mountPath": "string"        }      ],      "conflict": true    }  ],  "warnings": [    "string"  ]}