Get the contract

The contract is the structured list of every field Emboss detected on a form — its labels, types, data types, and positions. Fetch it once detection is ready to verify or map your own data against the fields.

Get the contract

GET/forms/{id}/contractBearer auth

Return the detected-fields contract for a form once detection is complete.

Parameters

NameInTypeRequiredDescription
idpathstringyesThe form id to fetch the contract for.

Status codes

  • 200Detection complete; the contract JSON.
  • 401Missing or invalid API key.
  • 404No such form, or owned by another key.
  • 409Contract not available — detection not ready.
curl https://api.getemboss.ai/forms/6c47f7f5-f921-4698-910f-95dd7d81310b/contract \
  -H "Authorization: Bearer sk_live_yourkey"
Response
{
  "schema_version": "1.0",
  "page_count": 1,
  "field_count": 3,
  "form": { "title": "Form W-9" },
  "fields": [
    {
      "id": 1,
      "label": "Business name",
      "type": "text",
      "data_type": "string",
      "required": true,
      "page": 0,
      "rect": { "x": 72, "y": 540, "width": 320, "height": 18 },
      "value": null
    },
    {
      "id": 7,
      "label": "Federal tax classification",
      "type": "checkbox",
      "data_type": "boolean",
      "required": false,
      "page": 0,
      "rect": { "x": 88, "y": 470, "width": 12, "height": 12 },
      "value": null
    },
    {
      "id": 14,
      "label": "Signature",
      "type": "signature",
      "data_type": "signature",
      "required": true,
      "page": 0,
      "rect": { "x": 72, "y": 120, "width": 240, "height": 28 },
      "value": null
    }
  ]
}