Skip to main content
GET
This call returns what the platform proposes to put in a template made from an application or a stack: for each member, its variables with a suggested treatment and the files of its /app with what is selected by default. It never returns a value, and it creates nothing. Use it to build the review that comes before Create Template from App or Create Template from Stack. There are two routes with the same response: GET /v1/templates/from-app/{app_id}/draft for one application and GET /v1/templates/from-stack/{stack_id}/draft for a stack. Needs the templates:write scope when called with an API key. The application of a closed template and the one that came from a share link cannot be saved, so the draft is refused for them like the save is. The draft of a stack does not offer the connection variables: they are rewritten as placeholders on their own.
string
required
The application ID, on the from-app route.
string
required
The stack ID, on the from-stack route.
string
If the application or stack belongs to a workspace, the workspace’s ID.

Response

object
The draft.

Error Responses

string
The error code indicating the reason for the failure. Possible values:
  • API_KEY_SCOPE_DENIED: The API key does not have the templates:write scope (403).
  • APP_NOT_FOUND: The application does not exist or is not yours.
  • STACK_NOT_FOUND: The stack does not exist or is not yours.
  • TEMPLATE_SAVE_NOT_ALLOWED: The application came from a share link, or runs a platform image (403).
  • TEMPLATE_CLOSED: The application comes from a closed template (403).
  • PLAN_DOES_NOT_SUPPORT_CUSTOM_IMAGES: The plan cannot create templates.
  • WORKSPACE_OWNER_ONLY: Only the workspace owner works with templates in it.
Last modified on October 28, 2026