Skip to main content
The Logs page provides detailed information about every API request made to Lettr, helping you monitor activity, debug integrations, and troubleshoot issues quickly.

Overview

Access your logs from the Logs page in the dashboard. The API Logs view shows a comprehensive table of all API requests with the following information:
ColumnDescription
TimestampWhen the request was made
MethodThe HTTP method used (GET, POST, DELETE, etc.)
PathThe API endpoint called (e.g., api/emails, api/domains)
StatusThe HTTP response status code
IP AddressThe IP address that made the request
API KeyWhich API key was used (if applicable)
DetailsClick to view full request and response details
API logs are retained for 30 days. After this period, logs are automatically deleted.

Filtering Logs

Use the filter controls at the top of the page to narrow down your search.

Date Range

Select a custom date range to view logs from a specific period. The default view shows the last 7 days.

API Keys

Filter logs by specific API key to see requests made by a particular integration:
  • All API Keys - View logs from all API keys
  • Specific key - Select a named API key to filter
This is useful when debugging a specific integration or tracking usage per application.

User Agents

Filter by the SDK or client used to make requests:
User AgentDescription
SMTPRequests via SMTP relay
Node.jsLettr Node.js SDK
PHPLettr PHP SDK
PythonLettr Python SDK
RubyLettr Ruby SDK
GoLettr Go SDK
RustLettr Rust SDK
JavaLettr Java SDK
.NETLettr .NET SDK
cURLDirect cURL requests
OtherOther HTTP clients

Status Codes

Filter by HTTP response status to quickly identify successful requests or errors:
StatusDescription
All StatusesShow all requests
200 - OkSuccessful GET requests
201 - CreatedSuccessful POST requests (resource created)
400 - Bad RequestInvalid request format or parameters
401 - UnauthorizedMissing or invalid API key
403 - ForbiddenAPI key lacks required permissions
404 - Not FoundRequested resource doesn’t exist
422 - Unprocessable ContentRequest validation failed
429 - Too Many RequestsRate limit exceeded
451 - Unavailable For Legal ReasonsContent blocked for legal compliance
500 - Internal Server ErrorServer-side error
To quickly find failed requests, filter by 4xx and 5xx status codes. This helps you identify integration issues that need attention.

Searching Logs

Click the Search button after applying filters to refresh the results. The search respects all active filters including date range, API key, user agent, and status code selections.

Log Details

Click the details icon (or anywhere on a row) to open the full log detail view for any request.

Request Information

The detail view shows:
  • Method & Path - The HTTP method and API endpoint (e.g., POST api/emails)
  • Status Code - The response status with color indicator (green for success, red for errors)
  • Timestamp - Exact date and time of the request
  • Request Body - The full JSON payload sent to the API
Example request body:
{
  "from": "sender@example.com",
  "to": [
    "recipient@example.com"
  ],
  "subject": "Test send",
  "text": "Plain-text body",
  "html": "<p>HTML body</p> And click here: <a href=\"https://example.com\">Link</a>"
}

Response Information

  • Response Body - The complete API response
Example response body:
{
  "message": "Email queued for delivery.",
  "data": {
    "request_id": "759976368330071843",
    "accepted": 1,
    "rejected": 0
  }
}

Metadata

Additional information about the request:
  • IP Address - The source IP address
  • API Key - The API key name used (with the key itself partially masked for security)
  • User Agent - The client or SDK used (e.g., bruno-runtime/3.0.2, lettr-node/1.0.0)

Truncated Fields

To optimize storage and display, some large fields are truncated in the logs:
FieldBehavior
HTML bodyTruncated after 200 characters
Plain text bodyTruncated after 200 characters
AMP HTML bodyTruncated after 200 characters
AttachmentsReplaced with item count (e.g., “3 items”)
MetadataReplaced with item count (e.g., “2 items”)
Substitution DataReplaced with item count (e.g., “4 items”)
Truncation only affects log display. The actual email sent contains the full content.

Common Status Codes

Success Codes

CodeMeaningTypical Cause
200OKGET request successful
201CreatedPOST request successful, resource created

Client Error Codes

CodeMeaningHow to Fix
400Bad RequestCheck request body format and required fields
401UnauthorizedVerify your API key is correct and active
403ForbiddenCheck API key permissions for this endpoint
404Not FoundVerify the resource ID exists
422UnprocessableCheck validation errors in response body
429Too Many RequestsImplement rate limiting, wait before retrying
451Legal BlockContent flagged for compliance reasons

Server Error Codes

CodeMeaningWhat to Do
500Internal ErrorRetry the request; contact support if persistent

Troubleshooting with Logs

Finding Failed Requests

  1. Set the Status filter to show only error codes (4xx, 5xx)
  2. Click Search to filter results
  3. Click on a failed request to view details
  4. Check the Response Body for error messages

Debugging a Specific Integration

  1. Filter by the API Key used by that integration
  2. Optionally filter by User Agent if using an SDK
  3. Review recent requests for patterns or errors

Tracking Rate Limit Issues

  1. Filter by status code 429 - Too Many Requests
  2. Note the timestamps to identify when limits are being hit
  3. Review the IP addresses to see if requests are distributed
  4. Implement exponential backoff in your integration

Best Practices

Monitor Regularly

Check your API logs periodically to catch issues early:
  • Watch for error patterns — A sudden spike in 422 or 401 errors often indicates a configuration change or integration bug
  • Set up alerting — Use webhook-based alerting so your team is notified when error rates exceed a threshold
  • Monitor rate limits — Pay particular attention to 429 errors, which may signal that your integration needs pacing improvements or a plan upgrade

Use Descriptive API Key Names

Name your API keys descriptively (e.g., “Production Server”, “Staging Environment”, “Marketing Integration”) to easily identify which system made each request.

Correlate with Email Events

When troubleshooting email delivery issues:
  1. Find the send request in logs using the timestamp
  2. Note the request_id from the response
  3. Use this ID to track the email in the Emails dashboard

Next Steps