from retab import Retab
client = Retab()
templates = client.edits.templates.list(limit=20, order="desc")
for template in templates.data:
print(f"{template.id}: {template.name} ({template.field_count} fields)")
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const templates = await client.edits.templates.list({
limit: 20,
order: "desc",
});
for (const template of templates.data) {
console.log(`${template.id}: ${template.name}`);
}
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
templates, err := client.Edits.Templates.List(ctx, &retab.EditTemplatesListParams{
PaginationParams: retab.PaginationParams{Limit: ptr(20), Order: ptr("desc")},
})
if err != nil {
log.Fatal(err)
}
for _, template := range templates.Data {
fmt.Printf("%s: %s (%v fields)\n", template.ID, template.Name, template.FieldCount)
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
templates = client.edits.templates.list(limit: 20, order: 'desc')
templates.data.each do |template|
puts "#{template.id}: #{template.name} (#{template.field_count} fields)"
end
use retab::enums::EditTemplatesOrder;
use retab::resources::edit_templates::ListParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let templates = client
.edits().templates()
.list(ListParams {
limit: Some(20),
order: Some(EditTemplatesOrder::Desc),
..Default::default()
})
.await?;
for template in &templates.data {
println!(
"{}: {} ({} fields)",
template.id,
template.name,
template.field_count.unwrap_or_default()
);
}
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->edits()->templates()->list();
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Edits.Templates.ListAsync(new EditTemplatesListOptions());
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.edits().templates().list(null, null, 10L, null, "Invoice Processing", "created_at");
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/edits/templates?limit=20&order=desc' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"data": [
{
"id": "edittplt_abc123",
"name": "W-9 Form",
"file": {
"id": "file_6dd6eb00688ad8d1",
"filename": "w9_empty.pdf",
"mime_type": "application/pdf"
},
"form_fields": [],
"field_count": 7,
"created_at": "2024-03-15T10:30:00Z",
"updated_at": "2024-03-15T10:30:00Z"
}
],
"list_metadata": {
"before": null,
"after": "edittplt_abc123"
}
}
Templates
List Templates
List edit templates.
Returns a paginated list of edit templates. Filter by name
(case-insensitive substring match) and order results by sort_by
(created_at or name). Page with before/after cursors, limit, and
order. Form fields are omitted from list items; fetch a single template to
retrieve them.
GET
/
v1
/
edits
/
templates
from retab import Retab
client = Retab()
templates = client.edits.templates.list(limit=20, order="desc")
for template in templates.data:
print(f"{template.id}: {template.name} ({template.field_count} fields)")
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const templates = await client.edits.templates.list({
limit: 20,
order: "desc",
});
for (const template of templates.data) {
console.log(`${template.id}: ${template.name}`);
}
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
templates, err := client.Edits.Templates.List(ctx, &retab.EditTemplatesListParams{
PaginationParams: retab.PaginationParams{Limit: ptr(20), Order: ptr("desc")},
})
if err != nil {
log.Fatal(err)
}
for _, template := range templates.Data {
fmt.Printf("%s: %s (%v fields)\n", template.ID, template.Name, template.FieldCount)
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
templates = client.edits.templates.list(limit: 20, order: 'desc')
templates.data.each do |template|
puts "#{template.id}: #{template.name} (#{template.field_count} fields)"
end
use retab::enums::EditTemplatesOrder;
use retab::resources::edit_templates::ListParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let templates = client
.edits().templates()
.list(ListParams {
limit: Some(20),
order: Some(EditTemplatesOrder::Desc),
..Default::default()
})
.await?;
for template in &templates.data {
println!(
"{}: {} ({} fields)",
template.id,
template.name,
template.field_count.unwrap_or_default()
);
}
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->edits()->templates()->list();
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Edits.Templates.ListAsync(new EditTemplatesListOptions());
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.edits().templates().list(null, null, 10L, null, "Invoice Processing", "created_at");
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/edits/templates?limit=20&order=desc' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"data": [
{
"id": "edittplt_abc123",
"name": "W-9 Form",
"file": {
"id": "file_6dd6eb00688ad8d1",
"filename": "w9_empty.pdf",
"mime_type": "application/pdf"
},
"form_fields": [],
"field_count": 7,
"created_at": "2024-03-15T10:30:00Z",
"updated_at": "2024-03-15T10:30:00Z"
}
],
"list_metadata": {
"before": null,
"after": "edittplt_abc123"
}
}
List templates registered for your organization.
form_fields is omitted from the list response for performance — fetch a single template with GET /v1/edits/templates/{template_id} to see the full field list.
from retab import Retab
client = Retab()
templates = client.edits.templates.list(limit=20, order="desc")
for template in templates.data:
print(f"{template.id}: {template.name} ({template.field_count} fields)")
import { Retab } from "@retab/node";
const client = new Retab({ apiKey: process.env.RETAB_API_KEY });
const templates = await client.edits.templates.list({
limit: 20,
order: "desc",
});
for (const template of templates.data) {
console.log(`${template.id}: ${template.name}`);
}
package main
import (
"context"
"fmt"
"log"
retab "github.com/retab-dev/retab/clients/go"
)
func ptr[T any](v T) *T { return &v }
func main() {
ctx := context.Background()
client, err := retab.NewClient("")
if err != nil {
log.Fatal(err)
}
templates, err := client.Edits.Templates.List(ctx, &retab.EditTemplatesListParams{
PaginationParams: retab.PaginationParams{Limit: ptr(20), Order: ptr("desc")},
})
if err != nil {
log.Fatal(err)
}
for _, template := range templates.Data {
fmt.Printf("%s: %s (%v fields)\n", template.ID, template.Name, template.FieldCount)
}
}
require 'retab'
client = Retab::Client.new(api_key: ENV['RETAB_API_KEY'])
templates = client.edits.templates.list(limit: 20, order: 'desc')
templates.data.each do |template|
puts "#{template.id}: #{template.name} (#{template.field_count} fields)"
end
use retab::enums::EditTemplatesOrder;
use retab::resources::edit_templates::ListParams;
use retab::Retab;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Retab::new(std::env::var("RETAB_API_KEY")?);
let templates = client
.edits().templates()
.list(ListParams {
limit: Some(20),
order: Some(EditTemplatesOrder::Desc),
..Default::default()
})
.await?;
for template in &templates.data {
println!(
"{}: {} ({} fields)",
template.id,
template.name,
template.field_count.unwrap_or_default()
);
}
Ok(())
}
<?php
require 'vendor/autoload.php';
use Retab\Client;
$client = new Client(apiKey: getenv('RETAB_API_KEY'));
$result = $client->edits()->templates()->list();
print_r($result);
using Retab;
using RetabClient = Retab.Retab;
var apiKey = Environment.GetEnvironmentVariable("RETAB_API_KEY")!;
var client = new RetabClient(apiKey);
var result = await client.Edits.Templates.ListAsync(new EditTemplatesListOptions());
Console.WriteLine(result);
import com.retab.RetabClient;
public final class Example {
public static void main(String[] args) throws Exception {
RetabClient client = new RetabClient(System.getenv("RETAB_API_KEY"));
var result = client.edits().templates().list(null, null, 10L, null, "Invoice Processing", "created_at");
System.out.println(result);
}
}
curl -X GET \
'https://api.retab.com/v1/edits/templates?limit=20&order=desc' \
-H "Authorization: Bearer $RETAB_API_KEY"
{
"data": [
{
"id": "edittplt_abc123",
"name": "W-9 Form",
"file": {
"id": "file_6dd6eb00688ad8d1",
"filename": "w9_empty.pdf",
"mime_type": "application/pdf"
},
"form_fields": [],
"field_count": 7,
"created_at": "2024-03-15T10:30:00Z",
"updated_at": "2024-03-15T10:30:00Z"
}
],
"list_metadata": {
"before": null,
"after": "edittplt_abc123"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Required range:
1 <= x <= 100Available options:
asc, desc Response
Successful Response
A page of EditTemplate resources. data holds the items and list_metadata carries the before/after cursors; pass after to fetch the next page.
⌘I