Python Esignature API Integration
The SignThem REST API works with any HTTP client in Python. The examples below use the popular requests library, which you likely already have in your project. A native Python SDK is in development - join the waitlist to be notified when it ships.
Installation
pip install requestsCreate and send an envelope
The example below creates an envelope, adds a recipient with a signature field, and sends it. The recipient receives an email with a secure signing link.
import os
import requests
API_KEY = os.environ["SIGNTHEM_API_KEY"]
BASE = "https://signthem.ai/api/v1"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
}
# 1. Create an envelope
envelope = requests.post(f"{BASE}/envelopes", headers=headers, json={
"name": "Service Agreement",
"documents": [
{"url": "https://yourapp.com/contracts/agreement.pdf"},
],
}).json()
envelope_id = envelope["id"]
# 2. Add a recipient with a signature field
requests.post(f"{BASE}/envelopes/{envelope_id}/recipients", headers=headers, json={
"email": "[email protected]",
"name": "Jane Smith",
"fields": [
{"type": "signature", "page": 1, "x": 100, "y": 600},
{"type": "date", "page": 1, "x": 320, "y": 600},
],
})
# 3. Send - recipient receives an email with a signing link
requests.post(f"{BASE}/envelopes/{envelope_id}/send", headers=headers)
print(f"Envelope sent: {envelope_id}")Why Python developers choose SignThem
Plain REST
works with requests, httpx, or any HTTP library
JSON responses map directly to Python dicts
no special client needed
Webhook events can be consumed with Flask, Django, or FastAPI
Native Python SDK coming soon
join the waitlist to get early access
Native SDK in development
A first-party SDK for this language is on the roadmap. In the meantime, the REST API works with any HTTP client as shown in the example above. Join the waitlist and we will notify you when the SDK ships.
Related resources
Ready to add e-signatures to your app?
Create an account to get your API key. Plans start at $6/mo. No usage fees on top.