Authentication
API Keys
Section titled “API Keys”The TheTerms API uses API keys for authentication. Each key is tied to a single organisation and grants access to all resources within that organisation.
Creating an API Key
Section titled “Creating an API Key”- Log in to your TheTerms dashboard
- Navigate to Settings → API Keys
- Click Create API Key
- Give it a descriptive name (e.g., “CI/CD Pipeline”, “CRM Integration”)
- Copy the key immediately — it is shown only once
Using Your API Key
Section titled “Using Your API Key”Include the key in the X-Api-Key header on every request:
curl https://app.theterms.app/api/v1/containers \ -H "X-Api-Key: tt_your_api_key_here"const response = await fetch("https://app.theterms.app/api/v1/containers", { headers: { "X-Api-Key": "tt_your_api_key_here", },});const data = await response.json();import requests
response = requests.get( "https://app.theterms.app/api/v1/containers", headers={"X-Api-Key": "tt_your_api_key_here"},)data = response.json()Key Format
Section titled “Key Format”API keys follow this format:
tt_<64 hex characters>The tt_ prefix identifies it as a TheTerms API key. The server stores only a SHA-256 hash of the key — the raw key is never stored.
Key Limits
Section titled “Key Limits”- Maximum 5 active API keys per organisation
- Keys can be revoked at any time from the dashboard
- Revoked keys are rejected immediately
Permissions
Section titled “Permissions”API keys currently operate with Admin permissions within the organisation. This means the key can:
- Read all resources (containers, documents, signing requests, webhooks)
- Create and modify documents and signing requests
- Manage containers and webhooks
Error Responses
Section titled “Error Responses”| Status | Meaning |
|---|---|
401 Unauthorized | Missing X-Api-Key header, invalid key, or revoked key |
{ "error": { "code": "UNAUTHORIZED", "message": "Invalid or missing API key" }}Security Best Practices
Section titled “Security Best Practices”- Never commit API keys to version control. Use environment variables.
- Rotate keys regularly. Revoke old keys and create new ones periodically.
- Use one key per integration. This makes it easy to revoke access for a specific system without disrupting others.
- Monitor usage. Check the
last_used_attimestamp on the dashboard to detect stale keys.