---
title: "Publish template (Admin); audit event; refused unless a qualification record binds it to an admitted machine"
method: POST
path: "/api/v1/admin/templates/{templateId}/publish"
tags: ["admin"]
---

# Publish template (Admin); audit event; refused unless a qualification record binds it to an admitted machine

`POST /api/v1/admin/templates/{templateId}/publish`

## Request

- Base URL: `https://amplerun-api.spiry.org`
- URL: `https://amplerun-api.spiry.org/api/v1/admin/templates/{templateId}/publish`
- Auth: HTTP bearer

D-19(b)/(c). Admin session; no step-up required. 409 when no qualification_records row binds the template to at least one admitted machine; fixtures never publish.

## Path parameters

- `templateId` string, uuid, required

## Headers

- `Idempotency-Key` string, uuid, required

## Request body

- object
  - `reason` string, required

## Response `202`

Publish accepted; audit event recorded.

## Other responses

- `default`: Error envelope. 401 unauthenticated, 403/404 forbidden, 409 conflict, 422 invalid input, 429 rate limited (code UNAVAILABLE, retryable:true, no Retry-After header), 503 unavailable money/provider state with retryable:true.

---

[API](https://skmtc.dev/amplerun/apis/amplerun-business-api.md) · [All operations](https://skmtc.dev/amplerun/apis/amplerun-business-api/llms.txt) · [OpenAPI document](https://skmtc.dev/amplerun/apis/amplerun-business-api/revisions/40944687fa52?raw)
