API Usage Policy
Last updated: January 2025
API Usage Overview
This policy outlines how Precedent uses various APIs, including Gmail API, to provide our email management services. We follow strict data minimization principles and respect all API rate limits and terms of service.
Gmail API Usage
Specific Use Cases
Read Operations
- Reading email content for AI analysis
- Accessing email metadata (sender, date, subject)
- Reading email labels and folder structure
- Checking read/unread status
Write Operations
- Applying labels to organize emails
- Marking emails as read/unread
- Drafting email replies (with permission)
- Sending emails (with explicit permission only)
OAuth Scopes Used
- • gmail.readonly: Read access to Gmail messages and metadata
- • gmail.labels: Manage Gmail labels and folder structure
- • gmail.modify: Modify email properties (read status, labels)
- • gmail.compose: Draft and send emails (only with explicit permission)
Rate Limiting & API Quotas
Gmail API Rate Limits
Daily Quotas
- 1 billion quota units per day
- 250 quota units per user per 100 seconds
- 1,000,000 quota units per 100 seconds
Our Usage Patterns
- Real-time email monitoring (minimal quota usage)
- Batch processing during off-peak hours
- Efficient caching to reduce API calls
- Monitoring and alerting for quota usage
Rate Limiting Strategies
- Exponential backoff for failed requests
- Request queuing during high usage periods
- Priority-based request scheduling
- Real-time quota monitoring and alerts
Error Handling & Reliability
API Error Handling
Error Types & Responses
- Rate limit errors: Automatic retry with backoff
- Authentication errors: Prompt user to re-authorize
- Network errors: Retry with exponential backoff
- Permission errors: Graceful degradation
Service Reliability
- 99.9% uptime target
- Redundant API connections
- Automatic failover mechanisms
- Real-time monitoring and alerting
Data Minimization & Purpose Limitation
Data Minimization Principles
We strictly follow data minimization principles in our API usage:
- • Only access email data necessary for our service functionality
- • Use specific API endpoints rather than broad access
- • Request only required fields and metadata
- • Implement efficient filtering to reduce data transfer
- • Cache data appropriately to minimize API calls
- • Delete data immediately after processing when possible
Purpose Limitation
- Data used only for email analysis and prioritization
- No secondary use of data without explicit consent
- Data not used for advertising or marketing
- No sharing with third parties except as necessary for service operation
Third-Party API Usage
Other APIs We Use
Communication APIs
- Twilio API: SMS notifications
- Slack API: Slack notifications (when connected)
AI Processing APIs
- Anthropic Claude API: Primary email analysis (ephemeral processing)
- OpenAI GPT-4 API: Backup AI processing for reliability (ephemeral processing)
API Compliance
- All third-party APIs used in compliance with their terms of service
- Respect all rate limits and usage quotas
- Implement appropriate error handling and retry logic
- Monitor API usage and performance metrics
API Security & Monitoring
Security Measures
Authentication & Authorization
- OAuth 2.0 for all API access
- API keys stored securely with encryption
- Regular token rotation and refresh
- Role-based access control for API operations
Monitoring & Logging
- Comprehensive API call logging
- Real-time performance monitoring
- Anomaly detection for unusual API usage
- Automated alerting for errors and failures
Contact Information
For questions about our API usage policy or technical implementation:
Technical Support: support@getprecedent.ai
API Questions: api@getprecedent.ai
Security Concerns: security@getprecedent.ai
General Support: hello@getprecedent.ai
Changes to API Usage Policy
We may update this API Usage Policy from time to time to reflect changes in our API usage patterns, new integrations, or updated compliance requirements. We will notify users of any material changes to this policy.