Request methods
The HelpGenie API supports two ways to make requests: theApiService.invoke() pattern (recommended for TypeScript projects) and direct HTTP requests.
ApiService.invoke() (recommended)
TheApiService class handles authentication, request formatting, and response unwrapping automatically:
invoke method accepts an options object with these fields:
string
required
The API resource to target. Must be one of the 13 supported resources.
string
required
The action to perform. Common actions:
all, list, get, create, update, delete.string | number
The record identifier. Required for
get, update, and delete actions.object
The request payload. Used with
create and update actions. Structure varies by resource.Direct HTTP requests
You can also call the Edge Function directly. The API accepts both a body-based resource/action pattern and standard REST-style HTTP methods.- Body-based (POST)
- REST-style
Send the resource, action, and data in the request body:
Common actions
Most resources support a standard set of actions. Some resources add custom actions specific to their domain.list vs all
The API distinguishes between two fetching actions:
allreturns full records with related data (joins, counts, nested objects). Use this when you need complete information.listreturns minimal records with only key fields (typicallyidandname). Use this for populating dropdowns, selectors, or anywhere you need a lightweight list.
Pagination differs between
all and list.- The
allaction on genies uses cursor-based pagination. The response includesnextCursorandhasMorefields. Passcursorin the request data to fetch the next page. - Most other resources use offset-based pagination. The response includes
count, and you control paging withlimitandoffsetin the request data.
Request examples
Create a resource
Get a single resource
Update a resource
Delete a resource
Response structure
All responses use a consistent envelope:Success response
data is an array:
When using
ApiService.invoke(), the response is automatically unwrapped. You receive the data value directly, not the full envelope.Error response
Warnings
A response can include awarnings array of strings next to data. A warning doesn’t mean the request failed. It points out something you should check.
Undocumented fields and strict mode
Oncreate and update actions, the API compares the top-level keys in data with the fields documented for that action. You can get those fields from capabilities/schema. If you send a field that isn’t documented, it was most likely ignored. The request still runs, and the response includes a warning that names the field:
"strict": true at the top level of the body, next to resource. Nothing is changed, and the request fails with UNKNOWN_FIELDS (HTTP 400), listing the unknown and accepted fields in error.details:
The check covers top-level
data keys only, on create and update. Some keys are never flagged: adminMode and impersonatedUserId, the envelope keys of a body sent without a data wrapper, and the fields of actions that pass extra fields through, such as knowledge-base/create. Public (unauthenticated) requests aren’t checked.Admin mode and impersonation
Users with theinternal_admin role can operate on behalf of other users by including an impersonatedUserId in the request data. This is used for provisioning trial agents, bulk operations, and testing.
Query parameters
When using REST-style HTTP requests, query parameters are automatically extracted and passed to handlers:data object:

