Complete technical reference for the Hamsterlog API, including endpoints, request/response formats, error codes, and rate limits.
https://www.hamsterlog.dev
All API requests require authentication using an API key. Include your API key in the request body:
{
"apiKey": "your-api-key-here",
"logs": [...]
}
Send one or more log entries to Hamsterlog.
Field | Type | Required | Description |
---|---|---|---|
apiKey | string | Yes | Your API key for authentication |
logs | array | Yes | Array of log objects (max 1000 logs per request) |
Field | Type | Required | Description |
---|---|---|---|
message | string | Yes | The log message (max 10,000 characters) |
tags | array | No | Array of tag strings (max 50 tags, 100 chars each) |
timestamp | integer | No | Unix timestamp in milliseconds |
POST https://www.hamsterlog.dev/api/log HTTP/1.1
Content-Type: application/json
{
"apiKey": "your-api-key-here",
"logs": [
{
"message": "User authentication successful",
"tags": ["auth", "success", "user-123"],
"timestamp": 1640995200000
},
{
"message": "Database query executed in 45ms",
"tags": ["database", "performance"],
"timestamp": 1640995201000
}
]
}
Success (200 OK):
Error (4xx/5xx):
Error message
HTTP Status | Error Code | Description | Resolution |
---|---|---|---|
400 | invalid_json | Request body is not valid JSON | Check JSON syntax |
400 | missing_api_key | API key not provided | Include apiKey in request body |
400 | missing_logs | Logs array not provided or empty | Include logs array with at least one log |
401 | invalid_api_key | API key is invalid or expired | Check API key or regenerate from dashboard |
429 | rate_limit_exceeded | Too many requests | Implement exponential backoff |
Official SDKs are available for popular languages:
For other languages, use the HTTP API directly.
For additional help, check our FAQ or Troubleshooting guide.