List form fields
The form: every field with its value, every widget's row (its place, look and state), and the calculation order. A form field's widgets come with the form, never with the annotations.
Authentication#
Any one of these credentials is accepted.
The deployment's static root credential (CLOUDPDF_API_AUTH_TOKENS), valid on every surface.
Delegated tenant JWT, valid only for its own tenant: under /v1/tenants/{tenantId}/ the path tenant must equal the token's tenant_id, and on /v1/docs/{docId} the document must belong to that tenant and the token's scope must hold the operation's document permissions, as a document token does. For servers; browsers get document tokens. Doc-scoped viewer tokens are rejected on every admin route.
Doc-scoped JWT, valid only on the /v1/docs/{docId} subtree it names, gated by the capability scopes it carries (each operation's x-required-capability).
Parameters#
docIdpathstringrequiredlayerNamepathstringrequiredX-Document-PasswordheaderstringBase64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead.
SDK examples#
The selected SDK is remembered across the API reference. Values are examples; replace them with identifiers and input from your application.
import { CloudPDFClient } from "@cloudpdf/sdk";
const client = new CloudPDFClient({
token: "<token>",
});
await client.doc.forms.list({
docId: "docId",
layerName: "layerName"
});Responses#
application/jsonDocFormsListResponseformKind"none" | "acroform" | "xfa"needsAppearancesbooleanfieldsFormField[]refFormFieldRefkind"objectNumber"objectNumberintegernamestringorigin"acroform" | "recovered"readOnlybooleanrequiredbooleannoExportbooleanalternateNamestringmappingNamestringvalueEntryFormValueEntrykind"none"defaultValueEntryFormValueEntrykind"none"actionsPdfFieldActionsoptionalkeystrokePdfActionTreeoptionalrootPdfActionNodeincompletebooleanwarnings("cycle-dropped" | "malformed-next" | "incomplete" | "payload-dropped")[]formatPdfActionTreeoptionalrootPdfActionNodeincompletebooleanwarnings("cycle-dropped" | "malformed-next" | "incomplete" | "payload-dropped")[]validatePdfActionTreeoptionalrootPdfActionNodeincompletebooleanwarnings("cycle-dropped" | "malformed-next" | "incomplete" | "payload-dropped")[]calculatePdfActionTreeoptionalrootPdfActionNodeincompletebooleanwarnings("cycle-dropped" | "malformed-next" | "incomplete" | "payload-dropped")[]groupIdstringassignmentFieldAssignmentkind"group"groupIdstringlockedByFieldSignatureLockpurposestringplaceholderstringcreatedBystringcreatedAtstring<date-time>filledBystringfilledByNamestringfilledAtstring<date-time>importedBystringwidgetsFormWidget[]refAnnotationRefobjectNumberintegerpagePageRefkind"text"valuestringdefaultValuestringmaxLengthintegermultilinebooleanpasswordbooleancombbooleanformatFormFieldFormatThe shape a text field's or a dropdown's value has, by its `kind`: a date or a time with the pattern it is shown in, or `other` for a format script the engine does not recognise. A newer server can add kinds: read one your client doesn't know as `other`.
widgetsWidgetAnnotation[]subtype"widget"refAnnotationRefkind"objectNumber"pagePageRefkind"objectNumber"objectNumberintegerobjectNumberintegerpagePageRefkind"objectNumber"objectNumberintegerhasAppearancebooleanappearanceStatestringstructurePositioninteger[]nmstringrectobjectxnumberynumberwidthnumberheightnumbercontentsstringsubjectstringblendMode"normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity"invisiblebooleanhiddenbooleanprintbooleannoZoombooleannoRotatebooleannoViewbooleanreadOnlybooleanlockedbooleantoggleNoViewbooleanlockedContentsbooleanreplyobjecttoAnnotationRefkind"objectNumber"pagePageRefobjectNumberintegertype"reply" | "group"popupAnnotationRefgroupIdstringauthorstringcreatedAtstring<date-time>modifiedAtstring<date-time>userIdstringcreatedBystringmodifiedBystringimportedBystringactionsPdfAnnotationActionsboxobjectxnumberynumberwidthnumberheightnumberrotation0 | 90 | 180 | 270colorstringinteriorColorstringstrokeWidthnumberborderStyle"solid" | "dashed" | "beveled" | "inset" | "underline"dashArraynumber[]fontFamilystringfontSizenumberfontColorstringtextAlign"left" | "center" | "right"captionstringcheckStyle"check" | "cross" | "star" | "circle" | "square" | "diamond"layout"caption" | "image" | "caption-below" | "caption-above" | "caption-right" | "caption-left" | "caption-over"fieldFormFieldReffieldKind"text" | "checkbox" | "radio" | "combobox" | "listbox" | "pushbutton" | "signature" | "unknown"Its field's family. A newer server can add families: read one your client doesn't know as `unknown`.
hasMarkbooleancalculationOrderFormFieldRef[]application/jsonErrorResponseerrorEngineErrorcode"Unknown" | "InvalidArg" | "DocNotOpen" | "DocOpenFailed" | "DocPasswordRequired" | "DocPasswordIncorrect" | "GrantPassphraseRequired" | "Aborted" | "Network" | "Unauthenticated" | "Forbidden" | "NotFound" | "WireFormat" | "RuntimeUnavailable" | "LayerVersionConflict" | "NotImplemented" | "MalformedPdf" | "SigningPending" | "SigningExpired" | "SigningVersionMismatch" | "SignatureRefused" | "ProtectedDocument" | "PayloadTooLarge" | "ObjectNumberUnavailable" | "LayerFull" | "ChangeConflict" | "UndoUnavailable" | "IdempotencyKeyReused" | "LayerDeleted" | "VisitorIdentityRequired" | "Conflict" | "EngineBusy" | "EngineRestarting" | "DocumentQuarantined" | "ThumbnailNotReady" | "TooManyRequests" | "GrantExpired" | "OriginRequired" | "OriginNotAllowed" | "FeatureNotEnabled" | "FeatureStopped" | "LicenseInvalid" | "LicenseUsageLimit" | "UpstreamError"Why the request failed. A newer server can add codes: read one your client doesn't know as `Unknown`.
messagestringdetailsobjectoptionalWhat a code carries besides its message, as each code says.
application/jsonErrorResponseerrorEngineErrorcode"Unknown" | "InvalidArg" | "DocNotOpen" | "DocOpenFailed" | "DocPasswordRequired" | "DocPasswordIncorrect" | "GrantPassphraseRequired" | "Aborted" | "Network" | "Unauthenticated" | "Forbidden" | "NotFound" | "WireFormat" | "RuntimeUnavailable" | "LayerVersionConflict" | "NotImplemented" | "MalformedPdf" | "SigningPending" | "SigningExpired" | "SigningVersionMismatch" | "SignatureRefused" | "ProtectedDocument" | "PayloadTooLarge" | "ObjectNumberUnavailable" | "LayerFull" | "ChangeConflict" | "UndoUnavailable" | "IdempotencyKeyReused" | "LayerDeleted" | "VisitorIdentityRequired" | "Conflict" | "EngineBusy" | "EngineRestarting" | "DocumentQuarantined" | "ThumbnailNotReady" | "TooManyRequests" | "GrantExpired" | "OriginRequired" | "OriginNotAllowed" | "FeatureNotEnabled" | "FeatureStopped" | "LicenseInvalid" | "LicenseUsageLimit" | "UpstreamError"Why the request failed. A newer server can add codes: read one your client doesn't know as `Unknown`.
messagestringdetailsobjectoptionalWhat a code carries besides its message, as each code says.