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

client = Retab()

template = client.edits.templates.update(
    "edittplt_abc123",
    name="W-9 Form (2024)",
)
print(template.name)
{
  "id": "edittplt_abc123",
  "name": "W-9 Form (2024)",
  "file": {
    "id": "file_6dd6eb00688ad8d1",
    "filename": "w9_empty.pdf",
    "mime_type": "application/pdf"
  },
  "form_fields": [
    {
      "key": "full_name",
      "description": "Full legal name",
      "type": "text",
      "bbox": {
        "left": 0.15,
        "top": 0.2,
        "width": 0.35,
        "height": 0.03,
        "page": 1
      }
    }
  ],
  "field_count": 1,
  "created_at": "2024-03-15T10:30:00Z",
  "updated_at": "2024-03-15T11:15:00Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.retab.com/llms.txt

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

Update the name and/or the form fields of an existing template. Both fields are optional; only supplied values are overwritten. Supplying form_fields replaces the entire list.
from retab import Retab

client = Retab()

template = client.edits.templates.update(
    "edittplt_abc123",
    name="W-9 Form (2024)",
)
print(template.name)
{
  "id": "edittplt_abc123",
  "name": "W-9 Form (2024)",
  "file": {
    "id": "file_6dd6eb00688ad8d1",
    "filename": "w9_empty.pdf",
    "mime_type": "application/pdf"
  },
  "form_fields": [
    {
      "key": "full_name",
      "description": "Full legal name",
      "type": "text",
      "bbox": {
        "left": 0.15,
        "top": 0.2,
        "width": 0.35,
        "height": 0.03,
        "page": 1
      }
    }
  ],
  "field_count": 1,
  "created_at": "2024-03-15T10:30:00Z",
  "updated_at": "2024-03-15T11:15:00Z"
}

Authorizations

Api-Key
string
header
required

Path Parameters

template_id
string
required

Body

application/json

Body for updating an edit template. Only the supplied fields (name, form_fields) are changed.

name
string | null

New name for the template.

form_fields
FormField · object[] | null

Replacement list of form fields.

Response

Successful Response

A reusable edit template: an empty PDF and the form_fields defined on it.

id
string
required

Unique identifier of the template.

name
string
required

Name of the template.

file
FileRef · object
required

File information for the empty PDF template.

form_fields
FormField · object[] | null

Form fields attached to the template.

field_count
integer | null
default:0

Number of form fields in the template.

created_at
string<date-time> | null

Timestamp of creation.

updated_at
string<date-time> | null

Timestamp of last update.