Authentication
The LogTalk API uses API keys for authentication. All requests must include a valid API key in the Authorization header.
API Key Format
LogTalk API keys use a prefix to indicate their environment:
| Prefix | Environment | Usage |
|---|---|---|
lt_live_ | Production | Use in your production applications |
lt_test_ | Test / Sandbox | Use for development and testing |
A complete API key looks like: lt_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
Making Authenticated Requests
Include your API key in the Authorization header using the Bearer scheme:
curl https://api.logtalk.io/v1/conversions \-H "Authorization: Bearer lt_live_your_api_key_here" \-H "Content-Type: application/json"
Required Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer lt_live_... | Yes |
Content-Type | application/json | For POST/PUT/PATCH |
Creating API Keys
API keys are created and managed through the LogTalk web dashboard:
- Log in to your LogTalk dashboard
- Navigate to Settings → API Keys
- Click Create API Key
- Give your key a descriptive name (e.g., "Production CI/CD")
- Select the organization the key should belong to
- Copy the full key immediately - it will only be shown once
Important
API keys are only displayed once at creation. Store your key securely - if you lose it, you'll need to create a new one and update your applications.
Security Best Practices
Use Environment Variables
Never hardcode API keys in your source code. Use environment variables or secret management tools.
Rotate Keys Regularly
Create new API keys periodically and revoke old ones. This limits the impact of any potential key exposure.
Use Separate Keys for Each Environment
Create different API keys for development, staging, and production. This helps with monitoring and quick revocation if needed.
Storing Keys in CI/CD
Environment Configuration
# GitHub Actions - Use repository secretsenv:LOGTALK_API_KEY: ${{ secrets.LOGTALK_API_KEY }}# GitLab CI - Use CI/CD variablesvariables:LOGTALK_API_KEY: $LOGTALK_API_KEY# Shell - Export as environment variableexport LOGTALK_API_KEY="lt_live_your_api_key_here"
Authentication Errors
Authentication failures return a 401 Unauthorized status with one of these error codes:
| Error Code | Description | Resolution |
|---|---|---|
MISSING_API_KEY | No Authorization header provided | Add the Authorization header with your API key |
INVALID_API_KEY | API key format invalid or not found | Check the key format and verify it exists in your dashboard |
EXPIRED_API_KEY | API key has expired | Create a new API key in your dashboard |
Example Error Response
{"success": false,"error": {"code": "INVALID_API_KEY","message": "Invalid API key","documentation_url": "https://docs.logtalk.io/errors/authentication#invalid-key"},"request_id": "req_1kn5f2a_a3b4c5d6e7f8","timestamp": "2026-01-18T12:00:00.000Z"}
API Access Authorization
API access requires a Growth tier subscription or higher. If your subscription doesn't include API access, you'll receive a 403 Forbidden response:
{"success": false,"error": {"code": "API_ACCESS_DENIED","message": "API access requires Growth tier or higher","details": {"current_tier": "starter","upgrade_url": "https://logtalk.io/pricing"},"documentation_url": "https://docs.logtalk.io/errors/authorization#api-access"},"request_id": "req_1kn5f2a_a3b4c5d6e7f8","timestamp": "2026-01-18T12:00:00.000Z"}