Places
Captures
Retrieve data entered by recipients during signing ceremonies through the API
Some place types allow recipients to enter data during the ceremony, such as text input places. The entered data is rendered in the signed document. Captures let you also access that data via the API.
Defining captures
Places that accept recipient input have a capture_as property. Set it to a key name to store the entered value on the envelope’s captures object. Keys must be unique within the envelope.
For example, this text input place asks a recipient to enter an 8-digit reference number:
// POST https://api.signatureapi.com/v1/envelopes
// X-API-Key: key_test_...
// Content-Type: application/json
{
"documents": [
{
//...
"places": [
{
"key": "order_reference_number",
"type": "text_input",
"hint": "Your 8-digit reference code",
"format": "/^[0-9]{8}$/",
"recipient_key": "customer",
"capture_as": "reference"
}
]
}
],
"recipients": [
//...
],
"title": "Order Confirmation"
}
When the recipient completes the ceremony, the entered value is stored in the captures object on the envelope:
// HTTP/1.1 200 OK
{
"id": "55072f0e-b919-4d69-89cd-e7e56af00530",
//...
"captures": {
"reference": "11223344"
}
}