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.

Each mock endpoint belongs to a project and is live as soon as you save it. You can create as many mocks as your project needs — one per route, or one per scenario.
1

Open API Mocks

Go to your project dashboard and click API Mocks in the sidebar.
2

Create a new mock

Click New Mock in the top-right corner. A dialog opens with the mock configuration form.
3

Give it a name

Enter a Name for the mock. This is for your reference only — it appears in the mock list but is not part of the URL.You can also add an optional Description to document its purpose.
4

Set the method and path

Choose the HTTP method from the dropdown: GET, POST, PUT, PATCH, or DELETE.Enter the endpoint path in the path field. The path must start with /, for example /users or /orders/123. This value becomes the last segment of your mock URL.
5

Configure the response

  • Status code — The HTTP status code to return. Defaults to 200. Use 201 for successful creations, 404 for not-found scenarios, and so on.
  • Response body — The body returned with every response. Accepts any text or JSON. Defaults to {"message": "Hello World"}.
  • Response headers — A JSON object of headers to include. Defaults to {"Content-Type": "application/json"}. You can add any headers your integration expects.
6

Save the mock

Click Create Mock. The mock is immediately live — you can start sending requests to its URL right away.

Example: GET /users

Here is a complete example of a mock that returns a list of users:
FieldValue
NameList users
MethodGET
Path/users
Status code200
Response body[{"id": 1, "name": "Alice"}, {"id": 2, "name": "Bob"}]
Response headers{"Content-Type": "application/json"}
Once saved, you can call it with curl:
curl https://abc12345-my-api.swisstools.dev/api/mock/users
# Returns: [{"id": 1, "name": "Alice"}, {"id": 2, "name": "Bob"}]

Edit a mock

To update an existing mock, click the edit icon next to it in the mock list. The same form opens pre-filled with the current values. Change any field and click Update Mock — the change takes effect immediately.

Delete a mock

To remove a mock, click the delete icon next to it in the mock list. Deleting a mock is permanent; any requests to its URL will no longer match and will return a not-found response.