API Docs

Share generated endpoint docs, OpenAPI, SDK files, and snippets with humans or AI frontend builders.

API Docs

API Docs turns your Spala endpoints into shareable contracts. Use it when a frontend developer, AI coding agent, or external integration needs to know what routes exist and how to call them.

API Docs cover REST

Generated API Docs, OpenAPI JSON, and SDK files are the source of truth for REST endpoints. They may not describe realtime channel protocol, direct-to-storage upload CORS, required signed-upload PUT headers, cookie/CSRF details, refresh/logout behavior, OAuth callback URLs, or mobile app resume behavior. Include those details in the External Frontend Handoff when the project uses them.

What You Can Share

Swagger UI
Interactive browser explorer for testing live endpoints.
/features/api-docs
Markdown Docs
Readable endpoint documentation that works well as AI context.
/features/api-docs
OpenAPI JSON
Machine-readable API contract for tools and clients.
/features/api-docs
SDK
Generated JavaScript or TypeScript client helpers for your published API.
/features/api-docs
Webflow Snippets
Embed-ready snippets for no-code or lightweight frontend pages.
/features/api-docs

Generated Artifact Routes

Settings → API Docs is the easiest way to copy or export the contract. Authenticated project tooling can also request these generated routes from the project base URL:

| Artifact | Route | Notes |
| --- | --- | --- |
| Markdown docs | GET {{PROJECT_BASE_URL}}/api/__internal/docs | Builder-authenticated source for humans and AI agents |
| JSON docs | GET {{PROJECT_BASE_URL}}/api/__internal/docs?format=json | Structured project docs with full URLs |
| OpenAPI JSON | GET {{PROJECT_BASE_URL}}/api/__internal/docs/openapi.json | Use for API clients, Swagger, and codegen |
| TypeScript SDK | GET {{PROJECT_BASE_URL}}/api/__internal/docs/sdk.ts | Generated client helpers for the current project |
| Public Markdown docs | GET {{PROJECT_BASE_URL}}/api/docs | Available only when public API docs are enabled |
| Public JSON docs | GET {{PROJECT_BASE_URL}}/api/docs?format=json | Available only when public API docs are enabled |
| Swagger UI | Settings → API Docs | Dashboard UI; use a direct route only if the selected project explicitly exposes one |

If the generated docs show a base URL with a scoped path, keep it exactly as shown. Do not derive or shorten project URLs from the project name.

Why It Matters

Generated docs reduce the gap between backend and frontend work. Instead of explaining routes manually, you can share the current API contract, let an AI frontend builder read it, and keep implementation details tied to the project state.

Use docs before frontend work

After publishing backend changes, open Settings > API Docs and share the Markdown, OpenAPI JSON, or SDK with the person or agent building the UI.

Recommended Workflow

1. Build or update endpoints in Spala.
2. Test them in the Playground.
3. Publish the backend.
4. Open Settings > API Docs.
5. Share the best format for the consumer: Markdown for AI, Swagger for manual testing, OpenAPI for tooling, SDK for app code.
6. Add separate handoff details for realtime, signed uploads, cookies/CSRF, refresh/logout, mobile callbacks, and CORS when those features are used.

Public Docs Switch

The internal generated docs require builder authentication. Public GET /api/docs is available only when public API docs are enabled in project security settings. Leave public docs off for private APIs unless you intentionally want unauthenticated consumers to read the contract.

API Playground
/features/playground
Test endpoints before sharing docs
Frontend App
/features/frontend-app
Host the app UI that consumes the API
API Endpoints
/endpoints
Create the routes that appear in generated docs
External Frontend Handoff
/guides/frontend-handoff
Copy the complete packet for frontend builders