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.
For the current object and field inventory, see the internal reference at docs/developers/api_reference.md.
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
| Area | Objects |
|---|---|
| Sales | crm_lead, crm_account, crm_contact, crm_opportunity, crm_opportunity_line_item, crm_forecast |
| Service | crm_case, crm_knowledge_article, crm_task |
| Marketing | crm_campaign, crm_campaign_member |
| Revenue | crm_product, crm_quote, crm_quote_line_item, crm_contract |
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.