List message log events
Lists the organization's message events in its plan's log window.
GET
Lists the organization's message events in its plan's log window. The default sort is by event timestamp. Use orderBy=recorded and order=asc to poll events in ingestion order, including events with older timestamps. Pass the last event's cursor as after. Keep the same sort and direction when paging.
apiKeyheader
x-api-key<token>limit?|nullcursor?stringafter?stringorderBy?stringValue in
"timestamp""recorded"order?stringValue in
"asc""desc"since?stringuntil?stringstatus?stringevent?stringchannel?stringValue in
"sms""whatsapp""email"direction?stringValue in
"outbound""inbound"origin?stringValue in
"direct""campaign""scheduled""mailbox""forwarding""journey""businessApp"credential?stringfrom?stringLength
1 <= lengthmessageId?stringMatch
^msg_[0-9a-hjkmnp-tv-z]{16,24}$mailboxId?stringMatch
^mbx_[0-9a-hjkmnp-tv-z]{16,24}$requestId?stringMessageLogPage
application/json- response
items*array<>nextCursor*string|nullimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.logs.list({});Example Response
{
"items": [
{
"id": "string",
"cursor": "string",
"timestamp": "string",
"event": "accepted",
"messageId": "string",
"channel": "sms",
"direction": "outbound",
"origin": "direct",
"from": {
"address": "string",
"name": "string"
},
"recipient": "string",
"subject": "string",
"submission": {
"origin": "direct",
"transport": "http",
"credential": {
"kind": "api_key",
"apiKeyId": "string",
"name": "string"
},
"user": {
"id": "string",
"email": "string",
"name": "string"
},
"client": {
"surface": "typescript-promise",
"version": "string"
}
},
"requestId": "string",
"reason": "string",
"errorTag": "string"
}
],
"nextCursor": "string"
}