Skip to main content
PATCH
/
v1
/
edit
/
templates
/
{template_id}
from retab import Retab

client = Retab()

template = client.edit.templates.update(
    template_id="edittplt_abc123",
    name="Employee onboarding form v2",
)

print(template.updated_at)
{
  "id": "edittplt_abc123",
  "name": "Employee onboarding form v2",
  "file": {
    "id": "file_123",
    "filename": "blank_form.pdf",
    "mime_type": "application/pdf"
  },
  "form_fields": [
    {
      "bbox": {
        "left": 0.14,
        "top": 0.18,
        "width": 0.24,
        "height": 0.03,
        "page": 1
      },
      "description": "Employee full name",
      "type": "text",
      "key": "employee_name",
      "value": null
    }
  ],
  "field_count": 1,
  "organization_id": "org_abc123",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-16T08:45:00Z"
}
Update a template name, its saved form_fields, or both.
from retab import Retab

client = Retab()

template = client.edit.templates.update(
    template_id="edittplt_abc123",
    name="Employee onboarding form v2",
)

print(template.updated_at)
{
  "id": "edittplt_abc123",
  "name": "Employee onboarding form v2",
  "file": {
    "id": "file_123",
    "filename": "blank_form.pdf",
    "mime_type": "application/pdf"
  },
  "form_fields": [
    {
      "bbox": {
        "left": 0.14,
        "top": 0.18,
        "width": 0.24,
        "height": 0.03,
        "page": 1
      },
      "description": "Employee full name",
      "type": "text",
      "key": "employee_name",
      "value": null
    }
  ],
  "field_count": 1,
  "organization_id": "org_abc123",
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-16T08:45:00Z"
}

Authorizations

Api-Key
string
header
required

Path Parameters

template_id
string
required

Query Parameters

access_token
string | null

Body

application/json

Request model for updating an edit template. All fields are optional.

name
string | null

Name of the template

form_fields
FormField · object[] | null

List of form fields in the template

Response

Successful Response

A template defining form fields for document editing.

name
string
required

Name of the template

file
BaseMIMEData · object
required

File information for the empty PDF template this schema applies to

id
string

Unique identifier of the template

form_fields
FormField · object[]

List of form fields in the template

field_count
integer
default:0

Number of form fields in the template

organization_id
string | null

Organization that owns this template

created_at
string<date-time>

Timestamp of the creation of the template

updated_at
string<date-time>

Timestamp of the last update of the template