Logs: Reading
Get Logs
Read up to 50 logs by email ID, the `id` you get back when you send. Add `include_content` to get the HTML that was delivered.
https://g.sendcorex.com/v1/logscommand: get_logsNeeds the logs:read scope on your API key.
An ID costs the same to look up no matter how many emails you send: there is no scan behind it.
Arguments
idsstring[]optionalUp to 50 email IDs (UUIDs). Repeated ids count once.
e.g.
["3f2a1b4c-8e9d-4f7a-b2c3-1a2b3c4d5e6f"]idstringoptionalA single email ID. Use this or
ids.e.g.
"3f2a1b4c-8e9d-4f7a-b2c3-1a2b3c4d5e6f"include_contentbooleanoptionalAlso return the HTML of each email. With it, the limit is 10 ids per command.
e.g.
true
Quick start
import axios from 'axios';
const response = await axios.post(
'https://g.sendcorex.com/v1/logs',
{
commands: [
{
command: "get_logs",
args: {
ids: [
"3f2a1b4c-8e9d-4f7a-b2c3-1a2b3c4d5e6f",
"00000000-0000-4000-8000-000000000000"
]
}
}
]
},
{ headers: { Authorization: process.env.SENDCOREX_API_KEY } },
);
const [result] = response.data.results;
if (result.type !== 'SUCCESS') throw new Error(`${result.code}: ${result.message}`);
console.log(result.data);Response
{
"type": "SUCCESS",
"results": [
{
"command": "get_logs",
"id": "0",
"type": "SUCCESS",
"took_ms": 18,
"data": {
"logs": [
{
"id": "3f2a1b4c-8e9d-4f7a-b2c3-1a2b3c4d5e6f",
"to": "ana@acme.com",
"from": "noreply@yourdomain.com",
"domain": "acme.com",
"from_domain": "yourdomain.com",
"subject": "Your order #1042 has shipped",
"status": "delivered",
"status_code": 2,
"response": "250 2.0.0 OK 1760684401 a1si123456",
"message": null,
"blocked": false,
"block_reason": null,
"retries": 0,
"tracking_id": "7CK-JDL-Y1L-20261017",
"sent_at": "2026-10-17T06:00:01.204Z",
"updated_at": "2026-10-17T06:00:02.913Z"
}
],
"not_found": [
"00000000-0000-4000-8000-000000000000"
]
}
}
]
}Response fields
logsThe logs that were found, in the order you asked for them.
not_foundThe ids that do not exist in your account, are older than 60 days, or belong to warm-up emails.
logs[].idThe email ID (a UUID). It is the
idyou get back when you send, and what you pass to Get Logs.logs[].to / logs[].domainThe recipient and the recipient's domain.
logs[].from_domainThe sender's domain (the part after @ in
from).logs[].fromThe sender address.
logs[].subjectThe subject line.
logs[].statusdelivered,bounced,spam,rate_limitedornot_sent.status_codeis the same thing as a number.logs[].responseWhat the recipient server answered, for example
250 2.0.0 OKor the550bounce reason.logs[].messageExtra detail from Sendcorex about the delivery, when there is any.
logs[].blocked / logs[].block_reasontruewhen Sendcorex did not send to this recipient (suppressed or restricted), and why.logs[].retriesHow many times the delivery was retried.
logs[].tracking_idThe internal delivery id. Bounce and complaint webhooks carry the same value.
logs[].sent_at / logs[].updated_atWhen the email was sent, and when its status last changed. ISO 8601, UTC.
logs[].content.htmlThe HTML that was delivered. Only with
include_content: true;nullwhen the body was not stored.
Reading the body
The body is the heaviest part of a log, so it only comes back when you ask. It is the HTML as it was delivered: if tracking was on, it can include the tracking pixel and rewritten links.
Request body
{
"commands": [
{
"command": "get_logs",
"args": {
"id": "3f2a1b4c-8e9d-4f7a-b2c3-1a2b3c4d5e6f",
"include_content": true
}
}
]
}Rendering that HTML can load the tracking pixel and count as an open. Show it in a sandboxed iframe with remote images blocked, the way the dashboard does.
Details for a page of List Logs
Chain the two commands with $ref: the ids from the list go straight into Get Logs, in one request.
Request body
{
"commands": [
{
"command": "list_logs",
"id": "bounces",
"args": {
"status": "bounced",
"limit": 10
}
},
{
"command": "get_logs",
"args": {
"ids": {
"$ref": "bounces",
"path": "logs/*/id"
},
"include_content": true
}
}
]
}Errors
HTTP-level errors return type, code and message. Errors marked CMD come back inside the command result, with HTTP 200.
- 401
INVALID_API_KEYThe API key does not exist, was revoked or was disabled in the dashboard.
- 429
RATE_LIMITEDMore than 15 requests/s or 15 in flight for the same IP + API key. Wait the number of seconds in Retry-After.
- CMD
MISSING_SCOPEThe API key does not have `logs:read`.
- CMD
INVALID_ARGSAn argument is invalid: unknown status, recipient that is not a full email, limit out of range, id that is not a UUID, after later than before…
- CMD
INTERNALServer error. The detail is only written to the server log.