---
title: "WebSocket Message Schemas"
method: GET
path: "/api/notifications/ws-schemas"
tags: ["notifications"]
---

# WebSocket Message Schemas

`GET /api/notifications/ws-schemas`

Expose all WebSocket message types in the OpenAPI schema.

- server_messages: Messages sent from server to client
- client_messages: Messages sent from client to server

Frontend can autogenerate TypeScript types from OpenAPI schema components.

## Response `200`

Successful Response

- WebSocketSchemas — Container for all WebSocket message schemas.
  - `server_messages` union[]
    - union
      - AuthResultMessage — Server response to authentication.
        - `type` 'auth_result'
        - `success` boolean, required
        - `reason` string, nullable
      - ConnectionClosedMessage — Sent when connection is closed (e.g., another tab opened).
        - `type` 'connection_closed'
        - `message` string, required
      - PresenceUpdateMessage — Sent when a contact's online status changes or is no longer tracked.
        - `type` 'presence_update'
        - `user_id` string, required
        - `status` 'online' | 'unknown', required
        - `timestamp` string, required
      - ErrorMessage — Sent when server fails to process a client message.
        - `type` 'error'
        - `message` string, required
      - TaskUpdateMessage — Document processing progress update.
        - `type` 'task_update'
        - `doc_ext_id` string, required
        - `workspace_ext_id` string, required
        - `file_name` string, required
        - `status` 'queued' | 'parsing' | 'encrypting' | 'indexing' | 'analysing' | 'completed' | 'failed', required
        - `progress` integer, required
      - BatchCompleteMessage — Notification that a batch operation (upload or doctag generation) completed.
        - `type` 'batch_complete'
        - `batch_type` 'upload' | 'doctag_generate', required
        - `workspace_ext_id` string, required
        - `doc_ext_ids` string[], required
      - NotificationResponse — Notification response model for API and WebSocket. Bilateral: both sender and recipient see the same row. Client determines perspective: sender == me → I sent it, else I received it.
        - `type` 'user_message' | 'workspaceuser_added_owner' | 'workspaceuser_added_collaborator' | 'workspaceuser_added_guest' | 'workspaceuser_removed' | 'workspaceuser_updated_owner' | 'workspaceuser_updated_collaborator' | 'workspaceuser_updated_guest' | 'contact_accepted', required — Notification types - all persisted AND delivered via WebSocket. Type is self-descriptive, no need to parse content field.
        - `external_id` string, required
        - `sender` UserResponse, required — Standard user representation used across all endpoints. Used for: login response, workspace users, contacts (when registered).
          - `external_id` string, required
          - `email` string, required
          - `given_name` string, required
          - `family_name` string, required
          - `picture` string, nullable
          - `encryption_public_key` string, required
        - `recipient` UserResponse, required — Standard user representation used across all endpoints. Used for: login response, workspace users, contacts (when registered).
          - `external_id` string, required
          - `email` string, required
          - `given_name` string, required
          - `family_name` string, required
          - `picture` string, nullable
          - `encryption_public_key` string, required
        - `workspace_ext_id` string, nullable
        - `content` string, nullable
        - `new` boolean
        - `created_at` string, date-time, required
        - `updated_at` string, date-time, required
  - `client_messages` union[]
    - union
      - AuthMessage — Client authentication message.
        - `type` 'auth'
        - `token` string, required
      - SendMessageRequestOutput — Client request to send an encrypted message.
        - `type` 'send_message'
        - `recipient` string, required
        - `encrypted_content` string, required

## Changes

- **2026-01-20** `ec6f27613280` — 4 warning, 1 info
  - added the new `analysing` enum value to the `server_messages/items/anyOf[subschema #5: TaskUpdateMessage]/status` response property for the response status `200`
  - added the new `encrypting` enum value to the `server_messages/items/anyOf[subschema #5: TaskUpdateMessage]/status` response property for the response status `200`
  - added the new `indexing` enum value to the `server_messages/items/anyOf[subschema #5: TaskUpdateMessage]/status` response property for the response status `200`
  - added the new `parsing` enum value to the `server_messages/items/anyOf[subschema #5: TaskUpdateMessage]/status` response property for the response status `200`
  - …1 more
- **2026-01-18** `2869dee5e8ca` — 1 info
  - added `#/components/schemas/BatchCompleteMessage` to the `server_messages/items/` response property `anyOf` list for the response status `200`
- **2026-01-17** `b91e4b449d56` — 2 breaking, 1 warning, 3 info
  - the `client_messages/items/` response's property type/format changed from `object`/`` to ``/`` for status `200`
  - removed the required property `client_messages/items/token` from the response with the `200` status
  - removed the optional property `client_messages/items/type` from the response with the `200` status
  - added `#/components/schemas/AuthMessage, #/components/schemas/SendMessageRequest-Output` to the `client_messages/items/` response property `anyOf` list for the response status `200`
  - …2 more
- …earlier changes not shown

[Full history](https://skmtc.dev/arbicity/apis/arbi/changes/api/notifications/ws-schemas/get.md)

---

[API](https://skmtc.dev/arbicity/apis/arbi.md) · [All operations](https://skmtc.dev/arbicity/apis/arbi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/arbicity/arbi/revisions/1f956ac3d1c1/schema)
