Fill in values on a document
Fills in values by key, in one atomic request. The same request shape works for FORM subfields, AcroForm fields, and boxes placed on a PDF. Only documents with the status DRAFT or IMPORTED can be filled in.
Keys must match exactly. To find the keys, call GET /api/v1/documents/{id}/field-values. Set a key in the editor on a FORM subfield or a placed box, or send key when you create a placed box through the API, so that the key stays the same for every document created from a template.
The following example fills in a FORM subfield, a placed text box, and a PDF checkbox:
{
"values": [
{ "key": "customer-name", "value": "Example AB" },
{ "key": "org-number", "value": "556000-0000" },
{ "key": "accept-terms", "value": true }
]
}
A value fails, and the other values are still written, when its key doesn’t exist, when two fields share the key, when a party fills in the value at signing, or when the value doesn’t match the type or the allowed options. results lists the outcome for each key.
If another edit changes one of the fields while the request runs, nothing is written and the request fails with an HTTP 400 Bad Request status code. Send the request again.
Authorizations
Personal API key, e.g. Authorization: Bearer sajn_sk_.... Not scope-limited — acts as the issuing user.
Headers
Bearer token for API authentication
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.
255Path Parameters
Body
Body
The values to write, at most 100 per request.
1 - 100 elementsResponse
200

