Skip to content

API reference

Forginate exposes a REST API on the product host. The SPA is itself a client of this API, so everything the UI can do has an HTTP endpoint behind it.

Evolving, unversioned API

The API is unversioned and evolving. Endpoints listed here reflect the current implementation and may change without notice. Treat this page as an honest survey, not a contract.

Base URL

All endpoints are served under /api/ on the product host:

https://dev.forginate.com/api/...

Tenant resources follow the convention:

/api/orgs/:orgSlug/<resource>...

where :orgSlug is your organization's slug (e.g. acme-corp). Every request is authorized against your membership and role in that organization.

Authentication

Two mechanisms are accepted:

Logging in through the web UI sets a JWT session cookie named forginate_session. The SPA uses this transparently; it is not intended for programmatic clients.

Personal access tokens (programmatic)

Create a token under your account settings (or via POST /api/me/tokens). Tokens look like fgn_pat_<random>; the plaintext secret is shown once at creation and stored hashed server-side. Send it as a bearer token:

bash
curl -H "Authorization: Bearer fgn_pat_..." \
  https://dev.forginate.com/api/orgs/acme-corp/projects

Token properties:

  • Scopes: read, write, admin. Managing tokens themselves requires a session or an admin-scoped PAT (a read PAT cannot mint new tokens).
  • Optional org binding — a token can be limited to one organization.
  • Optional expiry — up to 365 days; omitted means no expiry.
  • Revocable at any time; creation and revocation are audit-logged and rate-limited.

Token management endpoints:

MethodPathPurpose
GET/api/me/tokensList your tokens (metadata only)
POST/api/me/tokensCreate a token; returns the secret once
DELETE/api/me/tokens/:idRevoke a token

Resource groups

The representative endpoints below are taken from the gateway's route implementations. This is not exhaustive — the pipeline surface in particular has many more action endpoints.

Projects & teams

MethodPathPurpose
GET/api/orgs/:orgSlug/projectsList projects
POST/api/orgs/:orgSlug/projectsCreate a project
GET/api/orgs/:orgSlug/projects/:projectSlugProject detail
PATCH/api/orgs/:orgSlug/projects/:projectSlugUpdate a project
GET / POST/api/orgs/:orgSlug/projects/:projectSlug/teamProject team & invites
GET / POST/api/orgs/:orgSlug/membersOrg members & invites
POST/api/orgs/:orgSlug/transfer-ownershipTransfer org ownership

Requests (pipeline)

Improvement/build requests are the unit of pipeline work.

MethodPathPurpose
GET / POST/api/orgs/:orgSlug/requestsList / create requests
GET / PATCH/api/orgs/:orgSlug/requests/:requestIdRequest detail / update
GET/api/orgs/:orgSlug/requests/:requestId/lifecycleFull pipeline lifecycle view
POST/api/orgs/:orgSlug/requests/:requestId/advanceAdvance the request a stage
POST/api/orgs/:orgSlug/requests/:requestId/advance-to-buildMove into build
POST/api/orgs/:orgSlug/requests/:requestId/build-tasks/run-allRun all build tasks
POST/api/orgs/:orgSlug/requests/:requestId/build/pausePause the build
GET/api/orgs/:orgSlug/requests/:requestId/build-cost-estimateEstimated build cost
POST/api/orgs/:orgSlug/requests/:requestId/integration/approveApprove merge/integration

Improvement requests (bug reports / feature asks, including auto-filed deployment incidents) live alongside these:

MethodPathPurpose
GET / POST/api/orgs/:orgSlug/projects/:projectSlug/improvementsList / file improvements
POST/api/orgs/:orgSlug/improvements/:id/approveApprove an improvement for build
POST/api/orgs/:orgSlug/improvements/:id/rejectReject it

Documents

Planning documents (TOC + section docs) with versioning, approval, feedback, and AI editing.

MethodPathPurpose
GET/api/orgs/:orgSlug/products/:productId/documentsList a product's documents
GET/api/orgs/:orgSlug/documents/:docIdDocument detail
GET/api/orgs/:orgSlug/doc-versions/:versionId/contentVersion body
POST/api/orgs/:orgSlug/doc-versions/:versionId/approveApprove a version
POST/api/orgs/:orgSlug/doc-versions/:versionId/request-changesRequest changes
POST/api/orgs/:orgSlug/documents/:docId/editDirect edit
POST/api/orgs/:orgSlug/documents/:docId/regenerateAI regeneration
POST/api/orgs/:orgSlug/patches/:patchId/acceptAccept an AI-proposed patch
GET / POST/api/orgs/:orgSlug/products/:productId/sharesPublic share links
POST/api/orgs/:orgSlug/shares/:shareId/revokeRevoke a share

Runs

MethodPathPurpose
GET / POST/api/orgs/:orgSlug/projects/:projectSlug/runsList / start runs
GET/api/orgs/:orgSlug/projects/:projectSlug/runs/:runIdRun status
POST/api/orgs/:orgSlug/projects/:projectSlug/runs/:runId/cancelCancel a run
GET/api/orgs/:orgSlug/projects/:projectSlug/runs/:runId/eventsLive event stream (SSE)
GET/api/orgs/:orgSlug/runs/:runId/logsRun logs
GET/api/orgs/:orgSlug/eventsOrg-wide event stream (SSE)

Deploy targets & deployments

See Deployment lifecycle for semantics.

MethodPathPurpose
GET / POST/api/orgs/:orgSlug/deploy-targetsList / register targets
POST/api/orgs/:orgSlug/deploy-targets/:id/rotate-keyRotate an agent enrollment key
DELETE/api/orgs/:orgSlug/deploy-targets/:idRemove a target
GET / POST/api/orgs/:orgSlug/deploymentsList / create deployments
GET/api/orgs/:orgSlug/deployments/:idDeployment detail (incl. telemetry)
POST/api/orgs/:orgSlug/deployments/:id/approveApprove the plan → deploy
POST/api/orgs/:orgSlug/deployments/:id/replanRe-run the planner
POST/api/orgs/:orgSlug/deployments/:id/stopStop (scale to zero)
POST/api/orgs/:orgSlug/deployments/:id/startStart a stopped app
POST/api/orgs/:orgSlug/deployments/:id/scaleScale a workload
POST/api/orgs/:orgSlug/deployments/:id/teardownDelete the workload
POST/api/orgs/:orgSlug/deployments/:id/separateHand the workload over to you
POST/api/orgs/:orgSlug/deployments/:id/request-logsAsk for fresh logs
GET/api/orgs/:orgSlug/deployments/:id/metricsResource metrics
GET/api/orgs/:orgSlug/deployments/:id/uptimeAvailability history

Billing & usage

MethodPathPurpose
GET/api/orgs/:orgSlug/billingPlan, usage, next invoice
GET/api/orgs/:orgSlug/billing/plansAvailable plans
POST/api/orgs/:orgSlug/billing/checkoutStripe Checkout session
POST/api/orgs/:orgSlug/billing/portalStripe customer portal
GET / PUT/api/orgs/:orgSlug/billing/payment-methodPayment method
GET/api/orgs/:orgSlug/usageUsage / cost breakdown

Other groups

  • GitHub/api/orgs/:orgSlug/github/...: GitHub App install flow, repo listing, repo provisioning and linking.
  • Providers/api/orgs/:orgSlug/providers...: bring-your-own LLM provider configs (create, test, set default).
  • Attachments/api/orgs/:orgSlug/attachments...: file uploads bound to requests/docs.
  • AuditGET /api/orgs/:orgSlug/audit: append-only audit log (admin-only).
  • Share portal/api/share/*: public, token-authenticated document review; no login, no org context.
  • Admin & internal/api/admin/* (platform-operator only) and /internal/* (cluster-internal service-to-service, not reachable externally). These are not part of the user-facing surface.

Errors

Errors are JSON bodies with an error code (e.g. deployment_not_found, insufficient_scope, invalid_status) and conventional HTTP status codes (400 validation, 401/403 auth, 404 not found, 409 state conflict, 429 rate limit). Exact shapes are not yet standardized across all routes.

Forginate — build software with an AI factory.