Skip to content

Get results from a log query started with Start Log Query

GET
/logs/query/{queryId}
curl --request GET \
--url https://api.pingram.io/logs/query/example \
--header 'Authorization: Bearer <token>'

Get results from a log query started with Start Log Query. Poll until status is Complete.

Authorizations

Parameters

Path Parameters

queryId
required
string

Query ID returned by Start Log Query

Responses

200

Successful response

Media typeapplication/json

Response type for GET /logs/query/{queryId}

object
status
required
string
logs
Array<object>
object
received_at
string
type
string
envId
string
clientId
string
agent
string
ip
string
request
string
test
boolean
trackingId
required
string
accountId
required
string
failed_at
string
failed_code
string
Allowed values: SPAM_CONTENT INVALID_SCHEDULE_FORMAT SCHEDULE_RESOURCE_NOT_FOUND MISSING_NOTIFICATION_TYPE UNKNOWN
failed_internal
string
inapp_sent_at
string
inapp_sent_after
number
inapp_delivered_at
string
inapp_delivered_after
number
inapp_failed_at
string
inapp_failed_code
string
Allowed values: IN_APP_WEB_FAILED UNKNOWN
inapp_failed_internal
string
mobile_push_failed_at
string
mobile_push_failed_code
string
Allowed values: NO_APN_CONFIG NO_FCM_CONFIG INVALID_APN_TOKEN INVALID_FCM_TOKEN UNKNOWN
mobile_push_failed_token
string
mobile_push_failed_internal
string
mobile_push_sent_at
string
mobile_push_sent_after
number
mobile_push_sent_token
string
mobile_push_delivered_at
string
mobile_push_delivered_after
number
email_sent_at
string
email_sent_message_id
string
email_sent_after
number
email_preview

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).

string
email_delivered_at
string
email_delivered_recipients
string
email_delivered_after
number
email_delivered_webhook_res
string
email_delivered_internal
string
email_failed_at
string
email_failed_code
string
Allowed values: UNVERIFIED_SENDER PERMANENT_GENERAL_BOUNCE PERMANENT_NO_EMAIL_BOUNCE PERMANENT_SUPPRESSED_BOUNCE TRANSIENT_GENERAL_BOUNCE TRANSIENT_MAILBOX_FULL_BOUNCE TRANSIENT_MESSAGE_TOO_LARGE_BOUNCE TRANSIENT_CONTENT_REJECTED_BOUNCE TRANSIENT_ATTACHMENT_REJECTED_BOUNCE UNDETERMINED_BOUNCE COMPLAINT_ABUSE COMPLAINT_AUTH COMPLAINT_FRAUD COMPLAINT_NOT_SPAM COMPLAINT_OTHER COMPLAINT_VIRUS SUPPRESSED_COMPLAINT SUPPRESSED_BOUNCE DOMAIN_VERIFICATION_REQUIRED MISSING_EMAIL_RECIPIENT MISSING_EMAIL_SUBJECT MISSING_EMAIL_HTML NO_ADDRESS USAGE_LIMIT VERIFICATION_LIMIT TEMPLATE_NOT_FOUND NO_DEFAULT_TEMPLATE SPAM_CONTENT SMS_FREE_RESTRICTED
email_failed_recipient
string
email_failed_diagnostic_code
string
email_failed_internal
string
email_failed_webhook_res
string
email_opened_at
string
email_opened_user_agent
string
email_opened_ip
string
email_opened_webhook_res
string
email_clicked_at
string
email_clicked_user_agent
string
email_clicked_ip
string
email_clicked_link
string
email_clicked_link_tags
string
email_clicked_webhook_res
string
email_inbound_at

When the message was accepted, ISO 8601. Log order and the 30-day resend window use this time.

string
email_inbound_from

Sender email address.

string
email_inbound_from_name

Sender display name, when the From header includes one.

string
email_inbound_to

Comma-separated To header addresses. This is the header, not necessarily the Pingram inbox.

string
email_inbound_cc

Comma-separated CC header addresses.

string
email_inbound_bcc

Comma-separated BCC header addresses. Often empty because that header is stripped before delivery.

string
email_inbound_reply_to

Reply-To header address.

string
email_inbound_inbox

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.

string
email_inbound_to_name

Display name of email_inbound_inbox when the headers include one. Same value as matched.name. Omitted when that address has no display name.

string
email_inbound_sent_at

Sender Date header, ISO 8601. Omitted when that header is missing or invalid.

string
email_inbound_retry_key

Key used to resend this inbound email for 30 days.

string
email_inbound_user_id

User id from the original notification when this mail is a reply to one.

string
email_inbound_subject

Subject line.

string
email_inbound_body_text

Plain-text body.

string
email_inbound_body_html

HTML body. Inline images use cid: values that match attachment content IDs on the webhook payload.

string
email_inbound_has_attachments

True when the message includes at least one attachment.

boolean
email_inbound_attachment_count

Number of attachments. File bytes are not stored on this log.

number
email_inbound_message_id

Message-ID header. Use it to thread later replies.

string
email_inbound_in_reply_to

In-Reply-To header: the Message-ID this mail replies to.

string
email_inbound_references

References header: the chain of Message-IDs in the thread.

string
email_inbound_webhook_delivered

True when an EMAIL_INBOUND webhook endpoint returned a 2xx response.

boolean
email_inbound_webhook_res

JSON delivery result for each EMAIL_INBOUND endpoint.

string
email_inbound_resolution_type

How the inbox was matched: reply for a reply to a sent notification, builtin for a Pingram inbox, or custom for a custom domain.

string
Allowed values: reply builtin custom
sms_inbound_at
string
sms_inbound_from
string
sms_inbound_to

Pingram number that received the inbound message.

string
sms_inbound_text
string
sms_inbound_webhook_delivered
boolean
sms_inbound_webhook_res
string
sms_inbound_media

Truncated JSON string of inbound MMS metadata when present.

string
sms_replied_at
string
sms_replied_to
string
sms_replied_text
string
sms_replied_segments
number
sms_replied_encoding
string
sms_unsubscribe_at
string
sms_unsubscribe_from
string
sms_unsubscribe_keyword
string
sms_unsubscribe_webhook_delivered
boolean
sms_unsubscribe_webhook_res
string
sms_subscribe_at
string
sms_subscribe_from
string
sms_subscribe_keyword
string
sms_subscribe_webhook_delivered
boolean
sms_subscribe_webhook_res
string
web_push_sent_token
string
web_push_sent_at
string
web_push_sent_after
number
web_push_delivered_at
string
web_push_delivered_after
number
web_push_delivered_token
string
web_push_delivered_internal
string
web_push_failed_at
string
web_push_failed_token
string
web_push_failed_code
string
Allowed values: UNSUBSCIRBED_OR_EXPIRED UNKNOWN NO_ADDRESS USAGE_LIMIT VERIFICATION_LIMIT TEMPLATE_NOT_FOUND NO_DEFAULT_TEMPLATE SPAM_CONTENT SMS_FREE_RESTRICTED
web_push_failed_internal
string
processed_at
string
ignored
string
Allowed values: THROTTLING DEDUPLICATION DISABLED_NOTIFICATION ALL_CHANNELS_IGNORED
scheduled_for
string
user_id
string
user_email
string
user_number
string
email_routing
string
Allowed values: OFF SEND BATCH IGNORE SCHEDULE THROTTLED DEDUPLICATED
email_routing_reason
string
Allowed values: IGNORE_BY_PREFERENCES IGNORE_BY_ENVIRONMENT IGNORE_BY_DEFAULT_DELIVERY
sms_routing
string
Allowed values: OFF SEND BATCH IGNORE SCHEDULE THROTTLED DEDUPLICATED
sms_routing_reason
string
Allowed values: IGNORE_BY_PREFERENCES IGNORE_BY_ENVIRONMENT IGNORE_BY_DEFAULT_DELIVERY
web_push_routing
string
Allowed values: OFF SEND BATCH IGNORE SCHEDULE THROTTLED DEDUPLICATED
web_push_routing_reason
string
Allowed values: IGNORE_BY_PREFERENCES IGNORE_BY_ENVIRONMENT IGNORE_BY_DEFAULT_DELIVERY
mobile_push_routing
string
Allowed values: OFF SEND BATCH IGNORE SCHEDULE THROTTLED DEDUPLICATED
mobile_push_routing_reason
string
Allowed values: IGNORE_BY_PREFERENCES IGNORE_BY_ENVIRONMENT IGNORE_BY_DEFAULT_DELIVERY
call_routing
string
Allowed values: OFF SEND BATCH IGNORE SCHEDULE THROTTLED DEDUPLICATED
call_routing_reason
string
Allowed values: IGNORE_BY_PREFERENCES IGNORE_BY_ENVIRONMENT IGNORE_BY_DEFAULT_DELIVERY
inapp_routing
string
Allowed values: OFF SEND BATCH IGNORE SCHEDULE THROTTLED DEDUPLICATED
inapp_routing_reason
string
Allowed values: IGNORE_BY_PREFERENCES IGNORE_BY_ENVIRONMENT IGNORE_BY_DEFAULT_DELIVERY
slack_routing
string
Allowed values: OFF SEND BATCH IGNORE SCHEDULE THROTTLED DEDUPLICATED
slack_routing_reason
string
Allowed values: IGNORE_BY_PREFERENCES IGNORE_BY_ENVIRONMENT IGNORE_BY_DEFAULT_DELIVERY
sms_preview
string
call_preview
string
web_push_preview
string
mobile_push_preview
string
slack_preview
string
inapp_preview
string
slack_sent_at
string
slack_sent_after
number
slack_delivered_at
string
slack_delivered_after
number
slack_delivered_internal
string
slack_failed_at
string
slack_failed_code
string
Allowed values: CHANNEL_NOT_FOUND NOT_IN_CHANNEL CHANNEL_ARCHIVED MESSAGE_TOO_LONG NO_TEXT RESTRICTED_ACTION TOKEN_EXPIRED INVALID_AUTH UNKNOWN NO_ADDRESS USAGE_LIMIT VERIFICATION_LIMIT TEMPLATE_NOT_FOUND NO_DEFAULT_TEMPLATE SPAM_CONTENT SMS_FREE_RESTRICTED
slack_failed_internal
string
call_sent_at
string
call_sent_after
number
call_sent_from
string
call_delivered_at
string
call_delivered_after
number
call_delivered_code
string
Allowed values: COMPLETED BUSY NO_ANSWER UNKNOWN
call_delivered_cost_internal
number
call_delivered_cost

Same value as call_delivered_cost_internal (for API/external use)

number
call_failed_at
string
call_failed_code
string
Allowed values: 13224 10002 21211 21215 21265 21610 21614 21612 30005 30006 30007 30008 30453 40001 40002 40010 40300 Unknown MISSING_SMS_RECIPIENT MISSING_SMS_MESSAGE INVALID_PHONE_NUMBER NO_ADDRESS USAGE_LIMIT VERIFICATION_LIMIT TEMPLATE_NOT_FOUND NO_DEFAULT_TEMPLATE SPAM_CONTENT SMS_FREE_RESTRICTED
call_failed_internal
string
sms_failed_at
string
sms_failed_code
string
Allowed values: 13224 10002 21211 21215 21265 21610 21614 21612 30005 30006 30007 30008 30453 40001 40002 40010 40300 Unknown MISSING_SMS_RECIPIENT MISSING_SMS_MESSAGE INVALID_PHONE_NUMBER NO_ADDRESS USAGE_LIMIT VERIFICATION_LIMIT TEMPLATE_NOT_FOUND NO_DEFAULT_TEMPLATE SPAM_CONTENT SMS_FREE_RESTRICTED
sms_failed_internal
string
sms_sent_at
string
sms_sent_after
number
sms_sent_from
string
sms_sent_carrier
string
sms_sent_line_type
string
sms_sent_encoding
string
sms_sent_segments
number
sms_sent_parts
number
sms_sent_cost
number
sms_sent_country
string
sms_sent_messageId

Unique message ID from the SMS provider

string
sms_sent_mms

True when the send included MMS (mediaUrls).

boolean
sms_carrier_cost_internal

Actual carrier cost (internal)

number
sms_carrier_fee_internal
number
sms_rate_internal
number
sms_delivered_at
string
sms_delivered_after
number
sms_delivered_cost_internal

Actual delivery cost from carrier webhook (USD), for internal logging

number
schedule_updated_at
string
schedule_updated_to
string
schedule_deleted_at
string
message
string
error
string
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

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

401

Unauthorized

402

Payment Required - usage limits exceeded

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}

500

Internal Server Error

502

Bad Gateway - provider error

Media typeapplication/json

Standard error response for API errors.

object
trackingId
required

Unique tracking ID for the request.

string
error
required

Structured error details for API error responses.

object
code
required

Machine-readable error code.

string
message
required

Human-readable error message.

string
fix

Actionable hint for fixing the error.

string
Examplegenerated
{
"trackingId": "example",
"error": {
"code": "example",
"message": "example",
"fix": "example"
}
}