Create a transaction from a template

You can only create a transaction only from a published template.

Note that when creating a transaction from a template, only the template_id parameter is required. All other parameters are optional, unless they are requested by the template creator.

To create a transaction from a template, send a request to POST /v1/transactions/template and set the template_id argument.

curl 
https://api.universign.com/v1/transactions/template \
-d template_id=tpl_agMgvOzLya3k \
-d folder_id=fol_JxmJlV5P922X \
-d name=Contract John \
-d participants[$1707755519455].email=john.doe@universign.com \
-d documents[doc_LwmW].file=file_5XKzyVPLrv41ClDmDlVyKdvey \
-d documents[doc_LwmW].name=Contract template.pdf \
-d fields[fld_BJDO].x=255 \
-d fields[fld_BJDO].y=164 \
-d fields[fld_BJDO].page=1

In this request example, the template creator requested:

  • an unknown participant to be defined,
  • a specimen to be replaced by the final document to be signed.

The API returns a transaction object.

{
  "object" : "transaction",
  "id" : "tx_DdLq4OvLXwyd",
  "folder_id" : "fol_JxmJlV5P922X",
  "created_at" : "2024-02-12T16:40:03Z",
  "started_at" : "2024-02-12T16:40:04Z",
  "expires_at" : "2024-02-26T16:40:04Z",
  "name" : "Contract",
  "folder_name" : "Default folder",
  "stalled" : false,
  "language" : "fr",
  "creator" : {
    "workspace_name" : "DemoWS",
    "api_key_name" : "ApiRefKey"
  },
  "state" : "started",
  "participants" : [ {
    "email" : "john.doe@universign.com",
    "phone_number_type" : "suggestion",
    "min_signature_level" : "level1",
    "schedule" : [ 0 ],
    "ongoing_conversation" : false,
    "has_unread_message" : false,
    "state" : "open",
    "waiting_period" : 0,
    "full_name_type" : "suggestion"
  } ],
  "watchers" : [ ],
  "sealers" : [ ],
  "documents" : [ {
    "id" : "doc_6A4Q",
    "name" : "Specimen 1",
    "editable" : true,
    "updatable" : true,
    "deletable" : false,
    "fields" : [ {
      "id" : "fld_mEZr",
      "position" : {
        "page" : 1,
        "x" : 255,
        "y" : 164,
        "width" : 200,
        "height" : 50
      },
      "type" : "signature",
      "built_in" : false,
      "consents" : [ ],
      "optional_consents" : [ ],
      "updatable" : true,
      "deletable" : false
    } ]
  } ],
  "instructions" : {
    "signatures" : [ {
      "signer" : "john.doe@universign.com",
      "field" : "fld_mEZr"
    } ],
    "reviews" : [ ],
    "captures" : [ ],
    "sequencing" : [ ],
    "editions" : [ ]
  },
  "actions" : [ {
    "id" : "act_oXMk58w6Yaako",
    "actor" : "john.doe@universign.com",
    "state" : "open",
    "url" : "https://apps.universign.com/npds/act_oXMk58w6Yaako",
    "tasks" : [ {
      "type" : "signature",
      "state" : "todo",
      "field" : "fld_mEZr"
    } ],
    "stalled" : false
  } ],
  "metadata" : { },
  "progress_value" : 0,
  "ongoing_conversation" : false,
  "has_unread_message" : false,
  "origin" : "API",
  "carbon_copies" : [ ],
  "max_expiry" : "180_days",
  "uploads" : [ ],
  "issuing_entity" : {
    "id" : "iss_w9nmLe9qzYDy",
    "name" : "Test_entity",
    "lock_sender_name_display" : false
  },
  "private" : false
}

List all templates
Request a timestamp
Developer tools
Guides
Services
API reference