---
title: "Cancel template preparation"
method: POST
path: "/v1/template-jobs/{jobId}/cancel"
tags: ["templates"]
---

# Cancel template preparation

`POST /v1/template-jobs/{jobId}/cancel`

## Request

- Base URL: `https://api.cueframe.ai`
- URL: `https://api.cueframe.ai/v1/template-jobs/{jobId}/cancel`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.cueframe.ai/api/auth/mcp/authorize`, token URL `https://api.cueframe.ai/api/auth/mcp/token`, scopes: `projects:write`)
  - API key in header `PAYMENT-SIGNATURE`

Required permission: projects:write

## Path parameters

- `jobId` string, required

## Response `200`

Preparation cancelled.

- TemplateInstantiationJobResponse
  - `jobId` string, required
  - `projectId` string, nullable, required
  - `status` 'preparing' | 'ready' | 'failed' | 'cancelled', required
  - `stage` 'resolving' | 'downloading' | 'verifying' | 'importing' | 'processing' | 'attaching' | 'applying' | 'preflighting' | 'ready', required
  - `templateRef` string, required
  - `documentSha256` string, nullable, required
  - `errorCode` string
  - `errorMessage` string
  - `createdAt` string, required
  - `updatedAt` string, required

## Other responses

- `401`: Missing or invalid Authorization header.
- `402`: Payment required. Returned when the caller presents no API key on a priced operation: the body AND the `Payment-Required` header carry the x402 v2 challenge (accepted scheme, network, USDC asset, amount, payTo). Sign the EIP-3009 authorization and retry with a `PAYMENT-SIGNATURE` header. A KEYED caller sees this status instead when their plan lacks or has exhausted the feature (`billing_required`).
- `403`: Forbidden — permission insufficient.
- `404`: Resource not found.

---

[API](https://skmtc.dev/cueframe/apis/cueframe-api.md) · [All operations](https://skmtc.dev/cueframe/apis/cueframe-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cueframe/apis/cueframe-api/revisions/8f9bfe362b4a?raw)
