Optional email event type to filter by. Examples include Send, Delivery, Bounce, and DeliveryDelay
curl --request POST \
--url https://api.turnkey.com/public/v1/query/list_email_events \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"organizationId": "<string>",
"email": "<string>",
"eventType": "<string>",
"paginationOptions": {
"limit": "<string>",
"before": "<string>",
"after": "<string>"
}
}'
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().listEmailEvents({
organizationId: "<string> (Unique identifier for a given organization)",
email: "<string> (Recipient email address to list email events for)",
eventType: "<string> (Optional email event type to filter by. Examples include Send, Delivery, Bounce, and DeliveryDelay)",
paginationOptions: { // paginationOptions field,
limit: "<string> (A limit of the number of object to be returned, between 1 and 100. Defaults to 10.)",
before: "<string> (A pagination cursor. This is an object ID that enables you to fetch all objects before this ID.)",
after: "<string> (A pagination cursor. This is an object ID that enables you to fetch all objects after this ID.)",
}
});
{
"emailEvents": [
{
"id": "<string>",
"organizationId": "<string>",
"messageId": "<string>",
"eventType": "<string>",
"fromAddress": "<string>",
"toAddress": "<string>",
"senderTenant": "<string>",
"timestamp": "<string>",
"createdAt": "<string>",
"details": {
"bounceType": "<string>",
"bounceSubType": "<string>",
"diagnosticCode": "<string>",
"deliverySmtpResponse": "<string>",
"deliveryProcessingTimeMillis": "<string>",
"deliveryDelayType": "<string>",
"complaintFeedbackType": "<string>"
}
}
]
}
Queries
List email events
List email events for the organization.
curl --request POST \
--url https://api.turnkey.com/public/v1/query/list_email_events \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"organizationId": "<string>",
"email": "<string>",
"eventType": "<string>",
"paginationOptions": {
"limit": "<string>",
"before": "<string>",
"after": "<string>"
}
}'
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().listEmailEvents({
organizationId: "<string> (Unique identifier for a given organization)",
email: "<string> (Recipient email address to list email events for)",
eventType: "<string> (Optional email event type to filter by. Examples include Send, Delivery, Bounce, and DeliveryDelay)",
paginationOptions: { // paginationOptions field,
limit: "<string> (A limit of the number of object to be returned, between 1 and 100. Defaults to 10.)",
before: "<string> (A pagination cursor. This is an object ID that enables you to fetch all objects before this ID.)",
after: "<string> (A pagination cursor. This is an object ID that enables you to fetch all objects after this ID.)",
}
});
{
"emailEvents": [
{
"id": "<string>",
"organizationId": "<string>",
"messageId": "<string>",
"eventType": "<string>",
"fromAddress": "<string>",
"toAddress": "<string>",
"senderTenant": "<string>",
"timestamp": "<string>",
"createdAt": "<string>",
"details": {
"bounceType": "<string>",
"bounceSubType": "<string>",
"diagnosticCode": "<string>",
"deliverySmtpResponse": "<string>",
"deliveryProcessingTimeMillis": "<string>",
"deliveryDelayType": "<string>",
"complaintFeedbackType": "<string>"
}
}
]
}
A successful response returns the following fields:
Was this page helpful?