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 authSubmit a PDF plus a JSON context blob. Returns 202 with a job_id; detection and fill run in the background.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
file | body | file (multipart) | yes | The flat PDF to fill. |
context | body | string (JSON) | yes | A 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 authPoll the fill job. When done, returns the session_id and a fill report; on failure, an error.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
job_id | path | string | yes | The 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
}