How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

Convex Sync Protocol

The Convex Sync Protocol is the bidirectional WebSocket protocol spoken between Convex client SDKs and the sync worker of a Convex deployment. Clients open a single WebSocket connection to wss://{deployment-name}.convex.cloud/api/{clientVersion}/sync and exchange JSON envelopes (discriminated by a `type` field) to authenticate, subscribe to reactive query sets, invoke mutations and actions, and receive query transitions, function responses, auth errors, fatal errors, and pings. The protocol is implemented in the open source convex-js client (`src/browser/sync/protocol.ts`).

Convex Sync Protocol is one of 14 APIs that Convex publishes on the APIs.io network, described by an AsyncAPI event-driven specification.

Tagged areas include Real-Time, Reactive, Sync, and WebSocket. The published artifact set on APIs.io includes API documentation and an AsyncAPI specification.

This event API exposes 2 operations across 1 channel, and defines 45 schemas. It is described by AsyncAPI 2.6.0, at version 1.39.1.

The API connects through 2 servers: {deployment}.convex.cloud (wss), 127.0.0.1:{port} (ws).

2 operations 1 channels 45 schemas

Metadata

The identity and technical contract details declared by the specification.

Specification
AsyncAPI 2.6.0
API Version
1.39.1
Base URL
wss://{deployment-name}.convex.cloud/api/{clientVersion}/sync
Contact
License
Resource Areas
1

Channels & Operations 2

Across 1 channel, the API surfaces 2 operations. Each is listed below with its action, channel, parameters, and response codes.

Channels 2
SUB
/api/{clientVersion}/sync
Messages pushed by the Convex sync worker to the client SDK.
serverToClient 1 param body
PUB
/api/{clientVersion}/sync
Messages published by the client SDK to the Convex sync worker.
clientToServer 1 param body

Messages & Schemas 45

The contract defines 45 schemas that model the data carried by its messages. The most detailed are MutationResponseSuccess (6 properties), AddQuery (6 properties), ActionResponseFailure (6 properties), ConnectMessage (6 properties). Each schema is shown below with its type and property counts.

Connect
message
Opens or resumes a sync session.
Authenticate
message
Supplies (or clears) the identity used to run queries, mutations, and actions.
ModifyQuerySet
message
Adds or removes subscribed queries from the client's active query set.
Mutation
message
Requests execution of a Convex mutation function.
Action
message
Requests execution of a Convex action function.
Event
message
Client-emitted telemetry / lifecycle event (e.g. ClientConnect).
Transition
message
Advances the client from one server state version to the next, with per-query modifications.
TransitionChunk
message
One chunk of a large Transition message split across multiple frames.
MutationResponse
message
Result of a previously sent Mutation request.
ActionResponse
message
Result of a previously sent Action request.
AuthError
message
Authentication failure reported by the server.
FatalError
message
Unrecoverable error; the server will close the connection.
Ping
message
Liveness ping from the server.
JSONValue
object
Any JSON value (as serialized by Convex's value encoding).
RequestId
string
Client-generated id correlating a request with its response.
QueryId
string
Client-generated id identifying a subscribed query within the session.
QuerySetVersion
integer
Monotonic version of the client's query set.
IdentityVersion
integer
Monotonic version of the client's identity state.
StateVersion
object
Server state version (server-assigned timestamp plus query-set version).
3 properties
TS
string
Convex server timestamp (opaque encoded integer).
QueryJournal
object
Opaque per-query state that lets the server resume deterministic execution.
LogLines
array
Structured log output captured during function execution.
UserIdentityAttributes
object
Convex user identity attributes used when an admin token impersonates a user.
ConnectMessage
object
6 properties 5 required
AuthenticateMessage
object
5 properties 3 required
ModifyQuerySetMessage
object
4 properties 4 required
AddQuery
object
6 properties 4 required
RemoveQuery
object
2 properties 2 required
MutationMessage
object
5 properties 4 required
ActionMessage
object
5 properties 4 required
EventMessage
object
3 properties 3 required
TransitionMessage
object
6 properties 4 required
QueryUpdated
object
5 properties 5 required
QueryFailed
object
6 properties 5 required
QueryRemoved
object
2 properties 2 required
TransitionChunkMessage
object
5 properties 5 required
MutationResponseMessage
object
MutationResponseSuccess
object
6 properties 6 required
MutationResponseFailure
object
6 properties 5 required
ActionResponseMessage
object
ActionResponseSuccess
object
5 properties 5 required
ActionResponseFailure
object
6 properties 5 required
AuthErrorMessage
object
4 properties 4 required
FatalErrorMessage
object
2 properties 2 required
PingMessage
object
1 property 1 required

Specification

The full machine-readable AsyncAPI contract behind this narrative.

Source

convex-asyncapi.yml Raw ↑

Other APIs Convex publishes across the network.

Convex JavaScript SDK
Convex Server SDK
Convex AccessTokens API
Convex Actions API
Convex CustomDomains API
Convex DeployKeys API
Convex Deployments API
Convex EnvironmentVariables API
Convex Functions API
Convex Mutations API
Convex Projects API
Convex Queries API
Where this information came from

This is an independent, third-party profile of Convex Sync Protocol, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.