Prefilled fields at send time

A prefilled field shows fixed text in the document. The signer does not write that text. Use it for data that does not change between signers, such as a contract number or a total amount.

There are two steps:

  1. Create a template with a text field marked as read-only (readonly) and with its default value (default_value).
  2. When you create the submission, assign the field value for each signer in submitters[].fields[].

Prerequisites

You need an access token. See Authentication.

Step 1: Create the template

Create the template with a read-only text field. Send the PDF in base64 inside documents[].file.

POST/api/v1/templates

Creates a template from a PDF

curl -X POST https://signa.sandbox.jaak.ai/api/v1/templates \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Service contract",
    "signature_type": "simple",
    "documents": [
      {
        "name": "contract.pdf",
        "file": "<PDF_IN_BASE64>",
        "fields": [
          {
            "name": "contract_number",
            "type": "text",
            "role": "Client",
            "required": false,
            "readonly": true,
            "default_value": "CTR-2026-0001",
            "areas": [
              { "x": 120, "y": 680, "w": 220, "h": 24, "page": 1 }
            ]
          }
        ]
      }
    ]
  }'

The x, y, w, h and page values in the example are illustrative. Adjust them to the real position of the field in your PDF.

Field rules:

  • type is text.
  • readonly: true marks the field as read-only. The signer does not edit it.
  • default_value is the fixed text that appears in the document.
  • role sets the signer the field belongs to. The value must match the role of a signer you send when you create the submission.
  • areas is the list of positions where the field appears. A field can have several areas.

Step 2: Create the submission with per-signer values

Create the submission with the template's template_id. In submitters[].fields[], assign the value of each prefilled field.

POST/api/v1/submissions

Creates a submission from a template

curl -X POST https://signa.sandbox.jaak.ai/api/v1/submissions \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": 123,
    "send_email": true,
    "submitters": [
      {
        "name": "Ana Lopez",
        "role": "Client",
        "email": "ana.lopez@example.com",
        "fields": [
          {
            "name": "contract_number",
            "default_value": "CTR-2026-0001",
            "readonly": true
          }
        ]
      }
    ]
  }'

Response: 201 Created with the created submission.

Parameters of submitters[].fields[]:

ParameterTypeDescription
namestringField name. It must match the field's name in the template exactly.
default_valuestringValue assigned to the field for this signer. If the value is empty, the field gets no value in this submission.
readonlybooleanUse true for read-only fields. The template sets the read-only condition.

Notes:

  • An empty value ("") is not assigned. The submission does not fail because of that field.
  • The signer role must match a signer in the template exactly. If it does not match, the submission is rejected.
  • One value fills every area of the field. The value is assigned to the field by its name.

Example: long contract with several prefilled fields

A long contract can have many prefilled fields. For example, the total amount can appear on the cover page, in the payment clause and in the final annex. In the template, that field has three areas, one per page. In the submission, you send one value for the field:

{
  "name": "Ana Lopez",
  "role": "Client",
  "email": "ana.lopez@example.com",
  "fields": [
    { "name": "contract_number", "default_value": "CTR-2026-0001", "readonly": true },
    { "name": "total_amount", "default_value": "$1,250,000.00 MXN", "readonly": true },
    { "name": "start_date", "default_value": "01/01/2027", "readonly": true }
  ]
}

The total_amount value appears in all three areas of the field. Send one object for each prefilled field you want to assign. This example does not define a limit on pages or fields.

Idempotency-Key (optional)

You can send the Idempotency-Key header when you create the submission. It lets you retry without creating two submissions.

RuleValue
Format1 to 128 characters from A-Z, a-z, 0-9, ., _, : and -. The first character is alphanumeric.
Same key and same contentReturns the submission already created. The response includes the header Idempotent-Replayed: true.
Same key and different content422 with IDEMPOTENCY_KEY_REUSED.
Same key while the first request is still running409 with IDEMPOTENCY_IN_PROGRESS. Retry later with the same key.
Invalid format400.

If you do not send the header, the gateway generates a key for that request only. A retry without the header creates a new submission.

Activation

Idempotency protection depends on the environment configuration. Confirm with JAAK that your environment has it enabled before you rely on it.

Common errors

SituationWhat to check
The submission is rejected for a signerThe role does not match a signer in the template.
The field appears empty in the documentThe default_value was empty, or the name does not match the template field.

Next steps