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.

Projects are the container for all Swisstools resources — API mocks, webhook inboxes, feature flags, and release notes all belong to a project. A project’s slug and its team’s referenceId together form the subdomain used to serve mock and webhook traffic. All project endpoints require session authentication. See Authentication for details.

List Projects

GET /api/teams/:teamId/projects Returns all projects that belong to the specified team. Path Parameters
teamId
string
required
The UUID of the team.
Request
curl https://swisstools.dev/api/teams/018e4f2a-1c3d-7b8e-9f0a-2b3c4d5e6f7a/projects \
  -b cookies.txt
Response
[
  {
    "id": "018e5a3b-2d4e-8c9f-a0b1-3c4d5e6f7a8b",
    "teamId": "018e4f2a-1c3d-7b8e-9f0a-2b3c4d5e6f7a",
    "name": "Payments API",
    "slug": "payments-api",
    "description": "Mock endpoints and webhooks for the payments service.",
    "createdAt": "2024-02-01T10:00:00.000Z",
    "updatedAt": "2024-02-01T10:00:00.000Z"
  }
]

Create Project

POST /api/teams/:teamId/projects Creates a new project within the specified team. Path Parameters
teamId
string
required
The UUID of the team that will own the project.
Request Body
name
string
required
The display name of the project.
slug
string
required
A URL-friendly identifier. Used as part of the subdomain for mock and webhook URLs. Must be unique within the team.
description
string
An optional description of the project.
Request
curl -X POST https://swisstools.dev/api/teams/018e4f2a-1c3d-7b8e-9f0a-2b3c4d5e6f7a/projects \
  -b cookies.txt \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Payments API",
    "slug": "payments-api",
    "description": "Mock endpoints and webhooks for the payments service."
  }'
Response201 Created
{
  "id": "018e5a3b-2d4e-8c9f-a0b1-3c4d5e6f7a8b",
  "teamId": "018e4f2a-1c3d-7b8e-9f0a-2b3c4d5e6f7a",
  "name": "Payments API",
  "slug": "payments-api",
  "description": "Mock endpoints and webhooks for the payments service.",
  "createdAt": "2024-02-01T10:00:00.000Z",
  "updatedAt": "2024-02-01T10:00:00.000Z"
}

Get Project

GET /api/teams/:teamId/projects/:projectId Returns a single project by its ID. Path Parameters
teamId
string
required
The UUID of the team.
projectId
string
required
The UUID of the project.
Request
curl https://swisstools.dev/api/teams/018e4f2a-1c3d-7b8e-9f0a-2b3c4d5e6f7a/projects/018e5a3b-2d4e-8c9f-a0b1-3c4d5e6f7a8b \
  -b cookies.txt
Response
{
  "id": "018e5a3b-2d4e-8c9f-a0b1-3c4d5e6f7a8b",
  "teamId": "018e4f2a-1c3d-7b8e-9f0a-2b3c4d5e6f7a",
  "name": "Payments API",
  "slug": "payments-api",
  "description": "Mock endpoints and webhooks for the payments service.",
  "createdAt": "2024-02-01T10:00:00.000Z",
  "updatedAt": "2024-02-01T10:00:00.000Z"
}

Update Project

PUT /api/teams/:teamId/projects/:projectId Updates the name, slug, or description of an existing project. Path Parameters
teamId
string
required
The UUID of the team.
projectId
string
required
The UUID of the project to update.
Request Body
name
string
Updated display name.
slug
string
Updated URL-friendly slug. Changing the slug also changes the subdomain used for mocks and webhooks.
description
string
Updated description.
Request
curl -X PUT https://swisstools.dev/api/teams/018e4f2a-1c3d-7b8e-9f0a-2b3c4d5e6f7a/projects/018e5a3b-2d4e-8c9f-a0b1-3c4d5e6f7a8b \
  -b cookies.txt \
  -H "Content-Type: application/json" \
  -d '{"name": "Payments API v2", "description": "Updated description."}'
Response
{
  "id": "018e5a3b-2d4e-8c9f-a0b1-3c4d5e6f7a8b",
  "teamId": "018e4f2a-1c3d-7b8e-9f0a-2b3c4d5e6f7a",
  "name": "Payments API v2",
  "slug": "payments-api",
  "description": "Updated description.",
  "createdAt": "2024-02-01T10:00:00.000Z",
  "updatedAt": "2024-03-15T14:30:00.000Z"
}

Delete Project

DELETE /api/teams/:teamId/projects/:projectId Permanently deletes a project and all of its resources — mocks, webhooks, feature flags, API keys, and release notes are all removed. This action cannot be undone. Path Parameters
teamId
string
required
The UUID of the team.
projectId
string
required
The UUID of the project to delete.
Request
curl -X DELETE https://swisstools.dev/api/teams/018e4f2a-1c3d-7b8e-9f0a-2b3c4d5e6f7a/projects/018e5a3b-2d4e-8c9f-a0b1-3c4d5e6f7a8b \
  -b cookies.txt
Response
{"success": true}

Project Object

id
string
UUID that uniquely identifies the project. Use this in all API paths that accept :projectId.
teamId
string
UUID of the team that owns this project.
name
string
The display name of the project.
slug
string
URL-friendly identifier. Combined with the team’s referenceId to form the subdomain: <referenceId>-<slug>.swisstools.dev.
description
string
Optional free-text description of the project.
createdAt
string
ISO 8601 timestamp of when the project was created.
updatedAt
string
ISO 8601 timestamp of the last update.