HTTP API reference
56 endpoints across 14 groups. Every route exposed by the AutoGeo backend.
Methods that take a request body expect application/json. HMAC-authed routes additionally require a body signature header when the plugin HMAC secret is configured. See the plugin SDK for the exact header name.
Chat
- POSTPlugin HMAC
/api/chatRun one orchestrator turn. SSE stream of text/tool_use events.
Rate-limited per device. Returns X-Request-Id. Also emits persona_activated/persona_text/persona_tool_use/persona_done/synthesis_text/synthesis_done events when the persona router fans out. Server-side tools (http_fetch, inspect_rest_endpoint, etl_normalize, vocab_resolve, register_dynamic_tool) are executed inline without client round-trips. web_search uses Anthropic native search.
- POSTPlugin HMAC
/api/dsl/compileCompile a natural-language workflow description into a validated DslWorkflowT JSON.
Round 21+. GIS Analyst persona composes the DAG. Returns { workflow: DslWorkflowT, execution_plan: { step_count, parallel_batches, batches } }. Validates toposort; 422 on cycle, duplicate id, or schema error.
- POSTPlugin HMAC
/api/conversations/[id]/viewportRecord a viewport snapshot (bbox + visible layers) for the orchestrator to reference.
- GETPlugin HMAC
/api/conversations/[id]/viewportFetch the most-recent viewport snapshot for the conversation.
- GETPlugin HMAC
/api/conversations/[id]/commandsPending map commands the orchestrator wants the plugin to execute (zoom_to_bbox, add_layer, …).
- POSTPlugin HMAC
/api/conversations/[id]/commandsPlugin acks executed map command by id.
Workflows
- GETClerk session
/api/workflowsList personal + org-shared workflows visible to the user. ?q= and ?domain= filters.
- POSTClerk session
/api/workflowsCreate a new personal workflow.
- GETClerk session
/api/workflows/[id]Read a workflow definition.
- PUTClerk session
/api/workflows/[id]Update a personal workflow.
- DELETEClerk session
/api/workflows/[id]Delete a personal workflow.
- POSTPlugin HMAC
/api/workflows/[id]/runAdvance a workflow run by one step. ?step=N selects the step.
- GETPlugin HMAC
/api/workflows/[id]/runsList recent runs of a workflow for the caller.
- POSTPlugin HMAC
/api/workflows/[id]/runs/[runId]/resumeResume a failed or canceled run from current_step.
- POSTPlugin HMAC
/api/workflows/[id]/runs/[runId]/retryRetry a failed run's specific step. Optional { step: N } body rewinds to an earlier index.
Capped at 3 attempts per step; budget tracked via audit_log.
- POSTPlugin HMAC
/api/workflows/[id]/runs/[runId]/cancelCooperative cancel of a pending/running workflow run.
- GETPublic
/api/marketplace/listingsBrowse published community workflow listings. ?q= and ?tag= filters.
- POSTClerk session
/api/marketplace/listingsPublish (or re-publish) one of the caller's own workflows.
- GETPublic
/api/marketplace/listings/[slug]Single listing detail. Non-public statuses 404 unless caller is the author.
- DELETEClerk session
/api/marketplace/listings/[slug]Author unpublishes; status flips to removed (existing installs survive).
- POSTClerk session
/api/marketplace/listings/[slug]/installInstall a listing: clones the snapshot into caller's workflows. Idempotent.
License-gated (active paid subscription required).
- POSTClerk session
/api/marketplace/listings/[slug]/reportFile an abuse report. Reasons: spam | malicious | broken | impersonation | other.
- POSTClerk session
/api/marketplace/listings/[slug]/upvoteToggle the caller's upvote on a published listing. License-gated. Returns { upvoted, count }.
Jobs
- POSTPlugin HMAC
/api/jobs/startCreate a long-running job row. Returns job_id immediately.
- GETPlugin HMAC
/api/jobs/[id]Poll a job's status and progress.
- PATCHPlugin HMAC
/api/jobs/[id]Sidecar reports progress / completion.
License
- GETPlugin HMAC
/api/license/verifyPlugin heartbeat. Returns license state; upserts device row.
Audits device_registered on first heartbeat per (user, device).
Tools
- GETPlugin HMAC
/api/tools/catalogReturn filtered tool catalog. ?counts=1 is public (capability counter).
- POSTPlugin HMAC
/api/tools/catalogSidecar uploads its introspected catalog keyed by version fingerprint.
Audit
- GETClerk session
/api/auditRead the caller's own audit log. ?format=csv exports SIEM-ready CSV.
- POSTPlugin HMAC
/api/audit/ingestSidecar emits audit events for sidecar-side activity (refusals, workflow step transitions).
Strict allow-list of actions; HMAC body-signed; per-device rate limited.
Billing
- GETClerk session
/api/stripe/checkoutCreate Stripe Checkout session for byo|managed × monthly|annual.
- GETClerk session
/api/stripe/portalRedirect to the Stripe Customer Portal.
- POSTStripe sig
/api/stripe/webhookSubscription lifecycle webhook. Mirrors to subscriptions table + drip scheduler.
- GETVercel cron
/api/usage/reportCron tick: batches usage_ledger to Stripe Meter Events.
- POSTClerk session
/api/usage/capSelf-serve monthly cap + notify-at editor; supports unpause.
- GETClerk session
/api/entitlementsReturns the caller's active vertical-pack entitlements (insurance | real_estate | … | suite).
- GETVercel cron
/api/email/drip/tickCron tick: send any due drip-mail rows via Resend.
BYO key
- POSTClerk session
/api/byo-keyAdd or remove the user's Anthropic key (envelope encrypted with KMS).
Devices
- POSTClerk session
/api/devices/[deviceId]/revokeSelf-serve revoke of the caller's own device.
Admin
- POSTClerk session
/api/admin/devices/[deviceId]/revokeTeam owner/admin revokes any device belonging to an org member.
Three-gate auth: signed-in → Team role → target user in same org.
- GETClerk session
/api/admin/auditOrg-scoped audit log read with filters + CSV export. Team owner/admin only.
- GETClerk session
/api/admin/workflowsList org-shared workflows.
- POSTClerk session
/api/admin/workflowsCreate an org-shared workflow (user_id NULL, org_id set).
- DELETEClerk session
/api/admin/workflows/[id]Delete an org-shared workflow (own-org guard).
- POSTClerk session
/api/admin/workflows/[id]/deleteForm-friendly POST shim for the DELETE above.
- POSTClerk session
/api/admin/marketplace/[slug]/approveMarketplace moderator approves an in_review listing → published.
Gated by MARKETPLACE_MODERATORS env-var allow-list, not the Team-tier admin role.
- POSTClerk session
/api/admin/marketplace/[slug]/rejectMarketplace moderator rejects an in_review listing. Reason is required (visible to the author).
- POSTClerk session
/api/admin/marketplace/[slug]/featureMarketplace moderator toggles is_featured. Audit-logged as marketplace_listing_featured.
Gated by MARKETPLACE_MODERATORS env-var allow-list.
- POSTClerk session
/api/profile/handleClaim or change the caller's public marketplace handle. 409 on collision.
- DELETEClerk session
/api/profile/handleClear the caller's handle (revert to anonymous attribution).
OG images
- GETPublic
/api/og/blog/[slug]Dynamic OG image (1200×630 PNG) for blog post share previews.
- GETPublic
/api/og/marketplace/[slug]Dynamic OG image for marketplace listing share previews. Reads listing from DB.
Health
- GETPublic
/api/healthLiveness + DB readiness probe for uptime monitors.
Returns 200 ok / 503 when DB unreachable. no-store cache header.
BI
- POSTPlugin HMAC
/api/bi/exportNon-streaming spatial export for BI platforms. Runs the full AI analysis and returns a JSON payload with answer, table (columns + rows), optional GeoJSON, and citations. Used by Google Sheets add-on and Power BI Connector.
Accepts { question, context?, packSlug?, format: 'table' | 'geojson', surface }. Returns { answer, table?, geojson?, citations }. Rate-limited per device. Surface must be licensed.
- POSTClerk session
/api/stripe/bi-checkoutInitiate Stripe Checkout for a BI platform plugin subscription. Query params: surface, billing (byo | managed), cadence (monthly | annual). Returns a Stripe Checkout session URL.
Headers AutoGeo emits
X-Request-Id— present on every response. InboundX-Request-Idis honoured when it matches/^[A-Za-z0-9_-]{6,128}$/; otherwise a UUID is generated. Quote it on every support email.Content-Security-Policy— strict by default (frame-ancestors none); relaxed only on /workflows/templates/[id]/embed.Strict-Transport-Security,X-Content-Type-Options,Referrer-Policy,Permissions-Policyon every response.