Authentication
Learn how to authenticate with the Draftory API using API keys.
API Key Format
Every Draftory API key uses a prefix that tells you which environment it belongs to:
- Production keys start with
dft_live_— creates real, legally-binding contracts. - Sandbox keys start with
dft_test_— for testing and development. Sandbox contracts auto-expire after 1 hour.
# Production key
dft_live_sk_abc123def456...
# Sandbox key
dft_test_sk_abc123def456...
Sending Your Key
Include your API key in every request using the x-api-key header:
curl -X GET https://api.draftory.ca/api/external/v2/status \
-H "x-api-key: dft_live_your_key"
const response = await fetch('https://api.draftory.ca/api/external/v2/status', {
headers: {
'x-api-key': 'dft_live_your_key'
}
});
const data = await response.json();
import requests
response = requests.get(
'https://api.draftory.ca/api/external/v2/status',
headers={
'x-api-key': 'dft_live_your_key'
}
)
data = response.json()
Getting Your API Key
- Sign in to your Draftory account at draftory.ca
- Navigate to Settings → API Access
- Click Create Key and select your scopes
- Copy your key immediately — the full key is only shown once
Warning
Your API key is shown only once. Store it securely. If you lose it, you will need to create a new key.
Scopes
Each API key is granted one or more scopes that control what it can access.
| Scope | Permissions |
|---|---|
contracts:read |
Get contract details and signing progress |
contracts:write |
Create new multi-party contracts |
Default keys receive both scopes.
Environments
| Environment | Key Prefix | Behaviour |
|---|---|---|
| Production | dft_live_ |
Creates real, legally-binding contracts. Uses your subscription quota. |
| Sandbox | dft_test_ |
For development and testing. Sandbox contracts auto-expire after 1 hour. Sandbox has separate rate limits. |
Security Best Practices
Best Practices
- Never commit API keys to version control
- Use environment variables to store keys
- Rotate keys regularly
- Use sandbox keys during development
- Restrict key scopes to minimum needed
API Pricing
API access requires an approved application and a paid subscription. Three tiers are available:
| Tier | Price | Monthly Quota |
|---|---|---|
| Startup | $29 CAD/mo | 5,000 calls |
| Growth | $99 CAD/mo | 25,000 calls |
| Enterprise | $499 CAD/mo | 250,000 calls |
See Rate Limits & Quotas for full details on tier features and billing.