REST · JSONv1 · Stable

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.

Introduction

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.

FieldDescription
statusHTTP status code of the response, repeated in the body
dataThe requested resource, or a list of resources
metaPagination 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).

BASE URL

https://qwikiconnect.firegent.com/v1

RESPONSE ENVELOPE
Authentication

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.

HeaderDescription
X-User-EmailrequiredThe email address of your Firegent account
X-User-TokenrequiredYour 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'

Errors & status codes

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.

StatusMeaningExample body
200Everything worked as expected{ "status": 200, "data": ... }
401Missing or invalid X-User-Email / X-User-Token{ "error": "You need to sign in or sign up before continuing." }
403Authenticated, but the resource does not belong to your account{ "status": 403, "message": "Forbidden access, please contact your admin", "data": [] }
404The requested record could not be found{ "status": 404, "message": "Record not found, make sure the record identifier", "data": [] }
429Too many requests — see rate limits below(empty body, see the Retry-After header)
500Something went wrong on our end
Rate limits & pagination

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.

FieldDescription
current / previous / nextPage numbers relative to the current page
total_pagesTotal number of pages available
List templates

Returns a paginated list of the templates available to your account, most recently created first.

Query parameters

ParameterDescription
pageoptionalPage number to retrieve
limitoptionalNumber of templates per page (default 50)
GET/v1/templates

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'

The Template object

Attributes

FieldDescription
idUnique identifier for the template
nameTemplate name
shortcodeShort identifying code for the template
total_pagesNumber of pages the template defines
created_at / updated_atTimestamps
THE TEMPLATE OBJECT
Retrieve a template

Retrieves a single template by ID.

Path parameters

ParameterDescription
idrequiredThe ID of the template to retrieve
GET/v1/templates/:id

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'

List a template's documents

Returns every document processed against a given template.

Parameters

ParameterDescription
template_idrequiredThe ID of the template, passed in the path
tnameoptionalFilter results to documents with an exact matching name
GET/v1/templates/:template_id/documents

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'

List documents

Returns a paginated list of every processed document across all templates on your account.

Query parameters

ParameterDescription
tnameoptionalComma-separated list of template names to filter by, e.g. "Invoice - Standard,Purchase Order"
start_date / end_dateoptionalFilter by creation date, formatted YYYY-MM-DD (end_date defaults to today)
page / limitoptionalPagination controls (default limit 50)
merge_column / anchor_columnoptionalSet merge_column=true with an anchor_column name to merge extracted table rows around that column
GET/v1/documents

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'

The Documents object

A collection of Document objects, along with pagination metadata.

Attributes

FieldDescription
dataArray of Document objects
meta.paginationcurrent, previous, next, total_pages
THE DOCUMENTS OBJECT
Retrieve a document

Returns a single document, including its extracted data.

Parameters

ParameterDescription
idrequiredThe ID of the document
merge_column / anchor_columnoptionalSame behavior as on the list endpoint
GET/v1/documents/:id

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'

The Document object

This document object contains the metadata of a document plus its extracted content.

Attributes

FieldDescription
idUnique identifier for the document
input_pdfSource file name
document_nameName of the document
tid / tnameID and name of the template used to process this document
pagesNumber of pages in the document
attachment_linkURL to fetch the original file, see Document attachment
dataArray of per-page extracted data (omitted on the metadata endpoint)
THE DOCUMENT OBJECT
Singleton type

A single extracted field, such as a value that appears once per page — for example an invoice number or a warehouse code.

Attributes

FieldDescription
idID of the data
typeAlways "singleton"
fieldField name
valueValue of the field
SINGLETON
Group type

A table of extracted rows, such as invoice line items.

Attributes

FieldDescription
typeAlways "group"
tableArray of rows, each with a fields array
(fields) id / field / valueID, name, and value of each field in a row
GROUP
Document metadata

Returns a document's metadata without its extracted data — useful when you only need to check status or attributes.

Parameters

ParameterDescription
idrequiredThe ID of the document
GET/v1/documents/:id/metadata

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'

Document attachment

Returns the original source file for a document, base64-encoded, or a filtered view of specific pages/coordinates.

Parameters

ParameterDescription
idrequiredThe ID of the document
typeoptionalSet to "pdf" to fetch the full PDF; otherwise returns page images
page / coordinateoptionalRestrict the returned data to a specific page or coordinate range
GET/v1/documents/:id/attachment

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'

The Attachment object

Attributes

FieldDescription
filenameName of the source file
filteredThe page/coordinate filter that was applied, if any
dataBase64-encoded file content
THE ATTACHMENT OBJECT