Overview
gu1 uses API keys to authenticate requests. All API requests must include your API key in theAuthorization header using the Bearer scheme.
Getting Your API Key
1
Log in to Dashboard
Navigate to app.gu1.ai and log in to your account
2
Access API Keys Section
Click on Settings → API Keys in the sidebar
3
Create New Key
Click Create API Key button
4
Configure Key
- Give your key a descriptive name (e.g., “Production API”, “Development”)
- Set permissions (read, write, admin)
- Optionally set an expiration date
5
Copy and Store
Copy the generated key immediately - it will only be shown once!
Using Your API Key
Include your API key in theAuthorization header of every request:
Example with Different Methods
API Key Types
gu1 offers different types of API keys for different environments:Live Keys
Start with
sk_live_Used for production environments. All operations are real and affect your live data.Test Keys
Start with
sk_test_Used for development and testing. Operations don’t affect your production data.Permissions
API keys can have different permission levels:| Permission | Description | Use Case |
|---|---|---|
| Read | View entities, rules, and data | Analytics dashboards, reporting |
| Write | Create and update entities | Data ingestion, API integrations |
| Admin | Full access including key management | Infrastructure automation |
Follow the principle of least privilege - only grant the minimum permissions needed for each integration.
Best Practices
Secure Storage
Secure Storage
- Store API keys in environment variables or secret management systems
- Never hardcode keys in your source code
- Never commit keys to version control (use
.envfiles and.gitignore)
Key Rotation
Key Rotation
- Rotate API keys regularly (every 90 days recommended)
- Create new keys before revoking old ones to avoid downtime
- Update all systems that use the old key
Monitor Usage
Monitor Usage
- Regularly review API key activity in the dashboard
- Set up alerts for unusual usage patterns
- Immediately revoke compromised keys
Environment Separation
Environment Separation
- Use test keys for development and staging
- Use live keys only in production
- Never use live keys on developer machines
Error Responses
If authentication fails, you’ll receive one of these error responses:Missing API Key
401 Unauthorized
Invalid API Key
401 Unauthorized
Expired API Key
401 Unauthorized
Insufficient Permissions
403 Forbidden
Rate Limiting
API keys are subject to rate limits based on your plan:| Plan | Requests per hour | Requests per day |
|---|---|---|
| Free | 100 | 10,000 |
| Starter | 300 | 100,000 |
| Professional | 1,200 | 500,000 |
| Enterprise | Custom | Custom |
Rate Limit Headers
All API responses include rate limit information in the headers:| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests allowed in the current window |
X-RateLimit-Remaining | Number of requests remaining in the current window |
X-RateLimit-Reset | ISO 8601 timestamp when the rate limit resets |
Rate Limit Exceeded Response
When you exceed rate limits, you’ll receive:429 Too Many Requests
Response Headers: