Documenso uses API tokens to authenticate requests to the API. All API requests must include anDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/documenso/documenso/llms.txt
Use this file to discover all available pages before exploring further.
Authorization header with a valid API token.
Authentication Method
The API uses Bearer token authentication. Include your API token in theAuthorization header of every request:
Token Format
API tokens follow this format:api_a1b2c3d4e5f6g7h8
Flexible Authorization Header
The API accepts theAuthorization header in two formats:
Token Storage and Security
API tokens are securely hashed using SHA-256 before storage. The implementation uses the following approach:Source: packages/lib/server-only/public-api/get-api-token-by-token.ts
The raw token is never stored in the database - only the hashed version is persisted for security.
Token Validation
When you make an API request, the authentication middleware validates your token:- Extracts token from the
Authorizationheader - Hashes the token using the same algorithm
- Looks up the hashed token in the database
- Validates expiration if an expiration date is set
- Checks user status to ensure the account is not disabled
- Attaches user and team context to the request
Authentication Errors
Your API token is missing, invalid, or expired.
Team vs. Personal Tokens
API tokens are associated with either a user or a team:- Team Tokens
- Personal Tokens
Team tokens allow you to create documents on behalf of the team. Actions are attributed to the team rather than an individual user.Use Cases:
- Shared integrations across team members
- Service accounts for automated workflows
- Organization-wide document management
- Must be a team admin to create team tokens
- Token permissions match team capabilities
Testing Your Authentication
Verify your API token is working correctly:Next Steps
Create API Tokens
Learn how to create and manage your API tokens
Rate Limits
Understand rate limiting for authenticated requests
