@firma-dev/sdk
import { FirmaClient } from "@firma-dev/sdk";
const firma = new FirmaClient({ apiKey: "YOUR_API_KEY" });
const response = await firma.templates.listTemplates();
console.log(response);curl --request GET \
--url https://api.firma.dev/functions/v1/signing-request-api/templates \
--header 'Authorization: <api-key>'import requests
url = "https://api.firma.dev/functions/v1/signing-request-api/templates"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.firma.dev/functions/v1/signing-request-api/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.firma.dev/functions/v1/signing-request-api/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.firma.dev/functions/v1/signing-request-api/templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.firma.dev/functions/v1/signing-request-api/templates")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firma.dev/functions/v1/signing-request-api/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"description": "<string>",
"document_url": "<string>",
"document_url_expires_at": "2023-11-07T05:31:56Z",
"page_count": 2,
"expiration_hours": 168,
"credit_cost": 1,
"settings": {
"allow_download": true,
"attach_pdf_on_finish": true,
"allow_editing_before_sending": false,
"use_signing_order": true,
"hand_drawn_only": false,
"send_signing_email": true,
"send_finish_email": true,
"send_expiration_email": true,
"send_cancellation_email": true,
"require_otp_verification": null,
"disable_guided_navigation": true,
"allow_presigning_download": true,
"show_qr_code": true,
"identity_editable_fields": [
"<string>"
],
"notify_identity_change_email": false
},
"recipients": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"first_name": "<string>",
"order": 2,
"name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"street_address": "<string>",
"city": "<string>",
"state_province": "<string>",
"postal_code": "<string>",
"country": "<string>",
"title": "<string>",
"company": "<string>",
"required_fields": [
"<string>"
],
"missing_fields": [
"<string>"
],
"required_read_only_fields": [
{
"variable_name": "<string>",
"variable_defined_name": "<string>",
"field_type": "<string>"
}
],
"ready_to_send": true
}
],
"fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_number": 2,
"required": true,
"recipient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variable_name": "<string>",
"variable_defined_name": "<string>",
"position": {
"x": 50,
"y": 50,
"width": 50,
"height": 50
},
"dropdown_options": [
"<string>"
],
"multi_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date_default": "2023-12-25",
"date_signing_default": true,
"format_rules": {
"dateFormat": "MMMM dd, yyyy"
},
"validation_rules": {},
"read_only": false,
"read_only_value": "<string>"
}
],
"updated_date": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"current_page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123
}
}{
"error": "Unauthorized",
"message": "Invalid API key"
}{
"error": "Rate Limit Exceeded",
"message": "Too many requests. Please wait before retrying.",
"details": {
"retry_after": 45
}
}Templates
List Templates
Retrieve a paginated list of templates
GET
/
templates
@firma-dev/sdk
import { FirmaClient } from "@firma-dev/sdk";
const firma = new FirmaClient({ apiKey: "YOUR_API_KEY" });
const response = await firma.templates.listTemplates();
console.log(response);curl --request GET \
--url https://api.firma.dev/functions/v1/signing-request-api/templates \
--header 'Authorization: <api-key>'import requests
url = "https://api.firma.dev/functions/v1/signing-request-api/templates"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.firma.dev/functions/v1/signing-request-api/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.firma.dev/functions/v1/signing-request-api/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.firma.dev/functions/v1/signing-request-api/templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.firma.dev/functions/v1/signing-request-api/templates")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firma.dev/functions/v1/signing-request-api/templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"results": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"description": "<string>",
"document_url": "<string>",
"document_url_expires_at": "2023-11-07T05:31:56Z",
"page_count": 2,
"expiration_hours": 168,
"credit_cost": 1,
"settings": {
"allow_download": true,
"attach_pdf_on_finish": true,
"allow_editing_before_sending": false,
"use_signing_order": true,
"hand_drawn_only": false,
"send_signing_email": true,
"send_finish_email": true,
"send_expiration_email": true,
"send_cancellation_email": true,
"require_otp_verification": null,
"disable_guided_navigation": true,
"allow_presigning_download": true,
"show_qr_code": true,
"identity_editable_fields": [
"<string>"
],
"notify_identity_change_email": false
},
"recipients": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"first_name": "<string>",
"order": 2,
"name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"street_address": "<string>",
"city": "<string>",
"state_province": "<string>",
"postal_code": "<string>",
"country": "<string>",
"title": "<string>",
"company": "<string>",
"required_fields": [
"<string>"
],
"missing_fields": [
"<string>"
],
"required_read_only_fields": [
{
"variable_name": "<string>",
"variable_defined_name": "<string>",
"field_type": "<string>"
}
],
"ready_to_send": true
}
],
"fields": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"page_number": 2,
"required": true,
"recipient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variable_name": "<string>",
"variable_defined_name": "<string>",
"position": {
"x": 50,
"y": 50,
"width": 50,
"height": 50
},
"dropdown_options": [
"<string>"
],
"multi_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"date_default": "2023-12-25",
"date_signing_default": true,
"format_rules": {
"dateFormat": "MMMM dd, yyyy"
},
"validation_rules": {},
"read_only": false,
"read_only_value": "<string>"
}
],
"updated_date": "2023-11-07T05:31:56Z"
}
],
"pagination": {
"current_page": 123,
"page_size": 123,
"total_count": 123,
"total_pages": 123
}
}{
"error": "Unauthorized",
"message": "Invalid API key"
}{
"error": "Rate Limit Exceeded",
"message": "Too many requests. Please wait before retrying.",
"details": {
"retry_after": 45
}
}Authorizations
API key for authentication. Use your API key directly without any prefix (e.g., 'your-api-key'). Bearer prefix is optional but not required.
Query Parameters
Page number
Required range:
x >= 1Items per page
Required range:
1 <= x <= 200Filter by template name (partial match, case-insensitive)
Filter templates created after this date (ISO 8601 format)
Filter templates created before this date (ISO 8601 format)
Field to sort by
Available options:
name, created_on, last_changed_on Sort order
Available options:
asc, desc Was this page helpful?
⌘I