Convex Server SDK

The Convex Server SDK (convex/server) is the TypeScript library for defining backend logic deployed on Convex. It provides primitives for writing query functions for read-only database access, mutation functions for transactional writes, and action functions for general-purpose server-side operations including calling external services. The SDK supports schema definition, full-text search indexes, vector search indexes, file storage, scheduled functions, cron jobs, and HTTP routing via the HttpRouter class.

API entry from apis.yml

apis.yml Raw ↑
aid: convex:server-sdk
name: Convex Server SDK
tags:
- Backend
- Database
- Serverless Functions
- TypeScript
image: https://kinlane-productions2.s3.amazonaws.com/apis-json/apis-json-logo.jpg
humanURL: https://docs.convex.dev/functions
properties:
- url: https://docs.convex.dev/functions
  type: Documentation
- url: https://docs.convex.dev/database/schemas
  type: Documentation
description: The Convex Server SDK (convex/server) is the TypeScript library for defining backend logic
  deployed on Convex. It provides primitives for writing query functions for read-only database access,
  mutation functions for transactional writes, and action functions for general-purpose server-side operations
  including calling external services. The SDK supports schema definition, full-text search indexes, vector
  search indexes, file storage, scheduled functions, cron jobs, and HTTP routing via the HttpRouter class.
x-features:
- query, mutation, and action function primitives
- defineSchema and defineTable for typed database modeling
- Full-text and vector search indexes
- Cron jobs and scheduled function execution
- HttpRouter for custom HTTP endpoints
- File storage with signed URL generation
x-useCases:
- Authoring Convex backend functions in TypeScript
- Modeling reactive database schemas with type safety
- Implementing AI workflows with vector search
- Scheduling recurring background work with cron jobs
- Building HTTP webhook handlers inside Convex deployments