Update multiple FORM subfields by key in one request
2026-09, which is deprecated and stops working on October 1, 2027. To move your integration, see Upgrading to 2026-10.Update several FORM subfield values by key in a single atomic request. Only DRAFT documents can have fields updated.
Use this instead of looping single-key PATCH .../fields/key:<key> calls. Because all FORM subfields share one underlying field row, concurrent single-key requests read-modify-write the same row and overwrite each other (lost updates). This endpoint applies all changes against one read per affected field, so nothing is clobbered.
Body:
PATCH /api/v1/documents/{docId}/fields{ "updates": [ { "key": "name", "fieldMeta": { "type": "input", "value": "Andreas" } }, { "key": "phone", "fieldMeta": { "type": "input", "value": "070-1234567" } }, { "key": "email", "fieldMeta": { "type": "input", "value": "a@example.com" } } ]}Each entry's fieldMeta is merged into the existing subfield metadata (preserving label, placeholder, description, etc.), identical to the single-key endpoint. Max 50 updates per request.
Response: Returns a per-key result array so partial failures (e.g. an unknown key) are reported individually while valid updates still apply. success is true only when every update succeeded.
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 <= 255Body
application/json- body
updates*array<>Array of field updates (max 50)
1 <= items <= 50200
application/json- response
success*booleanWhether all updates succeeded
updated*numberNumber of fields successfully updated
results*array<>Per-field update results
curl -X PATCH 'https://app.sajn.se/api/v1/documents/string/fields' \ -H 'authorization: string' \ -H 'Content-Type: application/json' \ -d '{ "updates": [ { "key": "string", "fieldMeta": null } ]}'{ "success": true, "updated": 0, "results": [ { "key": "string", "success": true, "error": "string" } ]}Was this page helpful?