Logs
The record of every request made with an API key and of every SMTP send.
What it's for
The Logs record every request made to the API with a key and every email sent over SMTP, with the body you sent and the response Postal returned. It's the first place to look when an integration "doesn't work".
When to use: To debug an error (400, 401, 422, 429), check what your system actually sent and see which key made the call.
#Log list
Where to find it: Developers › Logs. Address: app.postal.so/logs.
Calls made with API keys and SMTP sends appear here; what you do inside the dashboard doesn't. Logs are kept for 30 days.
| Item | What it does |
|---|---|
| Search by endpoint | Filters by the call's path (for example, /emails). |
| Period | Shortcuts (Today, Yesterday, Last 24 hours, Last 3 days, Last 7 days, Last 15 days and Last 30 days), calendar and All time. |
| Filters › Status | Success (2xx), Client error (4xx), Server error (5xx) or Rate limited (429). |
| Filters › Source | API or SMTP (API and SMTP shows both). |
| Filters › User agent | The program that made the call: Node.js SDK, PHP SDK, Python SDK or cURL (All clients clears it). |
| Filters › API key | Only the calls from one key. |
| Export | Generates a CSV of the logs with the current filters. |
| Column | What it shows |
|---|---|
| Endpoint | The method and path, like POST /emails. Clicking opens the details. |
| Status | The HTTP code of the response, in green (2xx), yellow (4xx) or red (5xx). |
| Key | The name of the API key used, or deleted key if it was revoked. |
| User agent | The client program, or SMTP client for SMTP sends. |
| Date | Date and time of the request. |
Tip
4xx errors almost always come from the call itself (missing field, key without permission, unverified domain). Filter by Client error (4xx) and open a log: the response includes the error's name, which is explained in Errors. Many Rate limited (429) responses mean it's worth using batch sending or checking the limits.
#Log details
Where to find it: Developers › Logs, by clicking a row. Address: app.postal.so/logs.
The header shows the method and path, the date and the user agent, and the status code. Below, two blocks side by side:
| Block | What it shows |
|---|---|
| Request | The JSON body your system sent. If empty, No body appears. |
| Response | The JSON Postal returned: the id of the email created, or the error with statusCode, name and message. |
The content of attachments isn't stored in the log: in its place you see the size, like [1234 bytes em base64], and very long texts are truncated. On GET calls, the Request shows the URL parameters. To see what happened to the email after it was created, open the email in Emails: the Request field links the two.
See also: Logs (API) · Errors · API keys.