Fill with context

Upload a flat PDF together with a context blob and let Emboss detect, match, and fill the fields in one asynchronous job. Poll the job, then download the resulting session's PDF.

Fill with context

POST/forms/with-contextBearer auth

Submit a PDF plus a JSON context blob. Returns 202 with a job_id; detection and fill run in the background.

Parameters

NameInTypeRequiredDescription
filebodyfile (multipart)yesThe flat PDF to fill.
contextbodystring (JSON)yesA JSON object describing the subject of the form.

Status codes

  • 202Accepted; fill job started.
  • 400Missing file or invalid context JSON.
  • 401Missing or invalid API key.
  • 429Rate limited.
curl -X POST https://api.getemboss.ai/forms/with-context \
  -H "Authorization: Bearer sk_live_yourkey" \
  -F "file=@./w9.pdf" \
  -F 'context={"name":"Ada Lovelace","business":"Analytical Engines LLC","ein":"12-3456789"}'
Response
{
  "job_id": "job_8f2c",
  "status": "queued"
}

Get the fill job

GET/forms/with-context/{job_id}Bearer auth

Poll the fill job. When done, returns the session_id and a fill report; on failure, an error.

Parameters

NameInTypeRequiredDescription
job_idpathstringyesThe job_id returned by POST /forms/with-context.

Status codes

  • 200The job state (queued | running | done | error).
  • 401Missing or invalid API key.
  • 404No such job, or owned by another key.
curl https://api.getemboss.ai/forms/with-context/job_8f2c \
  -H "Authorization: Bearer sk_live_yourkey"
Response
{
  "status": "done",
  "session_id": "sess_a1b2",
  "report": "Filled 14 of 16 fields.",
  "error": null
}