Overview
API keys are the primary authentication mechanism for the InstaView API. Each key is cryptographically secure, scoped to a specific company, and has granular permissions through scopes.Key Architecture
Security Features
InstaView API keys are built with enterprise-grade security:HMAC-SHA256 Hashing
Keyed hashing with a strong server-side secret; plaintext keys are never
stored.
256-bit Entropy
Cryptographically secure random key generation
Audit Logging
Complete audit trail for all key lifecycle events
Company Isolation
Keys are strictly scoped to prevent cross-company access
Key Components
Every API key contains:- Prefix: Identifies key type (
sk_for secret keys) - Environment:
livefor production,testfor sandbox - Identifier: Unique 32-character string
- Metadata: Name, scopes, creation date, etc.
Creating API Keys
Via Dashboard
1
Navigate to API Keys
Go to Settings → API Keys in your dashboard
2
Create New Key
Click Create API Key
3
Configure Details
4
Save the Key
Important: Copy your API key immediately - it will only be shown once!
Via API (Admin Only)
Scope Configuration
Choosing the Right Scopes
Apply the principle of least privilege:- Analytics Dashboard
- Candidate Portal
- Full Integration
- Webhook Handler
Scope Validation
When making API requests, scopes are validated:Key Types
Regular API Keys
Standard keys associated with a single company:- Direct integrations
- Internal tools
- Customer-facing applications
ATS Integration Keys
Special keys for multi-tenant ATS platforms:- Greenhouse, Lever, or other ATS integrations
- Multi-tenant recruitment platforms
- White-label solutions
ATS keys can only be created by InstaView administrators. Contact
support to request ATS integration access.
Advanced Configuration
IP Allowlists
Restrict key usage to specific IP addresses or ranges:Expiration Dates
Set automatic key expiration for temporary access:- Use expiration for contractor/temporary access
- Set 90-day expiration for high-privilege keys
- Receive email notifications 7 days before expiry
Metadata and Tags
Add custom metadata for organization:Key Lifecycle Management
Monitoring Usage
Track key usage in the dashboard:- Last Used: Timestamp of most recent request
- Request Count: Total API calls made
- Error Rate: Failed requests percentage
- Top Endpoints: Most frequently accessed endpoints
Rotating Keys
Regular rotation improves security:1
Create New Key
Generate a replacement key with the same scopes
2
Update Applications
Deploy the new key to all applications
3
Monitor Old Key
Verify traffic has moved to the new key
4
Revoke Old Key
Once traffic has fully migrated, revoke the old key
- High-privilege keys: Every 90 days
- Read-only keys: Every 180 days
- Compromised keys: Immediately
Suspending Keys
Temporarily disable a key without deletion:- Investigating suspicious activity
- Temporary service maintenance
- Debugging integration issues
Revoking Keys
Permanently revoke a compromised key:Security Best Practices
Never Expose Keys in Code
Never Expose Keys in Code
❌ Don’t do this:✅ Do this instead:
Use Separate Keys per Environment
Use Separate Keys per Environment
- Production:
sk_live_xxx- Staging:sk_test_xxx- Development:sk_test_yyyNever use production keys in non-production environments.
Implement Key Rotation
Implement Key Rotation
Monitor Key Usage
Monitor Key Usage
Set up alerts for: - Unusual request volumes - Requests from unexpected IPs -
High error rates - After-hours usage (if unexpected)
Use IP Allowlists
Use IP Allowlists
When your application runs from fixed infrastructure:Note: All API requests must use the
Authorization: Bearer header with your API key.Audit Logs
All API key events are logged for security and compliance:Logged Events
- Key Creation: Who created it, when, and with what scopes
- Authentication: Every successful and failed authentication
- Scope Changes: Modifications to key permissions
- Suspension/Revocation: Status changes with reasons
- Configuration Changes: IP allowlist, expiration date updates
Accessing Audit Logs
Example Audit Log Entry
Troubleshooting
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
Possible Causes: - Insufficient scopes - IP not in allowlist - Attempting
cross-company access Solutions: - Check required scope in error message -
Verify your IP is allowlisted - Confirm you’re accessing resources in your
company
429 Rate Limited
429 Rate Limited
Possible Causes:
- Exceeded rate limit
- Too many requests in short time
- Implement exponential backoff
- Check
Retry-Afterheader - Review rate limiting guide