Use any HTTP client.
The REST API is small enough that a stock HTTP client beats every published SDK we've seen. Bearer token auth, JSON responses, no client-side state. The snippets below are the same call (upload a PDF as a Document) in four languages — copy whichever fits your stack.
cURL
curl https://api.sendmint.com/v1/documents \ -H "Authorization: Bearer $SENDMINT_API_KEY" \ -F "file=@deck.pdf" \ -F "name=Series A Pitch"
Node.js (fetch)
import { readFile } from "node:fs/promises";
const file = await readFile("./deck.pdf");
const form = new FormData();
form.set("file", new Blob([file], { type: "application/pdf" }), "deck.pdf");
form.set("name", "Series A Pitch");
const res = await fetch("https://api.sendmint.com/v1/documents", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.SENDMINT_API_KEY}` },
body: form,
});
const doc = await res.json();
console.log(doc.id);Python (requests)
import os, requests
with open("deck.pdf", "rb") as fp:
res = requests.post(
"https://api.sendmint.com/v1/documents",
headers={"Authorization": f"Bearer {os.environ['SENDMINT_API_KEY']}"},
files={"file": fp},
data={"name": "Series A Pitch"},
)
res.raise_for_status()
print(res.json()["id"])Go (net/http)
package main
import (
"bytes"
"mime/multipart"
"net/http"
"os"
)
func main() {
f, _ := os.Open("deck.pdf")
defer f.Close()
var body bytes.Buffer
w := multipart.NewWriter(&body)
fw, _ := w.CreateFormFile("file", "deck.pdf")
_, _ = fw.ReadFrom(f)
_ = w.WriteField("name", "Series A Pitch")
w.Close()
req, _ := http.NewRequest("POST",
"https://api.sendmint.com/v1/documents", &body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("SENDMINT_API_KEY"))
req.Header.Set("Content-Type", w.FormDataContentType())
http.DefaultClient.Do(req)
}Official SDKs — on the roadmap
First-party packages for Node, Python, and Ruby ship when the API surface stabilizes past v1. Until then, the snippets above cover every endpoint listed in the API reference. Watch the changelog for release notes.
Node.js
@sendmint/nodenot yet publishedTypeScript-first, fetch-based, zero deps.
Source ships at github.com/sendmint/node
Python
sendmintnot yet published3.10+, requests/httpx adapter, typed responses.
Source ships at github.com/sendmint/sendmint
Self-host an SDK first?
The REST shape is stable. If you publish a wrapper before we do, we'll add a link from this page. Ping us through contact with the GitHub URL.