reference

Conventions, errors, pagination and the endpoints you'll use most.

REST API reference

Base URL: https://api.tngat.com. All requests are JSON and authenticated with Authorization: Bearer <api-key>.

Scoping

Org-scoped requests accept an optional ?orgId= override; without it the caller's active organization is used. Project- and service-scoped routes derive the org from the resource and verify the caller's role on it.

Listing and pagination

List endpoints accept ?limit=, ?cursor= and, on services, ?q= for search. The response body stays a plain array for compatibility, and the paging metadata rides in headers:

HeaderMeaning
x-page-limitThe effective page size.
x-has-moretrue when another page exists.
x-next-cursorPass as ?cursor= to fetch the next page.

Errors

StatusMeaning
400The request is malformed or a referenced resource is not a valid target.
401Missing, invalid or revoked credentials.
403Authenticated, but the role lacks the permission; the message names it.
404Not found, or not visible to this organization.
409Conflict — a slug or hostname is already taken.
413A storage or resource quota would be exceeded.
503The organization is suspended; provisioning is paused.

Errors always carry a JSON body of the form { "message": "...", "code": "..." }.

Most-used endpoints

MethodPathPurpose
GET/api/v1/projectsList projects in the active org.
POST/api/projectsCreate a project and its environments.
POST/api/v1/projects/:slug/transferMove a project to another org.
GET/api/v1/projects/:slug/environmentsEnvironments and their variables.
POST/api/v1/databasesProvision a managed database.
POST/api/v1/storage/bucketsCreate a bucket.
POST/api/v1/sandboxesCreate a sandbox.
POST/api/v1/functionsDeploy an edge function.
GET/api/auditQuery the audit log.
GET/api/org/exportExport a secret-free tenant document.

Audit

Every mutating call writes an audit row naming the actor, the action, the target and the request outcome. Machine actors are recorded separately from people, so a service account's changes are distinguishable from a member's.