API Key Authentication
All PriveTag B2A API requests require authentication via API key.Getting Your API Key
- Sign up at privetag.com/developers
- Navigate to API Keys section
- Click Create New Key
- Configure your key settings
Using Your API Key
Include your API key in thex-api-key header with every request:
Key Format
API keys follow this format:- Prefix:
pk_followed by 6 characters (visible in dashboard) - Full Key: 64 character hex string
pk_a1b2c3... (full key is 64 characters)
Endpoint Permissions
When creating an API key, you can specify which endpoints it can access:Quota and Rate Limits
Each API key has:- Daily Quota: Maximum requests per day (resets at midnight UTC)
- Rate Limit: Maximum requests per minute
Error Codes
Error Response Format
Best Practices
Keep Keys Secret
Keep Keys Secret
- Never expose API keys in client-side code
- Use environment variables
- Don’t commit keys to version control
Use Separate Keys
Use Separate Keys
Create different keys for:
- Development vs Production
- Different applications
- Different team members
Monitor Usage
Monitor Usage
- Check usage in the dashboard regularly
- Set up alerts for quota warnings
- Review access logs for unusual activity
Rotate Keys
Rotate Keys
- Rotate keys periodically
- Revoke compromised keys immediately
- Use the dashboard to create new keys before revoking old ones
Webhook Configuration
You can configure a webhook URL for your API key to receive callbacks:- Booking Confirmed: When a booking is successfully created
- Voucher Delivered: When voucher email is sent
- QR Verified: When guest uses the voucher (Ground Truth event)
Next Steps
Rate Limits
Learn about rate limiting and quotas
Webhooks
Set up webhook callbacks