API Keys
Creating API keys, permissions, usage monitoring
API Keys & Access Tokens
Generate API keys for programmatic access to Verk. Create secure tokens, manage permissions, and monitor API usage.
Overview
API keys enable:
- Programmatic access to your Verk data
- Integration with third-party tools
- Custom automation scripts
- CI/CD pipeline integration
- Webhook authentication
Each API key can have specific permissions and rate limits.
Prerequisites
Required role: Any user can create personal API keys Plan requirements:
- Free: 2 API keys, 1,000 requests/day
- Pro: 10 API keys, 100,000 requests/day
- Enterprise: Unlimited keys and requests
API keys provide programmatic access to your account. Keep them secret and secure like passwords.
Creating API Keys
Generate Your First Key
Create a new API key:
- Navigate to Settings → API Keys
- Click "+ Create API Key"
- Configure the key:
- Name: Descriptive name (e.g., "CI/CD Pipeline", "Data Export Script")
- Description: Purpose and usage context
- Expiration: Never, 30 days, 90 days, 1 year, custom date
- Permissions: Select scope (read, write, delete)
- Click "Generate Key"
- Copy the API key immediately
API keys are shown only once during creation. Copy and save them securely. You cannot retrieve them later.
Key format:
verk_sk_live_AbCdEfGh123456789
verk: Platform identifiersk: Secret keylive: Environment (live or test)AbCdEfGh123456789: Unique identifier
Permission Scopes
Choose what the API key can access:
Read permissions:
tasks:read- View tasksprojects:read- View projectsmembers:read- View team membersfiles:read- Download filescomments:read- View commentsanalytics:read- Access analytics data
Write permissions:
tasks:write- Create and update tasksprojects:write- Create and update projectsfiles:write- Upload filescomments:write- Add commentswebhooks:write- Create webhooks
Delete permissions:
tasks:delete- Delete tasksprojects:delete- Delete projectsfiles:delete- Delete files
Full access:
*- All permissions (use carefully)
Best practice: Grant minimum permissions needed. Use read-only when possible.
Setting Expiration
Control key lifespan:
Never expire:
- Key remains active indefinitely
- Requires manual revocation
- Higher security risk
- Only for long-term integrations
Time-limited:
- Auto-expires after period
- Reduces risk if key is compromised
- Requires renewal for continued access
- Recommended for most use cases
Custom expiration: Choose specific date (e.g., end of project, contract period)
Using API Keys
Authentication
Include your API key in requests:
Header authentication (recommended):
curl -X GET "https://api.verk.com/v1/tasks" \
-H "Authorization: Bearer verk_sk_live_AbCdEfGh123456789"
Query parameter (not recommended):
curl "https://api.verk.com/v1/tasks?api_key=verk_sk_live_AbCdEfGh123456789"
Query parameters appear in logs and browser history. Always use header authentication.
Example Requests
Get all tasks:
curl -X GET "https://api.verk.com/v1/tasks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
Create a task:
curl -X POST "https://api.verk.com/v1/tasks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Implement new feature",
"description": "Add user authentication",
"projectId": "proj_123",
"priority": "high",
"dueDate": "2024-12-31"
}'
Update a task:
curl -X PATCH "https://api.verk.com/v1/tasks/task_456" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "in_progress",
"assigneeId": "user_789"
}'
Rate Limits
API requests are rate-limited by plan:
Free plan:
- 1,000 requests per day
- 100 requests per hour
- 10 requests per minute
Pro plan:
- 100,000 requests per day
- 10,000 requests per hour
- 500 requests per minute
Enterprise plan:
- Custom limits based on contract
- Typically unlimited for standard usage
Rate limit headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 87
X-RateLimit-Reset: 1640995200
Exceeding limits:
- HTTP 429 Too Many Requests
- Retry after time indicated in
Retry-Afterheader - Implement exponential backoff
Error Handling
Handle API errors gracefully:
Common status codes:
200 OK- Success201 Created- Resource created400 Bad Request- Invalid parameters401 Unauthorized- Invalid or missing API key403 Forbidden- Insufficient permissions404 Not Found- Resource doesn't exist429 Too Many Requests- Rate limit exceeded500 Internal Server Error- Server issue
Error response format:
{
"error": {
"code": "invalid_request",
"message": "Missing required field: title",
"param": "title",
"type": "validation_error"
}
}
Managing API Keys
Viewing Active Keys
See all your API keys:
- Navigate to Settings → API Keys
- View key list showing:
- Key name and description
- Created date
- Last used date
- Expiration date
- Permissions
- Usage stats
Key details: Click any key to see:
- Full permission list
- Request count (last 7 days, 30 days)
- Last request timestamp
- Associated IP addresses
- Error rate
Rotating Keys
Periodically update API keys for security:
Create rotation process:
- Generate new API key with same permissions
- Update applications to use new key
- Test new key works correctly
- Revoke old key
- Monitor for errors
Recommended rotation:
- Production keys: Every 90 days
- Development keys: Every 180 days
- Unused keys: Revoke immediately
Zero-downtime rotation:
- Create new key (Key B)
- Deploy Key B to 50% of services
- Monitor for issues
- Deploy Key B to remaining 50%
- Wait 7 days for propagation
- Revoke old key (Key A)
Revoking Keys
Disable compromised or unused keys:
- Find key in API Keys list
- Click "Revoke"
- Confirm revocation
What happens:
- Key immediately stops working
- All requests return 401 Unauthorized
- Applications using key will fail
- Cannot be undone - must create new key
When to revoke:
- Key potentially compromised
- Employee leaving company
- Application decommissioned
- Key no longer needed
- Transitioning to new key
Monitoring Usage
Usage Analytics
Track API key activity:
Dashboard metrics:
- Total requests (by day, week, month)
- Success rate
- Error rate by type
- Average response time
- Top endpoints used
Request breakdown:
- GET requests (read operations)
- POST requests (create operations)
- PATCH/PUT requests (update operations)
- DELETE requests (delete operations)
Filtering:
- By date range
- By endpoint
- By response code
- By IP address
Usage Alerts
Get notified of unusual activity:
Alert triggers:
- Approaching rate limit (80%, 90%)
- Unusual number of errors (>5% error rate)
- Request from new IP address
- Spike in usage (2x normal)
- Key used after business hours
Configure alerts:
- Settings → API Keys → Alerts
- Enable desired alerts
- Add notification emails
- Set thresholds
- Save
Security Best Practices
Never Commit Keys to Version Control
Add API keys to .gitignore and use environment variables instead:
# .env file (add to .gitignore)
VERK_API_KEY=verk_sk_live_AbCdEfGh123456789
// Use environment variable
const apiKey = process.env.VERK_API_KEY
Use Environment Variables Store keys in environment variables, not in code:
export VERK_API_KEY="verk_sk_live_AbCdEfGh123456789"
Separate Keys by Environment Use different API keys for development, staging, and production.
Grant Minimal Permissions Only assign permissions absolutely necessary for the integration.
Rotate Keys Regularly Change production API keys every 90 days, development keys every 180 days.
Monitor Key Usage Review usage logs weekly for unusual activity or errors.
Revoke Unused Keys Remove API keys that haven't been used in 90+ days.
Use HTTPS Only Always send API requests over HTTPS, never HTTP.
Implement Rate Limiting Add your own rate limiting to avoid hitting Verk's limits.
Log but Don't Store Log API requests for debugging but never log the full API key.
Troubleshooting
API Key Not Working
Check:
- Key hasn't been revoked
- Key hasn't expired
- Permissions include required scope
- Rate limit not exceeded
- Correct API endpoint URL
- Proper authentication header format
Common mistakes:
# Wrong - missing Bearer prefix
Authorization: verk_sk_live_AbCdEfGh123456789
# Correct - includes Bearer
Authorization: Bearer verk_sk_live_AbCdEfGh123456789
401 Unauthorized Error
Causes:
- Invalid API key
- Expired key
- Revoked key
- Missing Authorization header
- Typo in API key
Fix:
- Verify key is copied correctly (no extra spaces)
- Check key hasn't expired
- Confirm key is still active in dashboard
- Test with curl to isolate issue
403 Forbidden Error
Causes:
- Insufficient permissions
- Attempting to access resource outside scope
- Organization-level restrictions
Fix:
- Review key permissions
- Add required scope
- Confirm you have access to the resource
- Check organization settings
Rate Limit Exceeded
Solutions:
- Implement exponential backoff
- Cache responses when possible
- Batch operations
- Upgrade plan for higher limits
- Spread requests over longer time period
Exponential backoff example:
async function makeRequestWithRetry(url, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
const response = await fetch(url, {
headers: { Authorization: `Bearer ${apiKey}` },
})
if (response.status === 429) {
const retryAfter = response.headers.get('Retry-After')
const delay = retryAfter
? parseInt(retryAfter) * 1000
: Math.pow(2, i) * 1000
await new Promise(resolve => setTimeout(resolve, delay))
continue
}
return response
} catch (error) {
if (i === maxRetries - 1) throw error
}
}
}
Related Documentation
- API Reference - Complete API documentation
- Webhooks - Event-driven integrations
- SDK & Libraries - Official client libraries
- Security Settings - Account security
- Custom Integration - Advanced customization
Need API support? Check our API documentation or contact our developer support.