Skip to main content

/deliveryLogs

Overview​

Fetch communication delivery logs (SMS, email, push, etc.) across all members of the business. Results are scoped to the authenticated business (x-api-key) and default to the last 90 days when no date filter is supplied.

When to Use This Endpoint​

Use this endpoint to:

  • Monitor delivery status of communications (SMS, email, push notifications)
  • Audit member engagement metrics (clicks, opens, bounces)
  • Troubleshoot failed deliveries or identify delivery issues
  • Generate delivery reports for compliance and analytics

Key Considerations​

  • Results are always sorted by createdAt descending (newest first)
  • When neither fromDate nor toDate is provided, the endpoint automatically uses a 90-day window ending at the current time
  • The database stores status values capitalized but the API returns them in lowercase for consistency
  • Use limit and offset together for cursor-free pagination
  • Results are scoped to the authenticated business; only logs for members of the calling business are returned

Request Details​

Method & URL​

POST /deliveryLogs

See API Servers for the base URL to use in place of {{server}}.

Headers​

HeaderTypeRequiredDescription
x-api-keystringYesBusiness API key used to identify and authorize the caller
x-source-typestringYesType of the calling system (e.g., pos, kiosk)
x-source-namestringYesName of the calling application
x-pos-idstringYesUnique identifier of the POS terminal
x-branch-idstringYesIdentifier of the branch making the request

Request Body​

FieldTypeRequiredDefaultDescription
typestringNo—Filter by message type (e.g., sms, email, push)
statusstringNo—Filter by delivery status: sent, failed, bounce complaint, delivered, open, or clicked
fromDateISO 8601 dateNo90 days agoStart of the date range (createdAt >= fromDate)
toDateISO 8601 dateNonowEnd of the date range (createdAt <= toDate)
limitinteger (1–100)No40Maximum number of records to return
offsetinteger (≥ 0)No0Number of records to skip (for pagination)

Request Example​

curl --location --request POST 'https://{{server}}/v1/deliveryLogs' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{api-key}}' \
--header 'x-source-type: POS' \
--header 'x-source-name: pos-terminal-01' \
--header 'x-pos-id: POS001' \
--header 'x-branch-id: BR001' \
--data-raw '{
"type": "sms",
"status": "delivered",
"fromDate": "2026-04-01T00:00:00.000Z",
"toDate": "2026-04-30T23:59:59.999Z",
"limit": 20,
"offset": 0
}'

Success Response​

200 OK​

{
"status": "success",
"deliveryLogs": [
{
"messageId": "msgabc123",
"type": "sms",
"status": "delivered",
"destination": "905551234567",
"membershipKey": "0fe31b8b-5ad5-48af-81e9-4adc7d596042",
"templateId": "tmplxyz",
"campaignId": "camp456",
"provider": "verimor",
"source": "SENDERNAME",
"createdAt": "2026-04-15T10:23:00.000Z"
}
]
}

Response Fields​

FieldTypeDescription
messageIdstringUnique identifier of the message
typestringCommunication channel (sms, email, push, etc.)
statusstringDelivery status in lowercase: sent, failed, bounce complaint, delivered, open, or clicked
destinationstring | nullRecipient address (phone number or email)
membershipKeystringLoyalty membership key of the recipient
templateIdstring | nullIdentifier of the message template used
campaignIdstring | nullIdentifier of the campaign that triggered the message
providerstringDelivery provider (e.g., verimor, ses, notification)
sourcestring | nullSource identifier (e.g., SMS sender name or email "from" field)
createdAtISO 8601 dateTimestamp when the log entry was created

Error Response Examples​

Invalid API Key​

{
"status": "error",
"error": {
"code": "101",
"message": "x-api-key header is required"
}
}

Invalid Status Value​

{
"status": "error",
"error": {
"code": "1005",
"message": "Invalid status value"
}
}

Invalid Date Format​

{
"status": "error",
"error": {
"code": "1002",
"message": "Invalid fromDate format (must be ISO 8601)"
}
}

Internal Server Error​

{
"status": "error",
"error": {
"code": "1030",
"message": "Internal server error while fetching delivery logs"
}
}

Error Codes​

HTTP StatusCodeDescription
400101Missing or invalid x-api-key header
400102Missing x-source-type header
400103Missing x-source-name header
400104Missing x-pos-id header
400105Missing x-branch-id header
4001004Invalid type value
4001005Invalid status value
4001002Invalid fromDate format (must be ISO 8601)
4001003Invalid toDate format (must be ISO 8601)
4001011Invalid limit (must be an integer between 1 and 100)
4001012Invalid offset (must be an integer of 0 or more)
5001030Internal server error while fetching delivery logs

Field Reference​

FieldTypeDescription
typestringCommunication channel type (e.g., sms, email, push)
statusstringDelivery status (sent, failed, bounce complaint, delivered, open, or clicked)
fromDateISO 8601 dateStart date for filtering log entries
toDateISO 8601 dateEnd date for filtering log entries
limitintegerMaximum records to return (1–100)
offsetintegerNumber of records to skip for pagination
  • Monitoring compliance with communication delivery SLAs
  • Investigating member engagement patterns (open rates, click rates)
  • Debugging delivery failures for troubleshooting
  • Building delivery analytics dashboards
  • Auditing communication history for regulatory compliance