{
  "opencollection": "1.0.0",
  "info": {
    "name": "Wispr Backend Analytics Calendar API",
    "version": "0.5.2"
  },
  "items": [
    {
      "info": {
        "name": "Calendar",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get Events Batch",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/calendar/events/batch",
            "params": [
              {
                "name": "ids",
                "value": "",
                "type": "query",
                "description": "Comma-separated calendar ``externalId`` values to look up. At most 50 per request; missing ids are absent from the response."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Return the authenticated user's calendar events matching the given externalIds.\n\nDesigned for the desktop to re-fetch events linked to past notes whose local\ncalendar cache was pruned. No ``start_at_utc`` filter — past events are returned.\nCancelled events are included so the desktop can render the correct state.\nA stranger's ``externalId`` matches no row (query is ``user_id``-scoped).\nEvent order is unspecified; callers look events up by ``externalId``."
        },
        {
          "info": {
            "name": "Sync Calendar",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/calendar/sync",
            "params": [
              {
                "name": "since",
                "value": "",
                "type": "query",
                "description": "ISO 8601 timestamp from the previous response's `serverTime`. Omit on first sync to get all upcoming events."
              },
              {
                "name": "cursor",
                "value": "",
                "type": "query",
                "description": "Pagination cursor from the previous response's `nextCursor`. Only meaningful when paired with the same `since` value."
              },
              {
                "name": "launch",
                "value": "",
                "type": "query",
                "description": "When true, the desktop is signalling a genuine app launch; the server schedules a background incremental sync to catch the user up. Defaults false; routine change-pulls omit it."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Return calendar events the desktop hasn't seen yet.\n\nTwo modes:\n\n* ``since`` provided — incremental: events with ``updated_at > since``,\n  ordered ascending by ``(updated_at, id)``. Stable across rows that\n  share an ``updated_at`` (e.g. webhook bulk fan-out).\n* ``since`` null — initial sync: all upcoming events\n  (``start_at_utc >= now``). Ordered ascending by ``(start_at_utc, id)``.\n\nThe response anchors on the server clock — desktop uses ``serverTime`` as\nthe next ``since``. Capped at ``SYNC_"
        },
        {
          "info": {
            "name": "Sync Agentic Prereads",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/calendar/prereads/agentic_sync",
            "params": [
              {
                "name": "since",
                "value": "",
                "type": "query",
                "description": "ISO 8601 timestamp from the previous response's `serverTime`. Omit on first sync to receive all agentic deliverables for upcoming events."
              },
              {
                "name": "cursor",
                "value": "",
                "type": "query",
                "description": "Pagination cursor from the previous response's `nextCursor`. Only meaningful when paired with the same `since` value."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Return agentic pre-read deliverables the desktop has not synced yet.\n\nRead-only: never dispatches a managed-agent session. The webhook writes\nrows to ``preread_generation`` and bumps the ``agentic_prereads`` sync\nresource; this endpoint is how the desktop ingests those rows.\n\nIncremental mode (``since`` provided): rows with ``generated_at > since``,\nordered ascending by ``(generated_at, id)``. Initial mode (``since``\nomitted): every successful agentic row for the user, regardless of event age."
        },
        {
          "info": {
            "name": "Get Event Preread",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "{{baseUrl}}/api/v1/calendar/events/:external_id/preread",
            "params": [
              {
                "name": "external_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "useAgenticPreread",
                "value": "",
                "type": "query",
                "description": "When true, dispatch a managed-agent pre-read session asynchronously and return an empty response. The desktop picks up the result via the ``agentic_prereads`` sync resource."
              },
              {
                "name": "trigger",
                "value": "",
                "type": "query",
                "description": "Optional client-supplied hint describing why the pre-read is being fetched. Allowed values: precache, reminder, debug, sync. Used for telemetry only — unknown values fall through silently."
              }
            ],
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Generate or dispatch a pre-read for an upcoming calendar event.\n\nThe desktop already has Google's ``external_id`` from the sync payload, so\ncallers identify the event by that string rather than the internal UUID.\nThe query layer scopes by ``user_id`` — a stranger's ``external_id``\nmatches no row.\n\nWhen ``useAgenticPreread`` is false (the default), the handler\nsynchronously builds context and calls the LLM; the worst case is bounded\nby the generator's 30s Anthropic client timeout.\n\nWhen ``useAgen"
        },
        {
          "info": {
            "name": "Submit Event Preread Feedback",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v1/calendar/preread/feedback",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Submit internal dogfood feedback on a cached pre-read.\n\nPosts to a dedicated Slack channel. The server enriches the payload with\nthe calendar event's start time (meeting date), the report timestamp, and\nthe latest Claude managed-agent session id when one exists for this event."
        },
        {
          "info": {
            "name": "Manual Resync",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "{{baseUrl}}/api/v1/calendar/resync",
            "auth": {
              "type": "apikey",
              "key": "Authorization",
              "value": "{{Authorization}}",
              "placement": "header"
            }
          },
          "docs": "Debug-only: force a Google Calendar backfill for the current user.\n\nCalls :meth:`CalendarService.backfill` which fetches the next\n``BACKFILL_WINDOW_DAYS`` of events from Google via the user's existing\ncalendar connection and upserts them into ``calendar_event``. Idempotent\n— re-running just refreshes the rows.\n\nSurfaced from the desktop Meetings hub as an internal-only \"Manual\nResync\" affordance so internal users on a fresh local backend can\npopulate calendar data without re-doing the OAuth flow"
        }
      ]
    }
  ],
  "bundled": true
}