Skip to Content

Add, update, or remove boxes on a template PDF field

You're viewing API version 2026-09, which is deprecated and stops working on October 1, 2027. To move your integration, see Upgrading to 2026-10.
PATCH
/api/v1/templates/{id}/fields/{fieldId}/placed-fields

Changes individual boxes on a template PDF field. Same semantics as updatePlacedFields on documents, with signerId referring to a template party.

Authorization

headerAuthorizationBearer <token>

Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.

Path Parameters

id*string
fieldId*string

Header Parameters

authorization*string

Bearer token for API authentication

Idempotency-Key?string

Makes retries safe. A retry with the same key and the same request replays the stored response for 24 hours (header Idempotent-Replayed: true); the same key with a different request returns 400.

Lengthlength <= 255

Request Body

Body

application/json
  1. body
upsert*array<|>

Boxes to add or replace. A box whose id already exists on the field replaces that box and keeps its stacking order; any other box is added on top.

Itemsitems <= 500
Default[]
remove*array<>

Ids of boxes to remove from the field.

Itemsitems <= 500
Default[]

Response Body

200

application/json
  1. response
id*string

The PDF field id

type*string
Value in"TEXT""HTML""FORM""PDF""PRODUCT_TABLE""TABLE""SPACER""PAGE_BREAK""DURATION"
position*number
fieldMeta*||||||||

The PDF field metadata after the change, including every box in placedFields

templateId*string
Example Request
curl -X PATCH 'https://app.sajn.se/api/v1/templates/string/fields/string/placed-fields' \  -H 'authorization: string' \  -H 'Content-Type: application/json' \  -d '{  "upsert": [],  "remove": []}'
Example Response
{  "id": "string",  "type": "TEXT",  "position": 0,  "fieldMeta": {    "type": "TEXT",    "content": "string",    "locked": true,    "sectionStyle": {      "background": "none",      "padding": "none",      "bleed": true,      "border": true    },    "visibilityRule": {      "customInputId": "string",      "equals": "string",      "mode": "SHOW_WHEN"    },    "hidden": true  },  "templateId": "string"}

Was this page helpful?