An API file defines one HTTP endpoint's typed request and response contract for Components and Storage API loaders.
Property: Identity · Current behavior: files below apis/
Property: Method · Current behavior: GET, POST, PUT, or DELETE
Property: Request · Current behavior: host/path Config, string Headers, typed Query and Body
Property: Response · Current behavior: typed Object or List
Property: Tests · Current behavior: named request test cases with Query/Body values
Property: MCP · Current behavior: read/set method, credentials, response kind, fields, test cases
Credentials can be Off or Send Cookies. Query supports string, number, and boolean. Body/Response use the supported nested field editor. Generated TypeScript exposes Config, Headers, Query, Body, and Response types; List returns the response shape as an array.
Components mount the API and supply runtime values; Storage can attach it in an API Loader.
Use get-api; method/credentials/response-kind setters; API field add/update/delete; and test-case add/delete. Component logic uses mount-data-source and set-api-request with current field identities.
Host/path must form a usable URL and browser CORS/cookie/auth policy must work from the final origin. Client output must not include server secrets. A POST/PUT/DELETE test can mutate an external system.
Definitions are persisted/undoable in their file model; external requests are not. Changing a field can break Component or Storage mounts.