Sessions
A session is a working copy of a detected form. Fill it conversationally, with deterministic per-field actions, or with direct structured values — then render and download the finished PDF.
Create a session
/sessionsBearer authOpen a session over a previously created form. Returns 201 with the session_id.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
form_id | body | string | yes | The form to open a session over. |
Status codes
- 201Session created.
- 400Missing or invalid form_id.
- 401Missing or invalid API key.
- 404No such form, or owned by another key.
curl -X POST https://api.getemboss.ai/sessions \
-H "Authorization: Bearer sk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"form_id":"form_3d9a"}'{
"session_id": "sess_a1b2",
"status": "open"
}Get session state
/sessions/{id}Bearer authRead the current state of a session and its fields.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | The session_id. |
Status codes
- 200The session state.
- 401Missing or invalid API key.
- 404No such session, or owned by another key.
curl https://api.getemboss.ai/sessions/sess_a1b2 \ -H "Authorization: Bearer sk_live_yourkey"
{
"session_id": "sess_a1b2",
"status": "open",
"fields": [
{ "id": "f_001", "label": "Business name", "value": "Analytical Engines LLC", "state": "confirmed" }
]
}Conversational turn
/sessions/{id}/turnsBearer authSend a message to fill fields conversationally. Uses an LLM to interpret the turn against the form.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | The session_id. |
message | body | string | yes | The user's natural-language message. |
Status codes
- 200The assistant reply and updated field ids.
- 401Missing or invalid API key.
- 404No such session, or owned by another key.
- 409Session is completed (terminal).
- 429Rate limited.
curl -X POST https://api.getemboss.ai/sessions/sess_a1b2/turns \
-H "Authorization: Bearer sk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"message":"My EIN is 12-3456789 and I am an LLC."}'{
"reply": "Got it — set the EIN and tax classification.",
"updated": ["f_002", "f_007"]
}Confirm a field
/sessions/{id}/confirmBearer authDeterministically confirm a proposed field value. No LLM involved.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | The session_id. |
field_id | body | string | yes | The field to confirm. |
Status codes
- 200Field confirmed.
- 401Missing or invalid API key.
- 404No such session/field, or owned by another key.
- 409Session is completed (terminal).
curl -X POST https://api.getemboss.ai/sessions/sess_a1b2/confirm \
-H "Authorization: Bearer sk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"field_id":"f_001"}'Skip a field
/sessions/{id}/skipBearer authDeterministically mark a field as skipped. No LLM involved.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | The session_id. |
field_id | body | string | yes | The field to skip. |
Status codes
- 200Field skipped.
- 401Missing or invalid API key.
- 404No such session/field, or owned by another key.
- 409Session is completed (terminal).
curl -X POST https://api.getemboss.ai/sessions/sess_a1b2/skip \
-H "Authorization: Bearer sk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"field_id":"f_009"}'Decline a field
/sessions/{id}/declineBearer authDeterministically decline a proposed value, clearing it. No LLM involved.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | The session_id. |
field_id | body | string | yes | The field to decline. |
Status codes
- 200Field declined.
- 401Missing or invalid API key.
- 404No such session/field, or owned by another key.
- 409Session is completed (terminal).
curl -X POST https://api.getemboss.ai/sessions/sess_a1b2/decline \
-H "Authorization: Bearer sk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"field_id":"f_005"}'Direct field fill
/sessions/{id}/fieldsBearer authSet field values directly by id — a structured, deterministic fill with no LLM.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | The session_id. |
fields | body | array<{id, value}> | yes | Field ids and the values to set. |
Status codes
- 200Fields set.
- 400Unknown field id or invalid value type.
- 401Missing or invalid API key.
- 404No such session, or owned by another key.
- 409Session is completed (terminal).
curl -X PUT https://api.getemboss.ai/sessions/sess_a1b2/fields \
-H "Authorization: Bearer sk_live_yourkey" \
-H "Content-Type: application/json" \
-d '{"fields":[{"id":"f_001","value":"Analytical Engines LLC"},{"id":"f_007","value":true}]}'{
"updated": ["f_001", "f_007"]
}Render the filled PDF
/sessions/{id}/fillBearer authRender the session's confirmed values into a filled PDF and mark it completed.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | The session_id. |
Status codes
- 200Filled; session is now completed.
- 401Missing or invalid API key.
- 404No such session, or owned by another key.
- 409Session is already completed (terminal).
curl -X POST https://api.getemboss.ai/sessions/sess_a1b2/fill \ -H "Authorization: Bearer sk_live_yourkey"
{
"session_id": "sess_a1b2",
"status": "completed"
}Download the PDF
/sessions/{id}/pdfBearer authDownload the rendered PDF. The response body is the raw %PDF bytes.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | The session_id. |
Status codes
- 200The PDF bytes (application/pdf).
- 401Missing or invalid API key.
- 404No such session, or owned by another key.
- 409Session has not been filled yet.
curl https://api.getemboss.ai/sessions/sess_a1b2/pdf \ -H "Authorization: Bearer sk_live_yourkey" \ -o filled.pdf
%PDF-1.7 …binary…