import { FirmaClient } from "@firma-dev/sdk";
const firma = new FirmaClient({ apiKey: "YOUR_API_KEY" });
const response = await firma.templates.updateTemplate({
id: "id"
});
console.log(response);curl --request PUT \
--url https://api.firma.dev/functions/v1/signing-request-api/templates/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"template_properties": {
"name": "<string>",
"description": "<string>",
"document": "aSDinaTvuI8gbWludGxpZnk=",
"document_id": "123e4567-e89b-12d3-a456-426614174000",
"expiration_hours": 2,
"settings": {
"allow_editing_before_sending": true,
"attach_pdf_on_finish": true,
"allow_download": true,
"hand_drawn_only": true,
"require_otp_verification": true,
"disable_guided_navigation": true,
"allow_presigning_download": true,
"show_qr_code": true
}
},
"users": [
{
"first_name": "<string>",
"email": "jsmith@example.com",
"order": 2,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_name": "<string>",
"phone_number": "<string>",
"street_address": "<string>",
"city": "<string>",
"state_province": "<string>",
"postal_code": "<string>",
"country": "<string>",
"title": "<string>",
"company": "<string>"
}
],
"force_remove_conditions": false,
"deleted_users": [
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reassign_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"fields": [
{
"x": 50,
"y": 50,
"width": 50,
"height": 50,
"page": 2,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": false,
"assigned_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": [
"<string>"
],
"default_to_signing_date": true,
"multi_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variable_name": "<string>",
"variable_defined_name": "<string>",
"required_conditions": {
"groups": [
{
"conditions": [
{
"field_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
]
}
]
},
"visibility_conditions": {
"groups": [
{
"conditions": [
{
"field_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
]
}
]
}
}
],
"reminders": [
{
"hours": 2,
"subject": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"all_users": false,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"documents_layout_version": 1,
"seal_participants": [
{
"seal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order": 2,
"temp_id": "<string>"
}
]
}
'import requests
url = "https://api.firma.dev/functions/v1/signing-request-api/templates/{id}"
payload = {
"template_properties": {
"name": "<string>",
"description": "<string>",
"document": "aSDinaTvuI8gbWludGxpZnk=",
"document_id": "123e4567-e89b-12d3-a456-426614174000",
"expiration_hours": 2,
"settings": {
"allow_editing_before_sending": True,
"attach_pdf_on_finish": True,
"allow_download": True,
"hand_drawn_only": True,
"require_otp_verification": True,
"disable_guided_navigation": True,
"allow_presigning_download": True,
"show_qr_code": True
}
},
"users": [
{
"first_name": "<string>",
"email": "jsmith@example.com",
"order": 2,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_name": "<string>",
"phone_number": "<string>",
"street_address": "<string>",
"city": "<string>",
"state_province": "<string>",
"postal_code": "<string>",
"country": "<string>",
"title": "<string>",
"company": "<string>"
}
],
"force_remove_conditions": False,
"deleted_users": [
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reassign_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"fields": [
{
"x": 50,
"y": 50,
"width": 50,
"height": 50,
"page": 2,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": False,
"assigned_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": ["<string>"],
"default_to_signing_date": True,
"multi_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variable_name": "<string>",
"variable_defined_name": "<string>",
"required_conditions": { "groups": [{ "conditions": [
{
"field_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
] }] },
"visibility_conditions": { "groups": [{ "conditions": [
{
"field_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
] }] }
}
],
"reminders": [
{
"hours": 2,
"subject": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"all_users": False,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"documents_layout_version": 1,
"seal_participants": [
{
"seal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order": 2,
"temp_id": "<string>"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
template_properties: {
name: '<string>',
description: '<string>',
document: 'aSDinaTvuI8gbWludGxpZnk=',
document_id: '123e4567-e89b-12d3-a456-426614174000',
expiration_hours: 2,
settings: {
allow_editing_before_sending: true,
attach_pdf_on_finish: true,
allow_download: true,
hand_drawn_only: true,
require_otp_verification: true,
disable_guided_navigation: true,
allow_presigning_download: true,
show_qr_code: true
}
},
users: [
{
first_name: '<string>',
email: 'jsmith@example.com',
order: 2,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
last_name: '<string>',
phone_number: '<string>',
street_address: '<string>',
city: '<string>',
state_province: '<string>',
postal_code: '<string>',
country: '<string>',
title: '<string>',
company: '<string>'
}
],
force_remove_conditions: false,
deleted_users: [
{
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reassign_to_user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
fields: [
{
x: 50,
y: 50,
width: 50,
height: 50,
page: 2,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
required: false,
assigned_to_user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
options: ['<string>'],
default_to_signing_date: true,
multi_group_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
variable_name: '<string>',
variable_defined_name: '<string>',
required_conditions: {
groups: [
{
conditions: [{field_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', value: '<string>'}]
}
]
},
visibility_conditions: {
groups: [
{
conditions: [{field_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', value: '<string>'}]
}
]
}
}
],
reminders: [
{
hours: 2,
subject: '<string>',
message: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
all_users: false,
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
documents_layout_version: 1,
seal_participants: [
{seal_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', order: 2, temp_id: '<string>'}
]
})
};
fetch('https://api.firma.dev/functions/v1/signing-request-api/templates/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'template_properties' => [
'name' => '<string>',
'description' => '<string>',
'document' => 'aSDinaTvuI8gbWludGxpZnk=',
'document_id' => '123e4567-e89b-12d3-a456-426614174000',
'expiration_hours' => 2,
'settings' => [
'allow_editing_before_sending' => true,
'attach_pdf_on_finish' => true,
'allow_download' => true,
'hand_drawn_only' => true,
'require_otp_verification' => true,
'disable_guided_navigation' => true,
'allow_presigning_download' => true,
'show_qr_code' => true
]
],
'users' => [
[
'first_name' => '<string>',
'email' => 'jsmith@example.com',
'order' => 2,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'last_name' => '<string>',
'phone_number' => '<string>',
'street_address' => '<string>',
'city' => '<string>',
'state_province' => '<string>',
'postal_code' => '<string>',
'country' => '<string>',
'title' => '<string>',
'company' => '<string>'
]
],
'force_remove_conditions' => false,
'deleted_users' => [
[
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'reassign_to_user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'fields' => [
[
'x' => 50,
'y' => 50,
'width' => 50,
'height' => 50,
'page' => 2,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'required' => false,
'assigned_to_user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'options' => [
'<string>'
],
'default_to_signing_date' => true,
'multi_group_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'variable_name' => '<string>',
'variable_defined_name' => '<string>',
'required_conditions' => [
'groups' => [
[
'conditions' => [
[
'field_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'value' => '<string>'
]
]
]
]
],
'visibility_conditions' => [
'groups' => [
[
'conditions' => [
[
'field_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'value' => '<string>'
]
]
]
]
]
]
],
'reminders' => [
[
'hours' => 2,
'subject' => '<string>',
'message' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'all_users' => false,
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'documents_layout_version' => 1,
'seal_participants' => [
[
'seal_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'order' => 2,
'temp_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.firma.dev/functions/v1/signing-request-api/templates/{id}"
payload := strings.NewReader("{\n \"template_properties\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"document_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"expiration_hours\": 2,\n \"settings\": {\n \"allow_editing_before_sending\": true,\n \"attach_pdf_on_finish\": true,\n \"allow_download\": true,\n \"hand_drawn_only\": true,\n \"require_otp_verification\": true,\n \"disable_guided_navigation\": true,\n \"allow_presigning_download\": true,\n \"show_qr_code\": true\n }\n },\n \"users\": [\n {\n \"first_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"order\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"last_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"street_address\": \"<string>\",\n \"city\": \"<string>\",\n \"state_province\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\"\n }\n ],\n \"force_remove_conditions\": false,\n \"deleted_users\": [\n {\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reassign_to_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"fields\": [\n {\n \"x\": 50,\n \"y\": 50,\n \"width\": 50,\n \"height\": 50,\n \"page\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required\": false,\n \"assigned_to_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"default_to_signing_date\": true,\n \"multi_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"variable_name\": \"<string>\",\n \"variable_defined_name\": \"<string>\",\n \"required_conditions\": {\n \"groups\": [\n {\n \"conditions\": [\n {\n \"field_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"visibility_conditions\": {\n \"groups\": [\n {\n \"conditions\": [\n {\n \"field_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n ],\n \"reminders\": [\n {\n \"hours\": 2,\n \"subject\": \"<string>\",\n \"message\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"all_users\": false,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"documents_layout_version\": 1,\n \"seal_participants\": [\n {\n \"seal_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order\": 2,\n \"temp_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.firma.dev/functions/v1/signing-request-api/templates/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"template_properties\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"document_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"expiration_hours\": 2,\n \"settings\": {\n \"allow_editing_before_sending\": true,\n \"attach_pdf_on_finish\": true,\n \"allow_download\": true,\n \"hand_drawn_only\": true,\n \"require_otp_verification\": true,\n \"disable_guided_navigation\": true,\n \"allow_presigning_download\": true,\n \"show_qr_code\": true\n }\n },\n \"users\": [\n {\n \"first_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"order\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"last_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"street_address\": \"<string>\",\n \"city\": \"<string>\",\n \"state_province\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\"\n }\n ],\n \"force_remove_conditions\": false,\n \"deleted_users\": [\n {\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reassign_to_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"fields\": [\n {\n \"x\": 50,\n \"y\": 50,\n \"width\": 50,\n \"height\": 50,\n \"page\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required\": false,\n \"assigned_to_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"default_to_signing_date\": true,\n \"multi_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"variable_name\": \"<string>\",\n \"variable_defined_name\": \"<string>\",\n \"required_conditions\": {\n \"groups\": [\n {\n \"conditions\": [\n {\n \"field_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"visibility_conditions\": {\n \"groups\": [\n {\n \"conditions\": [\n {\n \"field_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n ],\n \"reminders\": [\n {\n \"hours\": 2,\n \"subject\": \"<string>\",\n \"message\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"all_users\": false,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"documents_layout_version\": 1,\n \"seal_participants\": [\n {\n \"seal_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order\": 2,\n \"temp_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firma.dev/functions/v1/signing-request-api/templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_properties\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"document_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"expiration_hours\": 2,\n \"settings\": {\n \"allow_editing_before_sending\": true,\n \"attach_pdf_on_finish\": true,\n \"allow_download\": true,\n \"hand_drawn_only\": true,\n \"require_otp_verification\": true,\n \"disable_guided_navigation\": true,\n \"allow_presigning_download\": true,\n \"show_qr_code\": true\n }\n },\n \"users\": [\n {\n \"first_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"order\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"last_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"street_address\": \"<string>\",\n \"city\": \"<string>\",\n \"state_province\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\"\n }\n ],\n \"force_remove_conditions\": false,\n \"deleted_users\": [\n {\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reassign_to_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"fields\": [\n {\n \"x\": 50,\n \"y\": 50,\n \"width\": 50,\n \"height\": 50,\n \"page\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required\": false,\n \"assigned_to_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"default_to_signing_date\": true,\n \"multi_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"variable_name\": \"<string>\",\n \"variable_defined_name\": \"<string>\",\n \"required_conditions\": {\n \"groups\": [\n {\n \"conditions\": [\n {\n \"field_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"visibility_conditions\": {\n \"groups\": [\n {\n \"conditions\": [\n {\n \"field_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n ],\n \"reminders\": [\n {\n \"hours\": 2,\n \"subject\": \"<string>\",\n \"message\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"all_users\": false,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"documents_layout_version\": 1,\n \"seal_participants\": [\n {\n \"seal_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order\": 2,\n \"temp_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"seal_participants": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order": 2,
"seal": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"version": 123,
"display_name": "<string>"
},
"status": "pending",
"applied_at": "2023-11-07T05:31:56Z",
"paused_at": "2023-11-07T05:31:56Z",
"pause_reason": "seal_revoked_stop_pending",
"swapped_from_seal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"triggered_by_recipient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_kind": "dashboard",
"seal_out_of_scope": true
}
],
"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>",
"designation": "Signer",
"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",
"type": "text",
"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",
"documents": [
{
"document_id": null,
"position": 1,
"label": null,
"original_filename": null,
"page_count": 3,
"document_url": "https://api.firma.dev/storage/v1/object/sign/signing-request-documents/example.pdf?token=example",
"document_url_kind": "stored",
"document_only_hash": null
}
],
"documents_version": 123,
"documents_layout_version": 123
}{
"error": "Validation Error",
"message": "Invalid input data",
"details": {
"name": "Name is required",
"email": "Invalid email format"
}
}{
"error": "Unauthorized",
"message": "Invalid API key"
}{
"error": "Not Found",
"message": "The requested resource was not found"
}{
"error": "<string>",
"code": "ALREADY_CANCELLED",
"errors": [
{
"message": "<string>"
}
],
"message": "<string>",
"details": {}
}{
"error": "Rate Limit Exceeded",
"message": "Too many requests. Please wait before retrying.",
"details": {
"retry_after": 45
}
}Comprehensive Template Update
Comprehensive update of template including properties, users, fields, and reminders. Supports user deletion with field reassignment or deletion. All sections are optional but at least one must be provided.
Not atomic. The parts of this call are not applied as one update. Each entry of users or deleted_users that adds, moves or removes a signer or an approver is saved on its own, in the order of the request. If one of these saves is refused, the call answers at once with that error: what was saved before it stays applied and the rest of the request is not processed. Other problems (for example a user that is not found, or an invalid field or reminder) are collected and answered as one 400 VALIDATION_ERROR at the end of the call. Once a problem was collected, some of the remaining changes are skipped (the users, fields and reminders entries that follow it) and others can still be applied before the 400, and what was saved before the problem stays applied. The 400 does not always say which entries failed. Read the template again after any non-2xx response. If the read of the template’s seal participants for the response fails after the writes, the call answers 500 although the writes were applied.
Seal participants. The request property seal_participants sets the seal participants of the template. When the key is absent, the seal participants of the template are left unchanged. When it is an array, the array replaces the whole set: every seal participant the template had is removed together with the fields it owned, and one seal participant is created for each entry, so [] removes them all. Each entry is an object with seal_id (required, the ID of an organization seal), order (required, a positive integer that no other entry repeats and that is not greater than the number of recipients of the template plus the number of entries) and an optional temp_id. The recipients keep their relative order and each seal is placed at its order. null, any other value that is not an array and an entry without seal_id answer 400 VALIDATION_ERROR; an order that breaks the rules above answers 400 INVALID_SIGNING_ORDER; a seal_id that is not a UUID answers 404 NOT_FOUND; a seal of your company that is revoked or deleted answers 400 SEAL_UNAVAILABLE. Each of these answers is immediate and leaves the seal participants unchanged. seal_participants is processed after the other parts of the call, also when they collected problems, so it can be applied in a call that then answers 400 VALIDATION_ERROR.
import { FirmaClient } from "@firma-dev/sdk";
const firma = new FirmaClient({ apiKey: "YOUR_API_KEY" });
const response = await firma.templates.updateTemplate({
id: "id"
});
console.log(response);curl --request PUT \
--url https://api.firma.dev/functions/v1/signing-request-api/templates/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"template_properties": {
"name": "<string>",
"description": "<string>",
"document": "aSDinaTvuI8gbWludGxpZnk=",
"document_id": "123e4567-e89b-12d3-a456-426614174000",
"expiration_hours": 2,
"settings": {
"allow_editing_before_sending": true,
"attach_pdf_on_finish": true,
"allow_download": true,
"hand_drawn_only": true,
"require_otp_verification": true,
"disable_guided_navigation": true,
"allow_presigning_download": true,
"show_qr_code": true
}
},
"users": [
{
"first_name": "<string>",
"email": "jsmith@example.com",
"order": 2,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_name": "<string>",
"phone_number": "<string>",
"street_address": "<string>",
"city": "<string>",
"state_province": "<string>",
"postal_code": "<string>",
"country": "<string>",
"title": "<string>",
"company": "<string>"
}
],
"force_remove_conditions": false,
"deleted_users": [
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reassign_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"fields": [
{
"x": 50,
"y": 50,
"width": 50,
"height": 50,
"page": 2,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": false,
"assigned_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": [
"<string>"
],
"default_to_signing_date": true,
"multi_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variable_name": "<string>",
"variable_defined_name": "<string>",
"required_conditions": {
"groups": [
{
"conditions": [
{
"field_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
]
}
]
},
"visibility_conditions": {
"groups": [
{
"conditions": [
{
"field_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
]
}
]
}
}
],
"reminders": [
{
"hours": 2,
"subject": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"all_users": false,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"documents_layout_version": 1,
"seal_participants": [
{
"seal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order": 2,
"temp_id": "<string>"
}
]
}
'import requests
url = "https://api.firma.dev/functions/v1/signing-request-api/templates/{id}"
payload = {
"template_properties": {
"name": "<string>",
"description": "<string>",
"document": "aSDinaTvuI8gbWludGxpZnk=",
"document_id": "123e4567-e89b-12d3-a456-426614174000",
"expiration_hours": 2,
"settings": {
"allow_editing_before_sending": True,
"attach_pdf_on_finish": True,
"allow_download": True,
"hand_drawn_only": True,
"require_otp_verification": True,
"disable_guided_navigation": True,
"allow_presigning_download": True,
"show_qr_code": True
}
},
"users": [
{
"first_name": "<string>",
"email": "jsmith@example.com",
"order": 2,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_name": "<string>",
"phone_number": "<string>",
"street_address": "<string>",
"city": "<string>",
"state_province": "<string>",
"postal_code": "<string>",
"country": "<string>",
"title": "<string>",
"company": "<string>"
}
],
"force_remove_conditions": False,
"deleted_users": [
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reassign_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"fields": [
{
"x": 50,
"y": 50,
"width": 50,
"height": 50,
"page": 2,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"required": False,
"assigned_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"options": ["<string>"],
"default_to_signing_date": True,
"multi_group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"variable_name": "<string>",
"variable_defined_name": "<string>",
"required_conditions": { "groups": [{ "conditions": [
{
"field_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
] }] },
"visibility_conditions": { "groups": [{ "conditions": [
{
"field_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"value": "<string>"
}
] }] }
}
],
"reminders": [
{
"hours": 2,
"subject": "<string>",
"message": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"all_users": False,
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"documents_layout_version": 1,
"seal_participants": [
{
"seal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order": 2,
"temp_id": "<string>"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
template_properties: {
name: '<string>',
description: '<string>',
document: 'aSDinaTvuI8gbWludGxpZnk=',
document_id: '123e4567-e89b-12d3-a456-426614174000',
expiration_hours: 2,
settings: {
allow_editing_before_sending: true,
attach_pdf_on_finish: true,
allow_download: true,
hand_drawn_only: true,
require_otp_verification: true,
disable_guided_navigation: true,
allow_presigning_download: true,
show_qr_code: true
}
},
users: [
{
first_name: '<string>',
email: 'jsmith@example.com',
order: 2,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
last_name: '<string>',
phone_number: '<string>',
street_address: '<string>',
city: '<string>',
state_province: '<string>',
postal_code: '<string>',
country: '<string>',
title: '<string>',
company: '<string>'
}
],
force_remove_conditions: false,
deleted_users: [
{
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
reassign_to_user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
fields: [
{
x: 50,
y: 50,
width: 50,
height: 50,
page: 2,
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
required: false,
assigned_to_user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
options: ['<string>'],
default_to_signing_date: true,
multi_group_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
variable_name: '<string>',
variable_defined_name: '<string>',
required_conditions: {
groups: [
{
conditions: [{field_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', value: '<string>'}]
}
]
},
visibility_conditions: {
groups: [
{
conditions: [{field_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', value: '<string>'}]
}
]
}
}
],
reminders: [
{
hours: 2,
subject: '<string>',
message: '<string>',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
all_users: false,
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
}
],
documents_layout_version: 1,
seal_participants: [
{seal_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', order: 2, temp_id: '<string>'}
]
})
};
fetch('https://api.firma.dev/functions/v1/signing-request-api/templates/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'template_properties' => [
'name' => '<string>',
'description' => '<string>',
'document' => 'aSDinaTvuI8gbWludGxpZnk=',
'document_id' => '123e4567-e89b-12d3-a456-426614174000',
'expiration_hours' => 2,
'settings' => [
'allow_editing_before_sending' => true,
'attach_pdf_on_finish' => true,
'allow_download' => true,
'hand_drawn_only' => true,
'require_otp_verification' => true,
'disable_guided_navigation' => true,
'allow_presigning_download' => true,
'show_qr_code' => true
]
],
'users' => [
[
'first_name' => '<string>',
'email' => 'jsmith@example.com',
'order' => 2,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'last_name' => '<string>',
'phone_number' => '<string>',
'street_address' => '<string>',
'city' => '<string>',
'state_province' => '<string>',
'postal_code' => '<string>',
'country' => '<string>',
'title' => '<string>',
'company' => '<string>'
]
],
'force_remove_conditions' => false,
'deleted_users' => [
[
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'reassign_to_user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'fields' => [
[
'x' => 50,
'y' => 50,
'width' => 50,
'height' => 50,
'page' => 2,
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'required' => false,
'assigned_to_user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'options' => [
'<string>'
],
'default_to_signing_date' => true,
'multi_group_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'variable_name' => '<string>',
'variable_defined_name' => '<string>',
'required_conditions' => [
'groups' => [
[
'conditions' => [
[
'field_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'value' => '<string>'
]
]
]
]
],
'visibility_conditions' => [
'groups' => [
[
'conditions' => [
[
'field_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'value' => '<string>'
]
]
]
]
]
]
],
'reminders' => [
[
'hours' => 2,
'subject' => '<string>',
'message' => '<string>',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'all_users' => false,
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
],
'documents_layout_version' => 1,
'seal_participants' => [
[
'seal_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'order' => 2,
'temp_id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.firma.dev/functions/v1/signing-request-api/templates/{id}"
payload := strings.NewReader("{\n \"template_properties\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"document_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"expiration_hours\": 2,\n \"settings\": {\n \"allow_editing_before_sending\": true,\n \"attach_pdf_on_finish\": true,\n \"allow_download\": true,\n \"hand_drawn_only\": true,\n \"require_otp_verification\": true,\n \"disable_guided_navigation\": true,\n \"allow_presigning_download\": true,\n \"show_qr_code\": true\n }\n },\n \"users\": [\n {\n \"first_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"order\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"last_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"street_address\": \"<string>\",\n \"city\": \"<string>\",\n \"state_province\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\"\n }\n ],\n \"force_remove_conditions\": false,\n \"deleted_users\": [\n {\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reassign_to_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"fields\": [\n {\n \"x\": 50,\n \"y\": 50,\n \"width\": 50,\n \"height\": 50,\n \"page\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required\": false,\n \"assigned_to_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"default_to_signing_date\": true,\n \"multi_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"variable_name\": \"<string>\",\n \"variable_defined_name\": \"<string>\",\n \"required_conditions\": {\n \"groups\": [\n {\n \"conditions\": [\n {\n \"field_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"visibility_conditions\": {\n \"groups\": [\n {\n \"conditions\": [\n {\n \"field_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n ],\n \"reminders\": [\n {\n \"hours\": 2,\n \"subject\": \"<string>\",\n \"message\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"all_users\": false,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"documents_layout_version\": 1,\n \"seal_participants\": [\n {\n \"seal_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order\": 2,\n \"temp_id\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.firma.dev/functions/v1/signing-request-api/templates/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"template_properties\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"document_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"expiration_hours\": 2,\n \"settings\": {\n \"allow_editing_before_sending\": true,\n \"attach_pdf_on_finish\": true,\n \"allow_download\": true,\n \"hand_drawn_only\": true,\n \"require_otp_verification\": true,\n \"disable_guided_navigation\": true,\n \"allow_presigning_download\": true,\n \"show_qr_code\": true\n }\n },\n \"users\": [\n {\n \"first_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"order\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"last_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"street_address\": \"<string>\",\n \"city\": \"<string>\",\n \"state_province\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\"\n }\n ],\n \"force_remove_conditions\": false,\n \"deleted_users\": [\n {\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reassign_to_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"fields\": [\n {\n \"x\": 50,\n \"y\": 50,\n \"width\": 50,\n \"height\": 50,\n \"page\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required\": false,\n \"assigned_to_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"default_to_signing_date\": true,\n \"multi_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"variable_name\": \"<string>\",\n \"variable_defined_name\": \"<string>\",\n \"required_conditions\": {\n \"groups\": [\n {\n \"conditions\": [\n {\n \"field_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"visibility_conditions\": {\n \"groups\": [\n {\n \"conditions\": [\n {\n \"field_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n ],\n \"reminders\": [\n {\n \"hours\": 2,\n \"subject\": \"<string>\",\n \"message\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"all_users\": false,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"documents_layout_version\": 1,\n \"seal_participants\": [\n {\n \"seal_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order\": 2,\n \"temp_id\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.firma.dev/functions/v1/signing-request-api/templates/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"template_properties\": {\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"document\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"document_id\": \"123e4567-e89b-12d3-a456-426614174000\",\n \"expiration_hours\": 2,\n \"settings\": {\n \"allow_editing_before_sending\": true,\n \"attach_pdf_on_finish\": true,\n \"allow_download\": true,\n \"hand_drawn_only\": true,\n \"require_otp_verification\": true,\n \"disable_guided_navigation\": true,\n \"allow_presigning_download\": true,\n \"show_qr_code\": true\n }\n },\n \"users\": [\n {\n \"first_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"order\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"last_name\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"street_address\": \"<string>\",\n \"city\": \"<string>\",\n \"state_province\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"title\": \"<string>\",\n \"company\": \"<string>\"\n }\n ],\n \"force_remove_conditions\": false,\n \"deleted_users\": [\n {\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"reassign_to_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"fields\": [\n {\n \"x\": 50,\n \"y\": 50,\n \"width\": 50,\n \"height\": 50,\n \"page\": 2,\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"required\": false,\n \"assigned_to_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"options\": [\n \"<string>\"\n ],\n \"default_to_signing_date\": true,\n \"multi_group_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"variable_name\": \"<string>\",\n \"variable_defined_name\": \"<string>\",\n \"required_conditions\": {\n \"groups\": [\n {\n \"conditions\": [\n {\n \"field_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"visibility_conditions\": {\n \"groups\": [\n {\n \"conditions\": [\n {\n \"field_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n }\n }\n ],\n \"reminders\": [\n {\n \"hours\": 2,\n \"subject\": \"<string>\",\n \"message\": \"<string>\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"all_users\": false,\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ],\n \"documents_layout_version\": 1,\n \"seal_participants\": [\n {\n \"seal_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order\": 2,\n \"temp_id\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"created_date": "2023-11-07T05:31:56Z",
"seal_participants": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order": 2,
"seal": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"lineage_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"version": 123,
"display_name": "<string>"
},
"status": "pending",
"applied_at": "2023-11-07T05:31:56Z",
"paused_at": "2023-11-07T05:31:56Z",
"pause_reason": "seal_revoked_stop_pending",
"swapped_from_seal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"triggered_by_recipient_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sender_kind": "dashboard",
"seal_out_of_scope": true
}
],
"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>",
"designation": "Signer",
"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",
"type": "text",
"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",
"documents": [
{
"document_id": null,
"position": 1,
"label": null,
"original_filename": null,
"page_count": 3,
"document_url": "https://api.firma.dev/storage/v1/object/sign/signing-request-documents/example.pdf?token=example",
"document_url_kind": "stored",
"document_only_hash": null
}
],
"documents_version": 123,
"documents_layout_version": 123
}{
"error": "Validation Error",
"message": "Invalid input data",
"details": {
"name": "Name is required",
"email": "Invalid email format"
}
}{
"error": "Unauthorized",
"message": "Invalid API key"
}{
"error": "Not Found",
"message": "The requested resource was not found"
}{
"error": "<string>",
"code": "ALREADY_CANCELLED",
"errors": [
{
"message": "<string>"
}
],
"message": "<string>",
"details": {}
}{
"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.
Path Parameters
Body
Update template metadata and settings
Show child attributes
Show child attributes
Upsert users (include id to update, omit to create). An existing recipient cannot be changed between CC and Signer/Approver (400); delete it and create it again.
Show child attributes
Show child attributes
When deleting users whose fields are referenced by conditions in other fields: if true, automatically remove the condition references; if false (default), the request will be rejected with an error.
Users to delete with field handling strategy
Show child attributes
Show child attributes
Upsert fields (include id to update, omit to create)
Show child attributes
Show child attributes
Upsert reminders (include id to update, omit to create)
Show child attributes
Show child attributes
The documents_layout_version of your last read (multi-document). Required for a field write on a template with more than one document or a layout version above 1 (409 DOCUMENTS_LAYOUT_VERSION_REQUIRED); a stale value answers 409 DOCUMENT_SET_VERSION_CONFLICT; a value that is not a non-negative integer answers 400 VALIDATION_ERROR with key documents_layout_version.
x >= 0When present, the array replaces the template's whole set of seal participants and removes the fields the former ones owned; [] removes them all; omit the key to leave them unchanged. null is not accepted: it answers 400 VALIDATION_ERROR. See the operation description for the rules of each entry and the errors.
Show child attributes
Show child attributes
Response
Template updated successfully. Returns full template with all relationships. seal_participants lists only the seal participants whose seal belongs to the company of the API key: a seal participant whose seal is missing or belongs to another company is omitted, so an empty or shorter list does not prove that the template has no other seal participant stored.
A template with its seal participants: every key of Template, plus seal_participants. seal_participants lists only the seal participants whose seal belongs to the company of the API key: a seal participant whose seal is missing or belongs to another company is omitted, so an empty or shorter list does not prove that the template has no other seal participant stored.
Unique identifier for the template
Template name
255Template creation timestamp
The template's seal participants in order, limited to those whose seal belongs to the company of the API key. A seal participant whose seal is missing or belongs to another company is omitted, so an empty or shorter list does not prove that the template has no other seal participant stored.
Show child attributes
Show child attributes
Template description
Pre-signed URL to the PDF document. This is a time-limited signed URL for secure access - see document_url_expires_at for expiration time. Initial URLs are valid for 7 days; refreshed URLs are valid for 1 hour. Request a new template retrieval to get a fresh URL if expired.
ISO 8601 timestamp when the document_url will expire. After this time, the URL will return an access denied error. Fetch the template again to receive a fresh signed URL.
Number of pages in the document
x >= 1Hours until signing requests created from this template expire
x >= 1Number of credits consumed when a signing request is sent from this template. Minimum value is 1.
x >= 1Settings returned by the signing request list and detail endpoints. Templates use the TemplateSettings schema (no identity fields).
Show child attributes
Show child attributes
Template recipients (included in GET single template)
Show child attributes
Show child attributes
Template fields (included in GET single template)
Show child attributes
Show child attributes
Template last update timestamp
The template's documents in position order (multi-document; present only for companies enabled for it). On GET /templates (the list): A list entry carries no document_url. A parent whose document set has never been changed lists documents: [] here, while its single-resource GET answers its one document (with document_id null). On GET /templates/{id}, PUT /templates/{id} and POST /templates: A parent whose document set has never been changed answers its one document, with document_id null.
Show child attributes
Show child attributes
Version of the document set, raised by every document change (multi-document; enabled companies only).
Version of the document layout, raised when documents are added, removed or reordered (multi-document; enabled companies only). Field writes on a signing request with more than one document send it back as documents_layout_version.
Was this page helpful?