godelgate Book a demo

HTTP API

The MCP endpoint, the admin API and the public endpoints.

#Authentication

EndpointsCredential
/mcpA user key: Authorization: Bearer <key>
/api/* (admin)The admin token: Authorization: Bearer <token>, or ?token=<token> for the event stream
/api/* (Cloud)The gg_session cookie from signing in
/healthz, /api/demo, POST /api/leadsNone

#MCP

#POST|GET|DELETE /mcp

The MCP Streamable HTTP endpoint. See MCP gateway.

#Admin

#GET /api/state

Everything the dashboard shows:

json
{
  "servers": [{ "name": "github", "kind": "http", "url": "https://api.githubcopilot.com/mcp/", "oauth": false,
                "status": "connected", "connected": true, "error": null,
                "tools": [{ "name": "create_issue", "fullName": "github__create_issue", "description": "…",
                            "labels": ["egress"], "manualLabels": false, "readOnly": false,
                            "destructive": null, "quarantined": null }] }],
  "sessions": [{ "id": "…", "user": "alice", "taint": { "private": "github__get_file" },
                 "startedAt": 1792590000000, "lastSeen": 1792590060000, "calls": 4 }],
  "approvals": [{ "id": "…", "user": "alice", "tool": "github__delete_repo", "args": "{…}",
                  "reason": "…", "requestedAt": 1792590000000, "expiresAt": 1792590300000 }],
  "calls": [{ "id": "…", "ts": 1792590000000, "user": "alice", "tool": "…", "decision": "deny",
              "reason": "…", "status": "denied" }],
  "policy": { "default": "allow", "trifecta": "block", "approvalTimeoutSeconds": 300, "rules": [] }
}

calls holds the latest 200; sessions the 100 most recently active.

#Live events

GET /api/events?token=<admin token> is a Server-Sent Events stream:

EventData
callA call record, each time one is created or updated
approvalsThe full list of pending approvals, whenever it changes
bash
curl -N "https://your-gate/api/events?token=$GODELGATE_ADMIN_TOKEN"

#POST /api/approvals/:id

Approve or reject a pending call. Body: {"approve": true, "by": "alice"}. approve must be exactly true to approve; anything else rejects. Returns 404 if the call isn't pending.

#POST /api/servers/:server/refresh

Re-read a server's tools now, applying tool pinning.

#POST /api/servers/:server/tools/:tool/trust

Pin the current definition of a tool and lift its quarantine. :tool is the tool's upstream name, without the server prefix.

#GET /api/leads

Demo requests and newsletter sign-ups from the landing page.

#Audit log

#GET /api/calls

The audit log, newest first. Query parameters, all optional: user, status, decision, tool (substring), q (searches tool, user, reason and arguments), since and before (milliseconds), limit (default 200). Page back by passing the oldest ts you have as before. Returns { "calls": [...], "users": [...] }.

#GET /api/calls.csv

The same filters, as a CSV download of up to 10,000 calls. Cells that a spreadsheet would run as a formula are prefixed with '.

#Cloud workspaces

Available when cloud.enabled is true. The dashboard authenticates with an HttpOnly session cookie set by sign-up or sign-in. Cookie-authenticated writes must send content-type: application/json. Endpoints marked admin need the owner or admin role and return 403 otherwise.

#Accounts

EndpointDescription
POST /api/auth/signupBody: email, password (10+ characters), optional workspace, optional invite. Creates the account and signs in; with an invite, joins that workspace instead of creating one. 409 if the email is taken.
POST /api/auth/loginBody: email, password, optional invite. 401 on wrong credentials.
POST /api/auth/logoutEnds the session.
GET /api/auth/providers{"google": true} when Google sign-in is set up.
GET /auth/googleStarts Google sign-in. Optional ?invite=<token> joins that workspace.
GET /auth/google/callbackWhere Google sends the browser back. Signs in and redirects to /app, or to /login?error=….
GET /api/meThe signed-in member: email, role, groups, current workspace, all workspaces, and mcpUrl.
POST /api/account/passwordBody: current, next. Signs out your other sessions.

Sign-up is limited to 5 and sign-in to 10 attempts per minute per client.

#Workspaces

EndpointDescription
POST /api/workspacesBody: name. Creates a workspace you own and switches to it.
POST /api/workspaces/switchBody: id. Switches this session's current workspace.
PATCH /api/workspaceAdmin. Body: name. Renames the current workspace.

#Keys

EndpointDescription
GET /api/keysYour active keys in this workspace (name, prefix, created, last used).
POST /api/keysBody: name. Returns the new key once.
DELETE /api/keys/:idRevokes a key.

#Servers

EndpointDescription
GET /api/catalogThe server catalog.
POST /api/serversAdmin. Body: name, url, optional headers (object), oauth (boolean), catalog (a catalog id, which fills in the URL, sign-in and labels). With type: "openapi", url is an OpenAPI document and baseUrl is optional. With type: "hosted": runtime (npx or uvx), package, args, env — answers status: "connecting" and starts the microVM in the background. Connects at once and returns status (connected, needs_auth, error), error and, for OAuth, authorizeUrl to send the person to.
PATCH /api/servers/:nameAdmin. Body: any of url, headers (a header set to "" is removed; headers left out keep their value), oauth. Reconnects.
DELETE /api/servers/:nameAdmin. Removes the server, its credentials and its tool pins.
POST /api/servers/:name/reconnectAdmin. Connects again.
POST /api/servers/:name/oauthAdmin. Starts signing in; returns authorizeUrl. Body {"reset": true} forgets the current sign-in first.
POST /api/servers/:name/tools/:tool/labelsAdmin. Body: {"labels": ["private"]}, or {"labels": null} to return to automatic labels.
GET /oauth/callbackWhere OAuth servers send the browser back. Finishes sign-in and redirects to the dashboard.

#Policy

PUT /api/policy (admin) replaces the workspace policy. The body is the policy object described in Configuration. Invalid policies are refused with 400 and the first problem.

#Models, usage and Chat

EndpointDescription
GET /api/llmProvider keys (masked, for admins), budgets, prices, proxy URLs and this month's spend
PUT /api/llmAdmin. Any of anthropicKey, openaiKey (null removes), monthlyBudget, memberBudget (USD or null), prices ({model: {input, output}}, USD per million tokens)
GET /api/usageThis month's usage: totals, by person, by model, by day and recent requests. Members get their own.
POST /api/chatBody: messages (Messages API format), model, conversation. Answers with Server-Sent Events: text, tool, tool_result, usage, done (the updated messages) or error.
POST /llm/...The LLM proxy, authenticated with a gg_ key

#SSO, SCIM and telemetry

EndpointDescription
GET /api/sso, PUT /api/sso, DELETE /api/ssoOwner. The SSO connection: type (oidc with issuer, clientId, clientSecret; or saml with metadataXml, or entryPoint and idpCert), defaultRole, enforced
POST /api/sso/domains, POST /api/sso/domains/:domain/verify, DELETE /api/sso/domains/:domainOwner. Domains and DNS verification
POST /api/scim/token, DELETE /api/scim/tokenOwner. Create (shown once) or revoke the SCIM token
/scim/v2/Users, /scim/v2/GroupsSCIM 2.0, with the SCIM token; see Single sign-on and SCIM
POST /api/auth/ssoPublic. Body email; returns the SSO start URL for that email's domain
GET /api/telemetry, PUT /api/telemetry, POST /api/telemetry/testAdmin. The OpenTelemetry collector (endpoint, headers)
GET /metricsPrometheus metrics, with the admin token

#Team

EndpointDescription
GET /api/membersMembers (email, role, groups, joined) and, for admins, pending invites.
PATCH /api/members/:accountIdAdmin. Body: role and/or groups. Ends the member's open MCP sessions.
DELETE /api/members/:accountIdAdmin. Removes the member and revokes their keys in this workspace.
POST /api/invitesAdmin. Body: role, optional email. Returns the invite url.
DELETE /api/invites/:idAdmin. Revokes a pending invite.
GET /api/invites/:tokenPublic: the workspace name and role an invite is for.
POST /api/invites/:token/acceptJoins the workspace with the signed-in account.

#Public

#GET /healthz

Returns {"ok": true}.

#POST /api/demo

Runs the attack demo on an isolated in-memory gate and returns the steps. Only when demo.public is true. Limited to 10 per minute per IP.

#POST /api/leads

Stores a demo request. Body: email (required), company, teamSize, message. Limited to 5 per minute per IP.

#Errors

Admin and public endpoints return errors as JSON, {"error": "…"}, with status 400, 401, 404, 429 or 500. The MCP endpoint answers a missing or unknown key with a plain-text 401.