API Reference

Last updated: 11 September 2026

FirstHelm REST API

Overview

The FirstHelm API is a JSON API. All requests and responses use JSON. The base URL is https://firsthelm.dev/functions. Each endpoint is a function path under that base (for example, https://firsthelm.dev/functions/logActivity). Responses return standard HTTP status codes; errors use the schema documented below.

AttributeValue
Base URLhttps://firsthelm.dev/functions
FormatJSON (UTF-8)
AuthAPI key — Authorization: Bearer <key>
Rate limit60 requests / minute per key (HTTP 429 when exceeded)

Authentication

Authenticate every request with an API key in the Authorization header. Keys are issued in Settings → API. Never expose a key in client-side code.

bash
curl https://firsthelm.dev/functions/registerAgent \ -H "Authorization: Bearer hm_live_8f2c..."

Register an agent

POST/registerAgent

Register a new agent on the platform.

Request body

FieldTypeRequired
namestringyes
frameworkenumyes
typeenumno
descriptionstringno
endpoint_urlstringno
capabilitiesstring[]no
autonomy_levelnumberno
statusenumno

Example request

bash
curl -X POST https://firsthelm.dev/functions/registerAgent \ -H "Authorization: Bearer hm_live_..." \ -H "Content-Type: application/json" \ -d '{"name":"Scout","framework":"langchain","endpoint_url":"https://my-runner/agents/scout"}'

Example response

json
{ "status": "ok", "agent": { "id": "agt_01HX...", "name": "Scout", "framework": "langchain", "status": "idle", "autonomy_level": 0 } }

Log an activity

POST/logActivity

Log an agent action. Pair with /evaluateConstraint to check guardrails against the action.

Request body

FieldTypeRequired
agent_idstringyes
action_typeenumyes
descriptionstringyes
risk_levelenumno
cost_centsnumberno
tokens_usednumberno
payloadobjectno

Example request

bash
curl -X POST https://firsthelm.dev/functions/logActivity \ -H "Authorization: Bearer hm_live_..." \ -H "Content-Type: application/json" \ -d '{"agent_id":"agt_01HX...","action_type":"tool_call","description":"Called send_email API","risk_level":"high","cost_cents":12,"tokens_used":840}'

Example response

json
{ "status": "ok", "activity": { "id": "act_01HX...", "action_type": "tool_call", "risk_level": "high" } }

Request an approval

POST/requestApproval

Request human approval for a proposed action. The request lands in the Approvals queue.

Request body

FieldTypeRequired
agent_idstringyes
actionstringyes
descriptionstringno
risk_levelenumno
timeout_minutesnumberno
proposed_payloadobjectno

Example request

bash
curl -X POST https://firsthelm.dev/functions/requestApproval \ -H "Authorization: Bearer hm_live_..." \ -H "Content-Type: application/json" \ -d '{"agent_id":"agt_01HX...","action":"deploy_to_prod","risk_level":"critical","timeout_minutes":30,"proposed_payload":{"service":"billing"}}'

Example response

json
{ "status": "ok", "approval": { "id": "apr_01HX...", "status": "pending", "timeout_minutes": 30 } }

Decide an approval

POST/processApproval

Approve, reject, approve-with-edits, or defer a pending approval.

Request body

FieldTypeRequired
approval_idstringyes
decisionstring — approve|reject|edit_approve|deferyes
reasonstringno
edited_payloadstring (JSON) — for edit_approveno
defer_minutesnumber — for deferno
decided_bystringno

Example request

bash
curl -X POST https://firsthelm.dev/functions/processApproval \ -H "Authorization: Bearer hm_live_..." \ -H "Content-Type: application/json" \ -d '{"approval_id":"apr_01HX...","decision":"approved","reason":"LGTM"}'

Example response

json
{ "status": "ok", "approval": { "id": "apr_01HX...", "status": "approved", "decided_by": "operator@acme.com" } }

Evaluate constraints

POST/evaluateConstraint

Evaluate enabled constraints against a proposed action. Returns pass, violate, or needs_approval.

Request body

FieldTypeRequired
constraint_idstring — evaluate one constraintno
agent_idstringno
action_typestringno
action_descriptionstringno
estimated_cost_centsnumberno

Example request

bash
curl -X POST https://firsthelm.dev/functions/evaluateConstraint \ -H "Authorization: Bearer hm_live_..." \ -H "Content-Type: application/json" \ -d '{"agent_id":"agt_01HX...","action_type":"tool_call","action_description":"send_bulk_email","estimated_cost_cents":1200}'

Example response

json
{ "result": "pass", "violations": 0, "constraints_evaluated": 4 }
Result is pass, violate (one or more blocking constraints breached), or needs_approval (an approval gate applies).

In-app management

These operations are managed in the FirstHelm dashboard rather than over the API:

OperationWhere
List, view, pause, and resume agentsAgents page
List the pending approval queueApprovals page
Create and list missionsMissions page
Pause, resume, redirect, or kill an agentActivity Log or agent detail
Export the audit trailSettings → Compliance → Audit export

Webhooks

Subscribe to platform events. Configure endpoint URLs in Settings → Connections.

EventWhen it firesPayload
approval.requestedAn agent action requires human sign-off{ approval_id, agent_id, action, risk_level, timeout_minutes }
agent.status.changedAn agent transitions status{ agent_id, from, to, reason }
constraint.violatedA constraint is breached{ constraint_id, agent_id, activity_id, severity }
Retry policy: failed deliveries are retried with exponential backoff for up to 24 hours (12 attempts), then deactivated until you acknowledge.

Errors

StatusMeaning
400Bad request — malformed or missing required fields
401Unauthorized — missing, invalid, or revoked API key
404Not found — the referenced resource does not exist
429Rate limit exceeded — 60 requests/minute per key; retry shortly
500Server error — retry with backoff; contact support if persistent
json
{ "error": "Rate limit exceeded. Try again shortly." }

For API questions, integration help, or to report an issue, email support@firsthelm.dev.

© 2026 FirstHelm Technologies Ltd · The human-first control layer for autonomous AI