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

client = Retab()

duplicate = client.edit.templates.duplicate(
    template_id="edittplt_abc123",
    name="Employee onboarding form copy",
)

print(duplicate.id)
{
  "id": "edittplt_copy123",
  "name": "Employee onboarding form copy",
  "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-16T09:00:00Z",
  "updated_at": "2025-01-16T09:00:00Z"
}
Create a copy of an existing template. If name is omitted, the API defaults to "<original> (copy)".
from retab import Retab

client = Retab()

duplicate = client.edit.templates.duplicate(
    template_id="edittplt_abc123",
    name="Employee onboarding form copy",
)

print(duplicate.id)
{
  "id": "edittplt_copy123",
  "name": "Employee onboarding form copy",
  "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-16T09:00:00Z",
  "updated_at": "2025-01-16T09:00: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 duplicating an edit template.

name
string | null

Name for the duplicated template. Defaults to ' (copy)'

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