---
title: "Update a template"
description: "Update a template"
url: https://docs.invoicefalcon.com/api/templates/update-a-template/
api: "API v1 reference"
method: PATCH
path: "/templates/{id}"
---

# Update a template

`PATCH https://app.invoicefalcon.com/api/v1/external/templates/{id}`

Update a template

## Path parameters

- `id` (integer, required)

## Request body

- `template` (object, required)
  - `name` (string): e.g. `Default invoice`
  - `template_type` (string): e.g. `invoice` One of: `invoice`, `packing_slip`, `credit_note`.
  - `accent_color` (string): e.g. `#0B7285`
  - `font_family` (string): e.g. `Helvetica`
  - `font_size` (integer): e.g. `11`
  - `date_format` (string): e.g. `%d %b %Y`
  - `invoice_number_prefix` (string): e.g. `INV-`
  - `logo_url` (string): e.g. `https://example.com/logo.png`
  - `logo_width` (integer): e.g. `120`
  - `logo_enabled` (boolean): e.g. `true`
  - `pre_selected_orders` (boolean): e.g. `true`
  - `pre_selected_draft_orders` (boolean): e.g. `false`
  - `pre_selected_pos_orders` (boolean): e.g. `false`
  - `pre_selected_credit_notes` (boolean): e.g. `false`

## Returns

The [template object](https://docs.invoicefalcon.com/api/templates/).

Rate limit: this call costs 2 points ([rate limits](https://docs.invoicefalcon.com/docs/rate-limiting/)).

## Example request

```sh
curl -X PATCH "https://app.invoicefalcon.com/api/v1/external/templates/{id}" \
  -H "X-Auth-Token: $INVOICE_FALCON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template": {
      "id": 311,
      "name": "Default invoice",
      "template_type": "invoice",
      "design_key": "classic",
      "pre_selected_orders": true,
      "pre_selected_draft_orders": false,
      "pre_selected_pos_orders": false,
      "pre_selected_credit_notes": false,
      "accent_color": "#0B7285",
      "font_family": "Helvetica",
      "font_size": 11,
      "date_format": "%d %b %Y",
      "invoice_number_prefix": "INV-",
      "logo_url": "https://example.com/logo.png",
      "logo_width": 120,
      "logo_enabled": true,
      "created_at": "2025-11-03T14:02:00Z",
      "updated_at": "2026-01-16T10:05:00Z"
    }
  }'
```

## 200

Template updated.

```json
{
  "template": {
    "id": 311,
    "name": "Default invoice",
    "template_type": "invoice",
    "design_key": "classic",
    "pre_selected_orders": true,
    "pre_selected_draft_orders": false,
    "pre_selected_pos_orders": false,
    "pre_selected_credit_notes": false,
    "accent_color": "#0B7285",
    "font_family": "Helvetica",
    "font_size": 11,
    "date_format": "%d %b %Y",
    "invoice_number_prefix": "INV-",
    "logo_url": "https://example.com/logo.png",
    "logo_width": 120,
    "logo_enabled": true,
    "created_at": "2025-11-03T14:02:00Z",
    "updated_at": "2026-01-16T10:05:00Z"
  }
}
```

## 401

Missing or invalid API key.

```json
{
  "error": "Invalid API key"
}
```

## 403

The store is not on a paid plan. API access requires a paid Invoice Falcon plan.

```json
{
  "error": "REST API access requires a paid plan"
}
```

## 404

Resource not found.

```json
{
  "error": "Not found"
}
```

## 422

Request could not be processed.

```json
{
  "error": "param is missing or the value is empty: customer",
  "errors": {}
}
```

## 429

Rate limit exceeded. Check `X-RateLimit-Reset` header.

```json
{
  "error": "Rate limit exceeded",
  "retry_after": 30,
  "message": "You have exceeded the rate limit of 40 points per 60 seconds. Read requests cost 1 point(s) and write requests cost 2 point(s). Please retry after 30 second(s)."
}
```

