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.
  • 409Form exists but detection is not ready yet.
  • 404No such form, or owned by another key.
curl https://api.getemboss.ai/forms/form_3d9a/contract \
  -H "Authorization: Bearer sk_live_yourkey"
Response
{
  "form_id": "form_3d9a",
  "fields": [
    {
      "id": "f_001",
      "label": "Business name",
      "type": "text",
      "data_type": "string",
      "rect": { "page": 0, "x": 72, "y": 540, "w": 320, "h": 18 }
    },
    {
      "id": "f_007",
      "label": "Federal tax classification",
      "type": "checkbox",
      "data_type": "boolean",
      "rect": { "page": 0, "x": 88, "y": 470, "w": 12, "h": 12 }
    },
    {
      "id": "f_014",
      "label": "Signature",
      "type": "signature",
      "data_type": "signature",
      "rect": { "page": 0, "x": 72, "y": 120, "w": 240, "h": 28 }
    }
  ]
}