> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wiresocket.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> WireSocket Data Plane HTTP and WebSocket endpoints.

The WireSocket Data Plane exposes HTTP and WebSocket endpoints across every deployed region. Endpoints are grouped into **public** (for your application) and **infrastructure** (for monitoring and administration).

## Base URLs

WireSocket uses two different protocols depending on the endpoint type:

| Type            | Protocol   | Base URL                               |
| :-------------- | :--------- | :------------------------------------- |
| **HTTP (JSON)** | `https://` | `https://{region-code}.wiresocket.net` |
| **WebSocket**   | `wss://`   | `wss://{region-code}.wiresocket.net`   |

Replace `{region-code}` with any available node cluster (e.g., `eu-central-1`).

## Authentication

All public endpoints require a valid JWT access token issued by the WireSocket **Dashboard**. See [Authentication](/authentication) for how to obtain and refresh tokens. Infrastructure endpoints (`/health`, `/metrics`) are unauthenticated to support load balancer probes and Prometheus scraping.

## Endpoints

<CardGroup cols={1}>
  <Card title="Discovery" icon="magnifying-glass" href="/api-reference/discovery">
    Resolve the correct regional node for a document before connecting.
    Eliminates wrong-region handshakes and ensures lowest latency on first
    connect.
  </Card>

  <Card title="WebSocket Sync" icon="bolt" href="/api-reference/websocket">
    The core WireSocket product. All Yjs document updates, awareness state, and
    heartbeats flow through this connection.
  </Card>

  <Card title="Usage" icon="chart-line" href="/api-reference/usage">
    Get a real-time snapshot of your application's current concurrent
    connections and active documents across the global network.
  </Card>

  <Card title="Health" icon="heart-pulse" href="/api-reference/health">
    Tri-state liveness check used by load balancers and DNS failover. Returns
    200 (healthy) or 503 (degraded/overloaded).
  </Card>

  <Card title="Metrics" icon="chart-simple" href="/api-reference/metrics">
    Prometheus-compatible telemetry for node-level observability. Integrate with
    Grafana, Datadog, or any Prometheus-compatible stack.
  </Card>
</CardGroup>

## Rate Limits

All HTTP endpoints are rate limited per IP address. See [Rate Limits](/internals/rate-limits) for policy details per endpoint.

## Status

Live service status and incident history: [status.wiresocket.com](https://status.wiresocket.com)
