Firegent API
Programmatically manage document templates and retrieve processed documents together with their extracted, structured data. Everything below is available to any authenticated Firegent account.
Programmatically manage document templates and retrieve processed documents together with their extracted, structured data. Everything below is available to any authenticated Firegent account.
The Firegent API is organized around REST. It uses standard HTTP verbs, returns JSON-encoded responses, and uses standard HTTP status codes to indicate the success or failure of a request.
Every response is wrapped in the same envelope so your integration only needs one parsing path.
| Field | Description |
|---|---|
status | HTTP status code of the response, repeated in the body |
data | The requested resource, or a list of resources |
meta | Pagination info and related resource links, when applicable |
All requests must be made over HTTPS and must identify the desired format with an Accept: application/json header (or a .pdf suffix for binary attachments).
https://qwikiconnect.firegent.com/v1
Firegent authenticates every request using your account email and personal API token, sent as request headers. There is no OAuth flow and no API keys shared between accounts — your token is tied to your user.
| Header | Description |
|---|---|
X-User-Emailrequired | The email address of your Firegent account |
X-User-Tokenrequired | Your personal API token |
Log in to view or regenerate your API token from your account settings.
Requests without valid credentials receive a 401 Unauthorized response. Keep your token secret — anyone with it can access your templates and documents.
curl https://qwikiconnect.firegent.com/v1/documents \
-H 'Accept: application/json' \
-H 'X-User-Email: jane.doe@acmecorp.com' \
-H 'X-User-Token: 7f3a9c2e1b6d4f805c9e2a17b3d6f402'
Firegent uses conventional HTTP status codes to indicate the outcome of a request: codes in the 2xx range indicate success, 4xx indicates an error with the request, and 5xx indicates an error on our end.
| Status | Meaning | Example body |
|---|---|---|
| 200 | Everything worked as expected | { "status": 200, "data": ... } |
| 401 | Missing or invalid X-User-Email / X-User-Token | { "error": "You need to sign in or sign up before continuing." } |
| 403 | Authenticated, but the resource does not belong to your account | { "status": 403, "message": "Forbidden access, please contact your admin", "data": [] } |
| 404 | The requested record could not be found | { "status": 404, "message": "Record not found, make sure the record identifier", "data": [] } |
| 429 | Too many requests — see rate limits below | (empty body, see the Retry-After header) |
| 500 | Something went wrong on our end | – |
Rate limits
Requests are limited to 100 requests per 10 minutes per IP address. If you go over this limit, requests receive a 429 Too Many Requests response until the window resets.
Pagination
List endpoints accept page and limit query parameters (default limit is 50) and return pagination details under meta.pagination.
| Field | Description |
|---|---|
current / previous / next | Page numbers relative to the current page |
total_pages | Total number of pages available |
Returns a paginated list of the templates available to your account, most recently created first.
Query parameters
| Parameter | Description |
|---|---|
pageoptional | Page number to retrieve |
limitoptional | Number of templates per page (default 50) |
curl 'https://qwikiconnect.firegent.com/v1/templates?page=1&limit=10' \
-H 'Accept: application/json' \
-H 'X-User-Email: jane.doe@acmecorp.com' \
-H 'X-User-Token: 7f3a9c2e1b6d4f805c9e2a17b3d6f402'
Attributes
| Field | Description |
|---|---|
id | Unique identifier for the template |
name | Template name |
shortcode | Short identifying code for the template |
total_pages | Number of pages the template defines |
created_at / updated_at | Timestamps |
Retrieves a single template by ID.
Path parameters
| Parameter | Description |
|---|---|
idrequired | The ID of the template to retrieve |
curl https://qwikiconnect.firegent.com/v1/templates/64f1a2b3c4d5e6f7a8b9c0d1 \
-H 'Accept: application/json' \
-H 'X-User-Email: jane.doe@acmecorp.com' \
-H 'X-User-Token: 7f3a9c2e1b6d4f805c9e2a17b3d6f402'
Returns every document processed against a given template.
Parameters
| Parameter | Description |
|---|---|
template_idrequired | The ID of the template, passed in the path |
tnameoptional | Filter results to documents with an exact matching name |
curl https://qwikiconnect.firegent.com/v1/templates/64f1a2b3c4d5e6f7a8b9c0d1/documents \
-H 'Accept: application/json' \
-H 'X-User-Email: jane.doe@acmecorp.com' \
-H 'X-User-Token: 7f3a9c2e1b6d4f805c9e2a17b3d6f402'
Returns a paginated list of every processed document across all templates on your account.
Query parameters
| Parameter | Description |
|---|---|
tnameoptional | Comma-separated list of template names to filter by, e.g. "Invoice - Standard,Purchase Order" |
start_date / end_dateoptional | Filter by creation date, formatted YYYY-MM-DD (end_date defaults to today) |
page / limitoptional | Pagination controls (default limit 50) |
merge_column / anchor_columnoptional | Set merge_column=true with an anchor_column name to merge extracted table rows around that column |
curl 'https://qwikiconnect.firegent.com/v1/documents?tname=Invoice+-+Standard&start_date=2026-04-01&end_date=2026-04-30' \
-H 'Accept: application/json' \
-H 'X-User-Email: jane.doe@acmecorp.com' \
-H 'X-User-Token: 7f3a9c2e1b6d4f805c9e2a17b3d6f402'
A collection of Document objects, along with pagination metadata.
Attributes
| Field | Description |
|---|---|
data | Array of Document objects |
meta.pagination | current, previous, next, total_pages |
Returns a single document, including its extracted data.
Parameters
| Parameter | Description |
|---|---|
idrequired | The ID of the document |
merge_column / anchor_columnoptional | Same behavior as on the list endpoint |
curl https://qwikiconnect.firegent.com/v1/documents/64f8b3c2a1d9e6f7c8b9a0d2 \
-H 'Accept: application/json' \
-H 'X-User-Email: jane.doe@acmecorp.com' \
-H 'X-User-Token: 7f3a9c2e1b6d4f805c9e2a17b3d6f402'
This document object contains the metadata of a document plus its extracted content.
Attributes
| Field | Description |
|---|---|
id | Unique identifier for the document |
input_pdf | Source file name |
document_name | Name of the document |
tid / tname | ID and name of the template used to process this document |
pages | Number of pages in the document |
attachment_link | URL to fetch the original file, see Document attachment |
data | Array of per-page extracted data (omitted on the metadata endpoint) |
A single extracted field, such as a value that appears once per page — for example an invoice number or a warehouse code.
Attributes
| Field | Description |
|---|---|
id | ID of the data |
type | Always "singleton" |
field | Field name |
value | Value of the field |
A table of extracted rows, such as invoice line items.
Attributes
| Field | Description |
|---|---|
type | Always "group" |
table | Array of rows, each with a fields array |
(fields) id / field / value | ID, name, and value of each field in a row |
Returns a document's metadata without its extracted data — useful when you only need to check status or attributes.
Parameters
| Parameter | Description |
|---|---|
idrequired | The ID of the document |
curl https://qwikiconnect.firegent.com/v1/documents/64f8b3c2a1d9e6f7c8b9a0d2/metadata \
-H 'Accept: application/json' \
-H 'X-User-Email: jane.doe@acmecorp.com' \
-H 'X-User-Token: 7f3a9c2e1b6d4f805c9e2a17b3d6f402'
Returns the original source file for a document, base64-encoded, or a filtered view of specific pages/coordinates.
Parameters
| Parameter | Description |
|---|---|
idrequired | The ID of the document |
typeoptional | Set to "pdf" to fetch the full PDF; otherwise returns page images |
page / coordinateoptional | Restrict the returned data to a specific page or coordinate range |
curl 'https://qwikiconnect.firegent.com/v1/documents/64f8b3c2a1d9e6f7c8b9a0d2/attachment.pdf?type=pdf&page=1' \
-H 'X-User-Email: jane.doe@acmecorp.com' \
-H 'X-User-Token: 7f3a9c2e1b6d4f805c9e2a17b3d6f402'
Attributes
| Field | Description |
|---|---|
filename | Name of the source file |
filtered | The page/coordinate filter that was applied, if any |
data | Base64-encoded file content |