OpenAPI specification

Download the OpenAPI 3.1.0 document for the Samva API and generate clients from it.

The Samva API publishes an OpenAPI 3.1.0 document. Use it to generate a client, inspect operations, or import the API into a tool.

Access the specification

The OpenAPI document is available at:

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

Pin a version

The live document changes as the API grows. To generate a client you can rebuild later, pin a release of the document. Every change to the API publishes a new semantic version to SamvaHQ/samva-openapi, with a manifest.json and a SHA256SUMS file. Before 1.0, a minor version marks a breaking change and a patch version marks a compatible one.

Choose a version from the releases page and keep it in your build:

version=v0.28.0
curl -fsSLO "https://github.com/SamvaHQ/samva-openapi/releases/download/$version/openapi.json"
curl -fsSLO "https://github.com/SamvaHQ/samva-openapi/releases/download/$version/SHA256SUMS"
shasum -a 256 -c SHA256SUMS

Each release's changelog lists the operations, schemas, and webhook events that changed since the previous one. The document's webhooks section describes the body of every webhook event Samva sends.

Use the specification

Interactive documentation

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

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

Code generation

Generate clients from the pinned openapi.json. The live URL is for exploring the API and importing it into a tool.

TypeScript/JavaScript.

npx @hey-api/openapi-ts -i openapi.json -o ./src/client

Python.

openapi-generator generate -i openapi.json -g python -o ./python-client

Go.

openapi-generator generate -i openapi.json -g go -o ./go-client

Postman collection

Samva also publishes an official Postman collection derived from this OpenAPI document:

  1. Open Postman
  2. Click Import
  3. Select Link and enter: https://api.samva.dev/v1/postman.json
  4. Import the collection

The served collection updates with the public API, but an import into Postman is a snapshot. Reimport it to refresh your local collection.

Specification details

The OpenAPI document includes:

  • Every endpoint you can call with an API key, the same set this API reference and the SDK cover.
  • Request and response schemas.
  • API key authentication details.
  • Error schemas.

SDK generation

The official Samva TypeScript SDK is generated from the same API contract:

npm install samva

View SDK Documentation →

Next steps

Related documentation

On this page