API mocks let you define a fake HTTP endpoint — method, path, status code, response headers, and body — that Swisstools serves at a stable subdomain URL. You point your application or tests at that URL during development instead of a real upstream API. Each mock is served at:Documentation Index
Fetch the complete documentation index at: https://docs.swisstools.dev/llms.txt
Use this file to discover all available pages before exploring further.
referenceId is aB3cD4eF and your project slug is payments-api, a mock with endpoint /users is reachable at:
List Mocks
GET /api/projects/:projectId/mocks
Returns all mock endpoints defined for the specified project.
Path Parameters
The UUID of the project.
Create Mock
POST /api/projects/:projectId/mocks
Creates a new mock endpoint for the project.
Path Parameters
The UUID of the project.
A human-readable name for the mock, used in the dashboard.
The HTTP method this mock responds to. Accepted values:
GET, POST, PUT, PATCH, DELETE. Defaults to GET.The path this mock handles, relative to
/api/mock/. For example, /users or /orders/123.The raw response body to return. JSON must be provided as a string. Defaults to
{}.Key-value pairs of HTTP response headers. Defaults to an empty object.
The HTTP status code the mock returns. Defaults to
200.An optional description of what this mock simulates.
201 Created
Get Mock
GET /api/projects/:projectId/mocks/:mockId
Returns a single mock endpoint by its ID.
Path Parameters
The UUID of the project.
The UUID of the mock.
Update Mock
PUT /api/projects/:projectId/mocks/:mockId
Updates one or more fields of an existing mock endpoint.
Path Parameters
The UUID of the project.
The UUID of the mock to update.
Updated display name.
Updated HTTP method.
Updated endpoint path.
Updated response body string.
Updated response headers.
Updated HTTP status code.
Updated description.
Delete Mock
DELETE /api/projects/:projectId/mocks/:mockId
Permanently removes a mock endpoint.
Path Parameters
The UUID of the project.
The UUID of the mock to delete.
Mock Object
UUID that uniquely identifies the mock.
UUID of the project that owns this mock.
Display name shown in the dashboard.
Optional description of what this mock simulates.
HTTP method this mock responds to (
GET, POST, PUT, PATCH, DELETE).The path relative to
/api/mock/ at which this mock is served on the subdomain.The raw string returned as the response body when the mock is invoked.
Key-value HTTP response headers returned when the mock is invoked.
HTTP status code returned when the mock is invoked.
ISO 8601 timestamp of creation.
ISO 8601 timestamp of the last update.