Get results from a log query started with Start Log Query. Poll until status is Complete.
const url = 'https://api.pingram.io/logs/query/example';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.pingram.io/logs/query/example \ --header 'Authorization: Bearer <token>'Authorizations
Parameters
Path Parameters
Query ID returned by Start Log Query
Responses
200
Successful response
Response type for GET /logs/query/{queryId}
object
object
Bare POST /email may set this on the email_sent row so Logs Insights latest(email_preview) still resolves after delivered/opened rows. Sender / SQS consumer paths omit this field (unchanged behavior).
When the message was accepted, ISO 8601. Log order and the 30-day resend window use this time.
Sender email address.
Sender display name, when the From header includes one.
Comma-separated To header addresses. This is the header, not necessarily the Pingram inbox.
Comma-separated CC header addresses.
Comma-separated BCC header addresses. Often empty because that header is stripped before delivery.
Reply-To header address.
Address that received the mail. Same value as matched.email on the EMAIL_INBOUND webhook, including when that address was only in Cc or Bcc.
Display name of email_inbound_inbox when the headers include one. Same value as matched.name. Omitted when that address has no display name.
Sender Date header, ISO 8601. Omitted when that header is missing or invalid.
Key used to resend this inbound email for 30 days.
User id from the original notification when this mail is a reply to one.
Subject line.
Plain-text body.
HTML body. Inline images use cid: values that match attachment content IDs on the webhook payload.
True when the message includes at least one attachment.
Number of attachments. File bytes are not stored on this log.
Message-ID header. Use it to thread later replies.
In-Reply-To header: the Message-ID this mail replies to.
References header: the chain of Message-IDs in the thread.
True when an EMAIL_INBOUND webhook endpoint returned a 2xx response.
JSON delivery result for each EMAIL_INBOUND endpoint.
How the inbox was matched: reply for a reply to a sent notification, builtin for a Pingram inbox, or custom for a custom domain.
Pingram number that received the inbound message.
Truncated JSON string of inbound MMS metadata when present.
Same value as call_delivered_cost_internal (for API/external use)
Unique message ID from the SMS provider
True when the send included MMS (mediaUrls).
Actual carrier cost (internal)
Actual delivery cost from carrier webhook (USD), for internal logging
Example
{ "logs": [ { "failed_code": "SPAM_CONTENT", "inapp_failed_code": "IN_APP_WEB_FAILED", "mobile_push_failed_code": "NO_APN_CONFIG", "email_failed_code": "UNVERIFIED_SENDER", "email_inbound_resolution_type": "reply", "web_push_failed_code": "UNSUBSCIRBED_OR_EXPIRED", "ignored": "THROTTLING", "email_routing": "OFF", "email_routing_reason": "IGNORE_BY_PREFERENCES", "sms_routing": "OFF", "sms_routing_reason": "IGNORE_BY_PREFERENCES", "web_push_routing": "OFF", "web_push_routing_reason": "IGNORE_BY_PREFERENCES", "mobile_push_routing": "OFF", "mobile_push_routing_reason": "IGNORE_BY_PREFERENCES", "call_routing": "OFF", "call_routing_reason": "IGNORE_BY_PREFERENCES", "inapp_routing": "OFF", "inapp_routing_reason": "IGNORE_BY_PREFERENCES", "slack_routing": "OFF", "slack_routing_reason": "IGNORE_BY_PREFERENCES", "slack_failed_code": "CHANNEL_NOT_FOUND", "call_delivered_code": "COMPLETED", "call_failed_code": "13224", "sms_failed_code": "13224" } ]}400
Bad Request - validation errors, invalid input
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}401
Unauthorized
402
Payment Required - usage limits exceeded
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}500
Internal Server Error
502
Bad Gateway - provider error
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Examplegenerated
{ "trackingId": "example", "error": { "code": "example", "message": "example", "fix": "example" }}