Skip to content

API Overview

The TheTerms REST API lets you programmatically manage containers, documents, signing requests, and webhooks. All endpoints live under /api/v1/ and use JSON for request and response bodies.

https://app.theterms.app/api/v1

For self-hosted instances, replace app.theterms.app with your domain.

Every request must include an API key in the X-Api-Key header:

Terminal window
curl https://app.theterms.app/api/v1/containers \
-H "X-Api-Key: tt_your_api_key_here"

API keys are created from the dashboard under Settings → API Keys. Each key is scoped to your organisation. See the Authentication Guide for details.

Containers

Group related documents together. Create, list, retrieve, and delete containers.

Documents

Manage documents and versions within containers. Create drafts, update clauses, and publish versions.

Signing Requests

Send signing invitations. List requests and retrieve individual results with clause-level detail.

Webhooks

Get notified when events happen. Manage webhook endpoints and inspect delivery history.

All responses return JSON. Successful responses include the requested data directly. List endpoints include pagination metadata:

{
"data": [...],
"pagination": {
"total": 42,
"limit": 20,
"offset": 0
}
}

Errors return a consistent structure:

{
"error": {
"code": "NOT_FOUND",
"message": "Container not found"
}
}

API requests are rate-limited to 100 requests per minute per API key. Every response includes rate limit headers:

HeaderDescription
X-RateLimit-LimitMaximum requests per window
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when the window resets

When the limit is exceeded, the API returns HTTP 429 Too Many Requests with a Retry-After header.

CodeMeaning
200Success
201Created
400Bad request (validation error)
401Unauthorized (missing or invalid API key)
403Forbidden (insufficient permissions)
404Resource not found
409Conflict (e.g., duplicate resource)
429Rate limit exceeded
500Internal server error

Explore the full API with the interactive reference, powered by our OpenAPI specification.