Samva
API Reference

OpenAPI Specification

Complete OpenAPI 3.0 specification for the Samva API

The Samva API is fully documented using the OpenAPI 3.0 specification. You can use this specification to generate client libraries, explore the API, or integrate with API tools.

Accessing the Specification

The OpenAPI specification is available at:

https://api.samva.app/v1/openapi.json

For development:

https://samva.localhost/api/v1/openapi.json

Using the Specification

Interactive Documentation

You can use tools like Swagger UI or Scalar to explore the API interactively:

  1. Download the OpenAPI spec from /api/v1/openapi.json
  2. Import it into Swagger UI, Postman, or your preferred API tool
  3. Explore endpoints, schemas, and examples

Code Generation

Generate client libraries for your preferred language:

TypeScript/JavaScript:

npx @hey-api/openapi-ts -i https://api.samva.app/v1/openapi.json -o ./src/client

Python:

openapi-generator generate -i https://api.samva.app/v1/openapi.json -g python -o ./python-client

Go:

openapi-generator generate -i https://api.samva.app/v1/openapi.json -g go -o ./go-client

Postman Collection

Import the OpenAPI spec into Postman:

  1. Open Postman
  2. Click Import
  3. Select Link and enter: https://api.samva.app/v1/openapi.json
  4. Postman will create a collection with all endpoints

Specification Details

The OpenAPI spec includes:

  • All exported SDK endpoints - Complete list of authenticated and public HttpApi operations included in the generated SDK surface
  • Request/Response schemas - Detailed schemas for all requests and responses
  • Authentication - API key authentication details
  • Examples - Request and response examples
  • Error responses - Error schema documentation

SDK Generation

The official Samva TypeScript SDK is generated from this OpenAPI specification:

npm install samva

View SDK Documentation →

Next Steps

On this page