Skip to main content
GET
/
v1
/
edit
/
templates
from retab import Retab

client = Retab()

templates = client.edit.templates.list(limit=10)
for template in templates.data:
    print(f"{template.id}: {template.name} ({template.field_count} fields)")

filtered = client.edit.templates.list(
    filename="w9",
    mime_type="application/pdf",
    limit=20,
)
{
  "object": "list",
  "data": [
    {
      "id": "edittplt_abc123",
      "name": "W-9 2025",
      "file": {
        "id": "file_123",
        "filename": "w9.pdf",
        "mime_type": "application/pdf"
      },
      "form_fields": [],
      "field_count": 18,
      "organization_id": "org_abc123",
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:30:00Z"
    }
  ],
  "first_id": "edittplt_abc123",
  "last_id": "edittplt_abc123",
  "has_more": false
}
List saved edit templates with pagination and optional filtering by template name or MIME type.
from retab import Retab

client = Retab()

templates = client.edit.templates.list(limit=10)
for template in templates.data:
    print(f"{template.id}: {template.name} ({template.field_count} fields)")

filtered = client.edit.templates.list(
    filename="w9",
    mime_type="application/pdf",
    limit=20,
)
{
  "object": "list",
  "data": [
    {
      "id": "edittplt_abc123",
      "name": "W-9 2025",
      "file": {
        "id": "file_123",
        "filename": "w9.pdf",
        "mime_type": "application/pdf"
      },
      "form_fields": [],
      "field_count": 18,
      "organization_id": "org_abc123",
      "created_at": "2025-01-15T10:30:00Z",
      "updated_at": "2025-01-15T10:30:00Z"
    }
  ],
  "first_id": "edittplt_abc123",
  "last_id": "edittplt_abc123",
  "has_more": false
}

Query Parameters

before
string
Cursor for backward pagination.
after
string
Cursor for forward pagination.
limit
integer
default:"10"
Maximum number of templates to return. Range: 1-100.
order
string
default:"desc"
Sort order. Valid values: asc, desc.
filename
string
Case-insensitive filter on the template name.
mime_type
string
Filter by the stored template file MIME type. For templates this is typically application/pdf.
sort_by
string
default:"created_at"
Sort field. Supported values: created_at, name.

Authorizations

Api-Key
string
header
required

Query Parameters

before
string | null
after
string | null
limit
integer
default:10

Items per page

Required range: 1 <= x <= 100
order
enum<string>
default:desc
Available options:
asc,
desc
filename
string | null
mime_type
string | null
include_embeddings
boolean
default:false

Include embeddings in the response

sort_by
string
default:created_at
access_token
string | null

Response

Successful Response

data
any[]
required
list_metadata
ListMetadata · object
required