Document

Detect Document Fields

POST
/document/detect_fields

Detects form fields in a PDF document using either PDF form annotations or Dropbox Sign text tags.

Authorization

AuthorizationBasic <token>

Your API key can be used to make calls to the Dropbox Sign API. See Authentication for more information. āœ… Supported by Try it console (calls sent in test_mode only).

In: header

Request Body

file?unknown

The PDF file to analyze.

This endpoint requires either file or file_url, but not both.

file_url?string

The URL of the PDF file to analyze.

This endpoint requires either file or file_url, but not both.

Formaturi
detection_mode*|

The field detection method to use. Set to annotations to detect PDF form annotations or text_tags to detect Dropbox Sign text tags.

page_range?string

The zero-based page indexes to analyze. Accepts all, individual pages, inclusive ranges, or comma-separated combinations, such as 0-2,5,7-9. Defaults to all.

Match^(?:all|\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*)$

Response Body

application/json

application/json

curl -X POST "https://example.com/document/detect_fields" \  -H "Content-Type: application/json" \  -d '{    "detection_mode": "annotations"  }'
{  "detection_result": {    "document_hash": "stringstringstringstringstringstringstringstringstringstringstri",    "detection_mode": "annotations",    "page_count": 0,    "pages_analyzed": "all",    "detected_at": 0,    "form_fields_per_document": [      {        "document_index": 0,        "api_id": "string",        "height": 0,        "name": "string",        "page": 0,        "required": true,        "signer": "string",        "type": "string",        "width": 0,        "x": 0,        "y": 0      }    ],    "form_field_groups": [      {        "group_id": "string",        "group_label": "string",        "requirement": "string"      }    ],    "warnings": [      {        "warning_msg": "string",        "warning_name": "string"      }    ],    "errors": [      {        "error_msg": "string",        "error_path": "string",        "error_name": "string"      }    ],    "suggestions": [      "string"    ]  },  "warnings": [    {      "warning_msg": "string",      "warning_name": "string"    }  ]}