Skip to main content
POST
/
templates
Create Template
curl --request POST \
  --url https://api.firma.dev/functions/v1/signing-request-api/templates \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Employment Contract Template",
  "description": "Standard employment contract for new hires",
  "document": "JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL1Jlc291c...",
  "expiration_hours": 168,
  "settings": {
    "allow_editing_before_sending": false,
    "attach_pdf_on_finish": true,
    "allow_download": true,
    "use_signing_order": true
  }
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>",
  "date_created": "2023-11-07T05:31:56Z",
  "date_changed": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API key for authentication. Use your API key directly without any prefix (e.g., 'your-api-key'). Bearer prefix is optional but not required.

Body

application/json
name
string
required

Template name

Maximum length: 255
Example:

"Employment Contract Template"

document
string<byte>
required

Base64-encoded PDF document. Maximum size: 20MB. The API will automatically extract the page count from the document.

Example:

"JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL1Jlc291c..."

description
string

Template description

Example:

"Standard employment contract for new hires"

expiration_hours
integer
default:168

Hours until signing request expires

Example:

168

settings
object

Response

Template created successfully

id
string<uuid>

Unique identifier for the template

name
string

Template name

Maximum length: 255
description
string | null

Template description

date_created
string<date-time>

Template creation timestamp

date_changed
string<date-time>

Template last update timestamp