Get message log detail
Returns the message and its event timeline, or a rejected submission, by message, rejection, or request ID.
GET
Returns the message and its event timeline, or a rejected submission, by message, rejection, or request ID.
apiKeyheader
x-api-key<token>id*|string|stringLogDetail
application/json- response
kind*"message"Value in
"message"requestBody*string|nullresponseBody*string|nulldeliveries*array<>messageId*MessageIdMatch
^msg_[0-9a-hjkmnp-tv-z]{16,24}$channel*stringValue in
"sms""whatsapp""email"direction*stringValue in
"outbound""inbound"status*stringValue in
"pending""scheduled""queued""processing""sent""delivered""read""failed""bounced""complained"recipients*array<>recipientCount*integerRange
0 <= value <= 9007199254740991from*|nullsubmission*|nullsubject*string|nullacceptedAt*string|nullcreatedAt*stringupdatedAt*stringcampaign*|nullcontent*apiRequest*|nullstatusTimeline*import { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.logs.get({
"id": "example"
});Example Response
{
"kind": "message",
"requestBody": "string",
"responseBody": "string",
"deliveries": [
{
"scheduling": {
"dueAt": "string",
"expiresAt": "string",
"waitReason": "rate",
"reviewExpectedAt": "string"
},
"id": "string",
"messageId": "string",
"recipientId": "string",
"channel": "sms",
"status": "pending",
"attemptCount": 0,
"maxAttempts": 0,
"queuedAt": "string",
"claimedAt": "string",
"lastAttemptAt": "string",
"nextRetryAt": "string",
"sentAt": "string",
"deliveredAt": "string",
"readAt": "string",
"failedAt": "string",
"terminalAt": "string",
"errorCode": "string",
"errorMessage": "string",
"errorDetails": {
"code": "string",
"name": "string",
"message": "string",
"details": {
"property1": "string",
"property2": "string"
},
"retryable": true
},
"cost": "string",
"currency": "string",
"idempotencyKey": "string",
"createdAt": "string",
"updatedAt": "string"
}
],
"messageId": "string",
"channel": "sms",
"direction": "outbound",
"status": "pending",
"recipients": [
{
"id": "string",
"address": "string"
}
],
"recipientCount": 0,
"from": {
"address": "string",
"name": "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"
}
},
"subject": "string",
"acceptedAt": "string",
"createdAt": "string",
"updatedAt": "string",
"campaign": {
"runId": "string",
"name": "string"
},
"content": {
"text": "string",
"html": "string",
"markdown": "string",
"sms": {
"text": "string",
"unicode": true,
"parts": 0
},
"whatsapp": {
"appHandlesFlowSubmission": true,
"text": "string",
"template": {
"name": "string",
"language": "string",
"components": [
{
"type": "header",
"sub_type": "url",
"index": "string",
"parameters": [
{
"type": "text",
"text": "string",
"currency": {
"fallback_value": "string",
"code": "string",
"amount_1000": 0
},
"date_time": {
"fallback_value": "string"
},
"image": {
"link": "string"
},
"document": {
"link": "string",
"filename": "string"
},
"video": {
"link": "string"
},
"coupon_code": "string",
"action": {
"flow_token": "string",
"flow_action_data": {
"property1": "string",
"property2": "string"
}
}
}
]
}
]
},
"interactive": {
"type": "buttons",
"header": {
"type": "text",
"text": "string"
},
"body": "string",
"footer": "string",
"buttons": [
{
"id": "string",
"title": "string"
}
]
},
"media": {
"type": "image",
"url": "string",
"caption": "string",
"filename": "string"
},
"reaction": {
"messageId": "string",
"providerMessageId": "string",
"emoji": "string"
},
"location": {
"latitude": 0,
"longitude": 0,
"name": "string",
"address": "string",
"url": "string"
},
"contacts": [
{
"name": {
"formattedName": "string",
"firstName": "string",
"lastName": "string",
"middleName": "string",
"prefix": "string",
"suffix": "string"
},
"phones": [
{
"phone": "string",
"type": "string",
"waId": "string"
}
],
"emails": [
{
"email": "string",
"type": "string"
}
],
"urls": [
{
"url": "string",
"type": "string"
}
],
"org": {
"company": "string",
"department": "string",
"title": "string"
},
"addresses": [
{
"street": "string",
"city": "string",
"state": "string",
"zip": "string",
"country": "string",
"countryCode": "string",
"type": "string"
}
],
"birthday": "string"
}
],
"reply": {
"type": "button",
"id": "string",
"title": "string",
"description": "string"
},
"flowResponse": {
"flowToken": "string",
"submissionHandler": "app",
"response": {
"property1": "string",
"property2": "string"
},
"body": "string"
},
"context": {
"messageId": "string",
"providerMessageId": "string"
}
},
"email": {
"subject": "string",
"html": "string",
"text": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"tracking": {
"opens": true,
"clicks": true
},
"attachments": [
{
"filename": "string",
"contentId": "string",
"isInline": true,
"content": "string",
"mediaId": "string",
"contentType": "string",
"size": 0
}
]
},
"structured": {
"type": "string",
"data": {
"property1": "string",
"property2": "string"
}
},
"metadata": {
"property1": "string",
"property2": "string"
}
},
"apiRequest": {
"requestId": "string",
"method": "string",
"endpoint": "string",
"headers": {
"property1": "string",
"property2": "string"
},
"query": {
"property1": "string",
"property2": "string"
},
"ipAddress": "string",
"userAgent": "string"
},
"statusTimeline": {
"availability": "recorded",
"entries": [
{
"status": "string",
"at": "string",
"reason": "string",
"recipientId": "string"
}
]
}
}