Delete a template page
Remove one page from a template, and from every flow that uses it.
DELETE /api/templates/{templateId}/pages/{pageId}Requires templates:update. With withTemplate set to "true", it also requires templates:delete.
| Field | Required | Description |
|---|---|---|
workspace | Yes | Workspace slug or id. |
withTemplate | No | The string "true" deletes the whole template with the page. "false" or left out deletes only the page. |
curl --request DELETE "https://app.kalpana.one/api/templates/tpl_123/pages/page_456" \
--header "x-api-key: $KALPANA_API_KEY" \
--header "content-type: application/json" \
--data '{"workspace":"acme"}'Response
{
"updatedAt": "2026-09-01T10:05:00.000Z",
"nextPageId": "page_789"
}nextPageId is the page that takes the deleted page's place in the list: the next page, or the previous one when the last page was deleted. updatedAt is the template's new updatedAt.
A template keeps at least one page, so deleting its only page fails with 400. To remove a template together with its last page, send withTemplate as "true". The template is then deleted as in Delete a template, nextPageId is null and updatedAt is the time of deletion.
The page leaves every flow that uses it. A flow left with no pages stays, empty, under its name. When the first page is deleted, the next page becomes the first, and its previews become the template's.
Errors
| Status | Cause |
|---|---|
400 | The page is the template's only page and withTemplate is not "true". |
403 | Your role or key lacks templates:update, or templates:delete when withTemplate is "true". |
404 | The template is not in this workspace or has been deleted, or the page is not one of its pages. |
Updated 4 Nov 2026