Skip to Content

List message log events

Lists the organization's message events in its plan's log window.

GET
/v1/logs

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.

Authorization

apiKey
headerx-api-key<token>

Query Parameters

limit?|null
cursor?string
after?string
orderBy?string
Value in"timestamp""recorded"
order?string
Value in"asc""desc"
since?string
until?string
status?string
event?string
channel?string
Value in"sms""whatsapp""email"
direction?string
Value in"outbound""inbound"
origin?string
Value in"direct""campaign""scheduled""mailbox""forwarding""journey""businessApp"
credential?string
from?string
Length1 <= length
messageId?string
Match^msg_[0-9a-hjkmnp-tv-z]{16,24}$
mailboxId?string
Match^mbx_[0-9a-hjkmnp-tv-z]{16,24}$
requestId?string

Response Body

MessageLogPage

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
import { 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"
}

Related documentation