Skip to main content
PATCH
/
v1
/
templates
/
{id}
Update a Template
curl --request PATCH \
  --url https://reporter.sandbox.lerian.net/v1/templates/{id} \
  --header 'Content-Type: multipart/form-data' \
  --header 'X-Organization-id: <x-organization-id>' \
  --form template='@example-file' \
  --form outputFormat=HTML \
  --form 'description=Financial Report'
{
  "id": "0196b1d2-399c-7aff-8941-3ea99d1525d4",
  "outputFormat": "HTML",
  "description": "Financial Report",
  "fileName": "0196b1d2-399c-7aff-8941-3ea99d1525d4.tpl",
  "createdAt": "2025-05-08T21:34:26.716Z",
  "updatedAt": "2025-05-08T21:50:24.844Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt

Use this file to discover all available pages before exploring further.

Headers

Authorization
string

The authorization token in the 'Bearer ' format.

Important: This header is required if your environment has Access Manager enabled. For more information, refer to the Access Manager documentation.

Content-Type
string
required

The request content type. Important: For this endpoint, it must be multipart/form-data.

X-Organization-id
string
required

The unique identifier of the Organization associated with the request.

Path Parameters

id
string
required

Unique identifier of the template that you want to retrieve (UUID).

Body

multipart/form-data
template
file

The new .tpl file. Optional. When provided without outputFormat, the file is validated against the template's existing outputFormat.

outputFormat
enum<string>

The output format generated by the new template. Optional. Only accepted together with a new template file. Sending outputFormat without template returns a 400 error.

Available options:
HTML,
CSV,
XML,
PDF,
TXT
description
string

A brief description of the template. Optional.

Response

Indicates that the template was successfully updated.

Details about the template that was created or updated.

id
string

Unique ID that identifies the template (UUID format).

outputFormat
string

The format of the generated output (e.g., HTML, CSV, PDF, TXT, XML).

description
string

Briefly describes what the template is for or what it contains.

fileName
string

The name of the template file as stored in the system. Follows the <template_id>.tpl format.

createdAt
string

Timestamp indicating when the template was created.

updatedAt
string

Timestamp indicating the last time the template was updated.

warnings
object[]

Returned when schema validation could not fully validate one or more data sources referenced by the template. The create or update operation still succeeds. Absent when no warnings were produced.