Skip to main content

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.

Every mock endpoint is reachable at a URL derived from your team, project, and the path you configured. You can call these URLs from any HTTP client — curl, your application code, a test suite, or a tool like Postman.

URL format

https://<team_ref>-<project_slug>.swisstools.dev/api/mock/<path>
  • <team_ref> — Your team’s 8-character reference ID (letters and digits, no dashes).
  • <project_slug> — Your project’s slug, which may contain dashes.
  • <path> — The endpoint path you configured for the mock, without the leading /.
The subdomain is always <team_ref>-<project_slug> — the first - separates the team reference from the project slug, so slugs with dashes are handled correctly.

Examples

# Mock configured with path /users
curl https://abc12345-myproject.swisstools.dev/api/mock/users

# Mock configured with path /products/featured
curl https://abc12345-myproject.swisstools.dev/api/mock/products/featured

# POST mock with a body
curl -X POST https://abc12345-myproject.swisstools.dev/api/mock/orders \
  -H "Content-Type: application/json" \
  -d '{"item": "widget"}'

Query parameters

You can include query parameters in your request and they will be passed through to the mock endpoint. However, your mock always returns the same configured response regardless of the query string — Swisstools does not use query parameters to route or vary responses.
# These two requests return the same response
curl https://abc12345-myproject.swisstools.dev/api/mock/users
curl https://abc12345-myproject.swisstools.dev/api/mock/users?page=2&limit=10

Method matching

Each mock is tied to a specific HTTP method and path combination. If you send a request with a method that does not match a configured mock at that path, it will not match — only the exact method you configured is handled.
Find your project’s base URL on the project overview page. You can copy it directly from there rather than assembling it manually from your team reference ID and project slug.
Mocks always return the same configured response — there is no built-in way to return different responses to the same endpoint based on request content. If you need to simulate different scenarios (for example, a success case and an error case), create separate mocks with different paths, such as /users/success and /users/error, and point your code at the appropriate one.