API Reference
ObjectStack API basics for HotCRM objects, ObjectQL queries, and local development.
API Reference
HotCRM runs on ObjectStack. The web UI, automation, actions, and AI skills all work against the same object metadata registered by objectstack.config.ts.
Local base URL
When running HotCRM locally:
pnpm devthe app is available at:
http://localhost:4001Object API routes are served by the ObjectStack runtime. Route shape can vary by runtime version and enabled capabilities, so prefer the runtime API explorer when available in your environment.
Current objects
The object roster is deliberately not restated here — src/*/objects/*.object.ts is
its source of truth, one file per object, each registering its crm_-prefixed name.
The model spans four business domains: Sales, Service, Marketing, and Revenue.
ObjectQL shape
Use ObjectQL-style filters and field selection in actions, flows, hooks, and integrations that call the ObjectStack data layer.
{
"filters": [
["stage", "in", ["proposal", "negotiation"]],
["amount", ">", 100000]
],
"sort": [{ "field": "amount", "direction": "desc" }],
"limit": 50,
"fields": ["id", "name", "amount", "stage", "crm_account"]
}Common operators include =, !=, >, >=, <, <=, in, not_in, between, contains, starts_with, ends_with, is_null, and is_not_null.
Action bodies
HotCRM actions can include executable metadata bodies with constrained capabilities.
export const CreateCampaignAction = {
name: 'create_campaign',
objectName: 'crm_lead',
type: 'modal',
body: {
language: 'js',
capabilities: ['api.write'],
source: `
await ctx.api.object('crm_campaign_member').insert({
crm_campaign: input.campaign,
crm_lead: input.leadId,
status: 'sent'
});
`,
},
};Verification
After changing API-facing metadata:
pnpm validate
pnpm typecheck
pnpm testUse pnpm verify before publishing.