Replace form document fields
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.PUT
Replace the complete ordered list of content blocks. Include existing IDs to retain fields; omit an ID to create a field. Missing fields are deleted. Existing field types cannot change. PDF ownership, metadata and section locks are validated. Read the form again to discover bindable keys and configure questions. Requires forms:write and documents:write, including for drafts.
header
AuthorizationBearer <token>Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.
id*stringIdempotency-Key?stringMakes 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.
Length
length <= 255Body
application/json- body
fields*array<>Items
items <= 500200
application/json- response
fields*array<>Fields in position order
curl -X PUT 'https://app.sajn.se/api/v1/forms/string/document/fields' \ -H 'authorization: string' \ -H 'Content-Type: application/json' \ -d '{ "fields": [ { "type": "TEXT", "position": 0, "fieldMeta": { "type": "TEXT" } } ]}'Example Response
{ "fields": [ { "id": "string", "documentId": "string", "templateId": "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 }, "createdAt": null, "updatedAt": null } ]}Was this page helpful?