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:

PrefixEnvironmentUsage
lt_live_ProductionUse in your production applications
lt_test_Test / SandboxUse 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

HeaderValueRequired
AuthorizationBearer lt_live_...Yes
Content-Typeapplication/jsonFor POST/PUT/PATCH

Creating API Keys

API keys are created and managed through the LogTalk web dashboard:

  1. Log in to your LogTalk dashboard
  2. Navigate to Settings → API Keys
  3. Click Create API Key
  4. Give your key a descriptive name (e.g., "Production CI/CD")
  5. Select the organization the key should belong to
  6. 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 secrets
env:
LOGTALK_API_KEY: ${{ secrets.LOGTALK_API_KEY }}
# GitLab CI - Use CI/CD variables
variables:
LOGTALK_API_KEY: $LOGTALK_API_KEY
# Shell - Export as environment variable
export 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 CodeDescriptionResolution
MISSING_API_KEYNo Authorization header providedAdd the Authorization header with your API key
INVALID_API_KEYAPI key format invalid or not foundCheck the key format and verify it exists in your dashboard
EXPIRED_API_KEYAPI key has expiredCreate 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"
}