---
search:
  tags:
    - Certificates
    - PUT
seo:
  description: >-
    The draft's background must be null, the… Reference for the PUT
    /api/admin/certificates/templates/{id}/draft endpoint in the Athena
    Attack/Defence Admin API.
sidebar:
  label: Save a certificate template's draft layout
  badge: PUT
title: Save a certificate template's draft layout
type: openapi-operation
---
The draft's `background` must be `null`, the stored one, or exactly the background of one of this template's published versions (restoring a version); a new background is set only through `POST /certificates/templates/{id}/background`. Anything else answers 409.

`PUT /api/admin/certificates/templates/{id}/draft`

**Request body** (`application/json`, required)

- `spec` (object, required)

Request body example:

```json
{
  "spec": {
    "specVersion": 1,
    "pageSize": "a4_landscape",
    "size": {
      "w": 1,
      "h": 1
    },
    "background": {
      "fileId": "string",
      "contentType": "image/png",
      "width": 1,
      "height": 1,
      "byteSize": 1
    },
    "elements": [
      {
        "id": "string",
        "type": "text",
        "value": "string",
        "font": "inter-regular",
        "size": 4,
        "x": 0,
        "y": 0,
        "align": "left",
        "color": "string",
        "autoFit": true,
        "maxWidth": 1
      }
    ]
  }
}
```

**Responses**

- `200` — Success
- `401` — Unauthorized
- `404` — Response for status 404
- `409` — Response for status 409
- `422` — Validation failed
- `500` — Unhandled server error

Response example, 200:

```json
{
  "success": true
}
```
