Zügle Experiences API

The Experiences/needs board — logged-in users post, the owner moderates, only approved posts are public.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 6

GET /api/experiences Approved experiences and needs posts #
POST /api/experiences Submit an experience or need for moderation #
DELETE /api/experiences Delete one of the caller's own posts #
GET /api/me/experiences The caller's own posts, every status #
GET /api/admin/experiences The moderation queue (admin) #
PUT /api/admin/experiences Approve or reject a post (admin) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/zuegle-com:zuegle-com-experiences-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

zuegle-com-experiences-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Zügle Experiences API
  version: 1.0.0
  description: 'Zügle is a Swiss "does it pay off to move?" app. Paste a Flatfox/Homegate listing

    link (or enter costs manually) to compare a candidate apartment against a current

    home: monthly living costs, the Swiss income-tax delta between municipalities

    (federal/cantonal/Gemeinde), commute time and cost, and a quality-of-living score.


    The app has **guest mode**: several routes are reachable with no session cookie at

    all. A guest supplies their own income/relationship/confession/children/current-home

    figures on the request itself (query params or, for ingest, a `profile` body object)

    and gets a computed result back — nothing about a guest request is ever persisted

    server-side. The same routes behave differently for an authenticated household

    member: caller-supplied profile values are ignored and the stored profile

    (`p1`/`p2`) is used instead. Guest traffic is additionally throttled by a set of

    in-memory, per-IP rate-limit buckets described on each public operation; an

    authenticated caller using their own app is never subject to those buckets.'
  contact:
    name: Zügle
servers:
- url: http://localhost:8090
  description: Local dev (npm run dev) or local prod (npm run prod) — both serve on :8090
- url: https://zuegle.com
  description: 'Public production deployment. The VPS holds no open ports: a Cloudflare Tunnel (cloudflared) fronts localhost:8090, so TLS terminates at Cloudflare and the app runs with TRUST_PROXY_HOPS=1 / FORCE_HTTPS=1. Auto-deployed from the main branch.'
- url: https://zugle-vps.barbel-char.ts.net
  description: The same VPS over the Tailscale tailnet — admin/debug access that does not depend on Cloudflare. Tailscale Funnel is OFF here; a tailnet member reaches this, the public internet does not.
security:
- cookieAuth: []
tags:
- name: experiences
  description: The Experiences/needs board — logged-in users post, the owner moderates, only approved posts are public.
paths:
  /api/experiences:
    get:
      operationId: listExperiences
      summary: Approved experiences and needs posts
      description: 'Public. Returns only `approved` rows, newest first — a pending or rejected post is never visible here. Rate limit (guest only): general bucket, 60 requests / 5 min per IP.'
      tags:
      - experiences
      security: []
      parameters:
      - name: lang
        in: query
        required: false
        schema:
          type: string
          enum:
          - de
          - fr
          - it
          - rm
          - en
      - name: before
        in: query
        required: false
        description: An ISO timestamp — return posts older than this, for pagination.
        schema:
          type: string
          format: date-time
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 20
          maximum: 50
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - items
                - nextBefore
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/PublicExperience'
                  nextBefore:
                    type: string
                    format: date-time
                    nullable: true
        '400':
          description: Unknown lang, or a non-positive limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          $ref: '#/components/responses/TooManyRequests'
    post:
      operationId: createExperience
      summary: Submit an experience or need for moderation
      description: Requires a session. Up to 3 posts per rolling 24h per account. Stored as `pending` and visible only to its author until an admin approves it. Validated against length, links (including bare domains), email addresses and phone numbers (including Swiss `+41`/`079…` formats) in `displayName`/`title`/`body`, and against `data/municipalities.json` when `bfsId` is set.
      tags:
      - experiences
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - kind
              - lang
              - title
              - body
              - consent
              properties:
                kind:
                  type: string
                  enum:
                  - experience
                  - need
                lang:
                  type: string
                  enum:
                  - de
                  - fr
                  - it
                  - rm
                  - en
                displayName:
                  type: string
                  maxLength: 40
                  description: Defaults to a localized "Anonymous" when omitted.
                title:
                  type: string
                  minLength: 5
                  maxLength: 120
                body:
                  type: string
                  minLength: 50
                  maxLength: 3000
                bfsId:
                  type: integer
                  nullable: true
                consent:
                  type: boolean
                  description: Must be exactly true.
      responses:
        '200':
          description: Created, pending review.
          content:
            application/json:
              schema:
                type: object
                properties:
                  item:
                    $ref: '#/components/schemas/OwnerExperience'
        '400':
          description: '`{ code: ''invalid'', field, rule }` — rule is one of length, link, email, phone, kind, lang, bfsId, consent.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/SessionExpired'
        '429':
          description: More than 3 posts in the last 24 hours.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
    delete:
      operationId: deleteExperience
      summary: Delete one of the caller's own posts
      description: Requires a session. The id travels in the BODY, not the path — matchRoute only supports a single trailing /:id, the same reason /api/match/dismissals and /api/listing-variants do this. Another account's id gives the same 404 as a non-existent one.
      tags:
      - experiences
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - id
              properties:
                id:
                  type: integer
      responses:
        '204':
          description: Deleted.
        '401':
          $ref: '#/components/responses/SessionExpired'
        '404':
          description: No such post, or it belongs to another account.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /api/me/experiences:
    get:
      operationId: listMyExperiences
      summary: The caller's own posts, every status
      description: Requires a session. Newest first, including pending and rejected.
      tags:
      - experiences
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/OwnerExperience'
        '401':
          $ref: '#/components/responses/SessionExpired'
  /api/admin/experiences:
    get:
      operationId: adminListExperiences
      summary: The moderation queue (admin)
      tags:
      - experiences
      parameters:
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - pending
          - approved
          - rejected
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/OwnerExperience'
        '401':
          $ref: '#/components/responses/SessionExpired'
        '403':
          $ref: '#/components/responses/AdminOnly'
    put:
      operationId: adminReviewExperience
      summary: Approve or reject a post (admin)
      description: No reviewer id is ever stored — the only admin is the installation owner, and recording who reviewed a row would add an account id beside otherwise-anonymous public content for no reader to use.
      tags:
      - experiences
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - id
              - status
              properties:
                id:
                  type: integer
                status:
                  type: string
                  enum:
                  - approved
                  - rejected
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  item:
                    $ref: '#/components/schemas/OwnerExperience'
        '400':
          description: status must be approved or rejected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/SessionExpired'
        '403':
          $ref: '#/components/responses/AdminOnly'
        '404':
          description: No such post.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  responses:
    SessionExpired:
      description: No valid session cookie. This is the ONE error shape in the whole API that bypasses the standard ApiError → handleRouteError path (it's written directly by auth.js's authGate middleware before the route dispatcher runs), which is why it alone carries a `code` field.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SessionExpiredError'
          example:
            error: Unauthorized — please log in
            code: SESSION_EXPIRED
    AdminOnly:
      description: Valid session, but its role is not "admin".
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Admin only
    TooManyRequests:
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
  schemas:
    SessionExpiredError:
      allOf:
      - $ref: '#/components/schemas/Error'
      - type: object
        required:
        - code
        properties:
          code:
            type: string
            enum:
            - SESSION_EXPIRED
    PublicExperience:
      type: object
      description: What GET /api/experiences and the HTML page show — an approved post, with no userId, email or status. server/experienceRules.js's toPublic(). displayName is null when the author left it blank; the reader-facing "Anonymous" fallback is rendered client-side, localized to the reader's language, never baked into this field. approvedAt is set ONLY when the row is actually approved (never for a rejected post, which also carries a reviewed_at internally).
      required:
      - id
      - lang
      - kind
      - displayName
      - title
      - body
      - municipality
      - approvedAt
      properties:
        id:
          type: integer
        lang:
          type: string
          enum:
          - de
          - fr
          - it
          - rm
          - en
        kind:
          type: string
          enum:
          - experience
          - need
        displayName:
          type:
          - string
          - 'null'
        title:
          type: string
        body:
          type: string
        municipality:
          type: object
          nullable: true
          properties:
            bfsId:
              type: integer
            name:
              type: string
            canton:
              type: string
        approvedAt:
          type: string
          format: date-time
          nullable: true
    Error:
      type: object
      description: 'The base shape of every error response in this API: `{ error: <message>, ...extra }`, produced by throwing `ApiError(status, message, extra)` in server/app.js (caught centrally by handleRouteError) or, for unmatched routes, written directly by the dispatcher.'
      required:
      - error
      properties:
        error:
          type: string
      additionalProperties: true
    OwnerExperience:
      type: object
      description: PublicExperience plus the author's own view of status, creation time and the raw moderation timestamp — used by GET /api/me/experiences, POST/DELETE's response, GET /api/me/export, and (as AdminExperience, same shape — no reviewer id exists to add) GET/PUT /api/admin/experiences. reviewedAt is set whenever the post WAS reviewed, approved or rejected — approvedAt alone cannot distinguish "rejected" from "still pending".
      allOf:
      - $ref: '#/components/schemas/PublicExperience'
      - type: object
        required:
        - status
        - createdAt
        - reviewedAt
        properties:
          status:
            type: string
            enum:
            - pending
            - approved
            - rejected
          createdAt:
            type: string
            format: date-time
          reviewedAt:
            type: string
            format: date-time
            nullable: true
  securitySchemes:
    cookieAuth:
      type: apiKey
      in: cookie
      name: zugle_session
      description: 64-hex-character session token set as an HttpOnly, SameSite=Strict cookie by POST /api/auth/login. Routes NOT in the guest-mode public set return 401 with code SESSION_EXPIRED when it is missing or invalid.