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.jsonPin 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 SHA256SUMSEach 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:
- Download the OpenAPI document from
/v1/openapi.json - Import it into Swagger UI, Postman, or your preferred API tool
- 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/clientPython.
openapi-generator generate -i openapi.json -g python -o ./python-clientGo.
openapi-generator generate -i openapi.json -g go -o ./go-clientPostman collection
Samva also publishes an official Postman collection derived from this OpenAPI document:
- Open Postman
- Click Import
- Select Link and enter:
https://api.samva.dev/v1/postman.json - 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