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:
The API resource to target. Must be one of the 13 supported resources.
The action to perform. Common actions:
all, list, get, create, update, delete.The record identifier. Required for
get, update, and delete actions.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.| Action | Description | Requires id | Requires data |
|---|---|---|---|
all | Fetch all records with full details and relations | No | No |
list | Fetch a compact list of records (for dropdowns and selectors) | No | No |
get | Fetch a single record by ID | Yes | No |
create | Create a new record | No | Yes |
update | Update an existing record | Yes | Yes |
delete | Delete a record | Yes | No |
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
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:

